Rick Posted September 10, 2014 Posted September 10, 2014 There doesn't seem to be any shader in the invisible.mat so just wondering how it works? Quote
Haydenmango Posted September 10, 2014 Posted September 10, 2014 Its one of the options under Solid, Alpha, Light, etc. on the first page of the material editor. --edit Now I am curious about how you could go about changing those values through code. edit2-- Found it! http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/material/materialsetblendmode-r243 The Invisible option isn't documented though so I don't know if it works with the function. Quote Check out my game Rogue Snowboarding- https://haydenmango.itch.io/roguesnowboarding
Rick Posted September 10, 2014 Author Posted September 10, 2014 My invisible.mat in the editor has blend mode set to solid though, and it seems to still work. Quote
Haydenmango Posted September 10, 2014 Posted September 10, 2014 Yeah that is strange actually, sorry I didn't notice that! Quote Check out my game Rogue Snowboarding- https://haydenmango.itch.io/roguesnowboarding
whiterabbit Posted September 10, 2014 Posted September 10, 2014 --edit Now I am curious about how you could go about changing those values through code. edit2-- Found it! http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/material/materialsetblendmode-r243 The Invisible option isn't documented though so I don't know if it works with the function. SetBlendMode(5) does it 1 Quote
macklebee Posted September 10, 2014 Posted September 10, 2014 if you open the invisible.mat in a text file editor, you will see that it only contains one line: drawmode=0 As the property is not documented, its hard to say what all of the possible options could be. All other built-in materials have the drawmode set to -1. There are other properties as well that can be listed in the material file that have no documentation. When you create a new material, the text file will contain the property: lightingmode=1 but when you save the material via the material editor, then this line is removed from the file and two undocumented properties are added: alwaysuseshader=0 drawmode=-1 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
Rick Posted September 10, 2014 Author Posted September 10, 2014 I always thought the invisible mat (maybe in LE 2) had a shader assigned to it that discarded everything, but with this drawmode setting perhaps the engine itself sees this setting on a surface and simply doesn't pass that surface along to be rendered? Quote
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.