Glass shader

Hi all.

I am not sure what shader to use or make one that is what I want.

I making a Android game.
In the game I have diamonds/jewels that I want to look good.
I want them look as glass in different colors.
I also want it look like they are glowing, maybe from inside to the outside.
I did look at the free gem shader, but it looks very dull and do not have any glow effect.
It also important that the shader do not use to much performance.

So what shall I look into to get an shader like this?

If you’re looking for a glass shader with dynamic reflections, there’s one on the Wiki: http://wiki.unity3d.com/index.php/SurfaceReflection

It requires Unity Pro, though.

Can anybody tell me why something as basic as a glass shader with cubemap reflection is not part of the native unity shader library?

That’s a good question. I think part of the reason is that surface shaders are not currently very good for making things appear like glass, but it’s not really clear why glass isn’t considered important enough to be standard. I assume it’s just up to UTech’s somewhat haphazard approach to choosing new features.

thanks for your reply

just adding a cubemap reflection slot to the standard transparent shader would do it, in my case it doesn´t even need an input map, just a value…

I am currently working on an asset package for the unity asset store, that´s why I want to be sure that my custom shaders are working; and that´s why I decided to get myself a shader scripting crashcourse … so that´s the good side of it, if you will :wink:

having seen strumpy and even ninja-camp screenshots from a unity shader editor prototype, it´s quite painful to go back and learn shader scripting, especially for me as an artist.

when I purchased unity pro I thought that things like this wouldn´t be an issue, due to unity´s commitment to be an easy accessable engine especially for none-coders like me.
I still like Unity very much, but I have some problems understanding, why such basic elements do not exist, even if they have been requested over and over again. And I am shure that a good coder can provide a transparent shader with a cubemap slot within minutes, and within the existing Unity shader framework.

That won’t look very good unless it’s additive. Try out these shaders I made earlier in the year.

Hi Daniel,

thanks for your offer! I am currently undergoing the extensive unitycookie shader scripting waterboarding - I hope I will be able to understand shader code at least to the degree that I am able to use shaders like the ones you offered; but I need to understand the code (as long as there is no up-to-date visual shader editor like strumpy or mmill)