Alienhead Posted September 18, 2022 Share Posted September 18, 2022 Last question for awhile I'm dipping into stuff I haven't yet messed with in LE and I got stuck. My question is - is it possible to change an entity's classid? I'm wanting to classify a few 'models' as 'brushes' to avoid decal over spray. Thanks. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Josh Posted September 18, 2022 Share Posted September 18, 2022 This is not possible. What are you trying to prevent? Quote 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 More sharing options...
Alienhead Posted September 18, 2022 Author Share Posted September 18, 2022 28 minutes ago, Josh said: This is not possible. What are you trying to prevent? I want decals on terrain and models ( buildings and such ) but not on the player.. player model is classified as a 'model' if I'm correct. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Josh Posted September 18, 2022 Share Posted September 18, 2022 And I take it the buildings are loaded from models? It would be no problem if they were brushes, but otherwise I think it will be hard to prevent them from appearing on the player models. This is because they are rendered in a deferred step, and very little information can be stored about where each pixel came from. I have no implemented decals in Ultra yet, but they will be part of the lighting system, and since it's a forward renderer it will be easier to handle things like making a decal appear on one specific entity. 1 Quote 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 More sharing options...
Alienhead Posted September 18, 2022 Author Share Posted September 18, 2022 35 minutes ago, Josh said: This is not possible. What are you trying to prevent? 1 Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Genebris Posted September 18, 2022 Share Posted September 18, 2022 I wonder how they make deferred decal in other engines and give very straightforward layers system so you can exactly choose which objects are affected by decals. Quote Link to comment Share on other sites More sharing options...
Josh Posted September 18, 2022 Share Posted September 18, 2022 That's one possible solution, but it requires an extra texture to be stored with the gbuffer, which would not get used very often. With the forward renderer, we could assign layers, maybe using the existing render layers system, or we could explicitly assign entities the decal will appear on. 1 Quote 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 More sharing options...
reepblue Posted September 18, 2022 Share Posted September 18, 2022 In the shader, you can delete the decal code block and it'll break the decal from working on the material. 2 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Genebris Posted September 18, 2022 Share Posted September 18, 2022 Wait if that's so simple why not just provide a decalless shader with Leadwerks or have a checkbox in material? 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted September 19, 2022 Share Posted September 19, 2022 Well, actually the entity type does get stored in the gbuffer as a flag: int materialflags=1; if (ex_selectionstate>0.0) materialflags += 2; if (c==1) materialflags += 4;//brush if (decalmode==2) materialflags += 8;//model if (decalmode==4) materialflags += 16;//terrain So it would actually be possible to copy this shader and modify it to either remove decals or trick the renderer into thinking the entity is a different class. Quote 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 More sharing options...
Recommended Posts
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.