I created a custom model material which supports using the alpha channel to be blended in the render function. However, I spent awhile trying to figure out why using the alpha layer of the color wasn’t having effect. I could see that if I applied the color.a to the R/G/B channels that the data was clearly there. However, I finally tested it in game assuring blending was set to the correct settings and lo and behold it is working fine. I was wondering why the editor doesn’t support shaders with alpha. Is it because blending is disabled? If this is the case, it would be nice if we could provide a custom render script for use by the editor (or better yet, just have it use the one specified for use by the game.) This would make testing shaders much easier with custom render scripts.
Please post a sample project where it does not work.
Here’s an example (I simply modified the RenderCam example project to save time, but I kept the license the same:) https://www.dropbox.com/s/z7augt9ojucyy0p/modelalpha.zip?dl=0
If you open the main.collection you can see a “transparentmodel” object using a custom material. This object displays a black background in the editor. Upon running the project however, the black color doesn’t appear and it renders w/ transparency as it’s supposed to.
I have also wondered about this. We use the Defold editor to create levels.
Is there a way to support model alpha in the editor?
Maybe if we got a render script user setting for the editor viewport?