- Home /
Glass on mobile (transparent + specularity that isn't?)
Is it possible to have a shader that is 100% transparent but the specularity behaves as if it were not transparent? (as you would get in a rendering program)
(basically the specularity fades with the main color transparency setting on normal unity shaders like Transparent/Specular)
I don't need reflection or refraction effects, just a simple shiny glass.
Would love to know how to do this.
Answer by sean · Jun 27, 2011 at 01:52 PM
I posted a very similar question a week or two ago. Looking at the builtin specular shader, and spinning a couple of my own variants, it looks like the specular surface lighting model is doing exactly what you want in its calculations- creating a specular opacity that is addative with whatever the base material alpha is- but the alpha being output from that shader function isn't being honored. I can literally hardcode it to 0.0 or 1.0 without noticing a difference. I've filed this as a bug report and haven't heard back.