Jump to content

Decal question


Alienhead
 Share

Recommended Posts

What could I had possibly added or changed that would knock out all decals  across all maps?  The decals appear fine in the editor, but  dont show in the game field.  Was working fine up until last night when I noticed it, I checked back on a 3 day back up and they were working.  I've done a lot of stuff since then and I'm really just searching randomly trying to find what would cause them to not show up at all.    Any suggestions ? 

 

decal.png

Also, When I walk over the area the decal should be showing at, I get this on the camera.  But goes away when I leave the area. 

 

huh.png

Link to comment
Share on other sites

Somewhere, somehow this got added to my creation script - self.camera:SetMultisampleMode(0).
My character creation script is well over 4,000 lines of code now,  this was embedded within that block of code..  Might of been a copy/Npaste error or something, Sublime acts up from time to time.

 

That's what was blocking the decals...   not even sure where that line of code came from lol.  

 

Ty anyways.

Link to comment
Share on other sites

Yep, with multisampling disabled Leadwerks uses a 1x MSAA texture, which is a completely different type of sampler than a sampler2D. Vulkan strangely does not support 1x MSAA textures, so I have to have two completely different sets of shaders for multisample/non-multisampled.

  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Yah I've been over and over that page but my character model isn't a brush nor a none model type.. it's the same geometry as the stuff I want the decal to stick to.  I'll try some scales but I doubt that'll work since I still want the zone to hit the map geometry..   thanks anyways.

Link to comment
Share on other sites

If you want to exclude things from decals, but can't use the settings in the entity properties in the editor, you can always remove the following lines from the shader that you use for the entity. Beware that changing a shader changes it for all entities that use that shader, so you might end up needing a separate non-decal shader with these lines removed:

if (decalmode==1) materialflags += 4;//brush
if (decalmode==2) materialflags += 8;//model
if (decalmode==4) materialflags += 16;//terrain

It's a bit hacky, but it works well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...