non-refractive glass

Hello there, it’s me again :wink:

Now i’m looking for a non-refractive glass, again for my bathroom project…

Sorry to bother all you with my noob posts, but ok, i’m a 3D maker, not a script guy… i can do almost whatever i want into Maya, 3dsmax and so on, but not in Unity…

So i need transparency, clear one, with some reflection : about 25% (or RGB 65)…
color can be good for tinted glass…
A shower window…

And why not a bumped one, or glossy one…

Of course, if i post here, that means that i can’t achieve what i need with default Unity stuff…

thanks for help!

I hope i’ll be able to help in return with my skills… one day…

I knocked together a quick one from the reflect/diffuse and transparent/diffuse shaders. Not bumped or glossy, I’m afraid, but should do until someone with a bit more time can help.

228007–8203–$glassshader_115.shader (2.58 KB)

A little bugfix (now reflect colour does something!), plus a screenshot showing it in action in my crappy recreation of that curved shower:

Thanks to ImageShack for Free Image Hosting

228140–8207–$glassshader_186.shader (2.61 KB)

thank you, but can you simply explain how to use it ?
where shall i put that script ?

How can i put this one onto an object ?

When i create a new material, i can’t use the “edit shader” button (disabled) to put this script into it…

If you put it in your assets folder, it should appear in the material’s “Shader” dropdown.

many thanks Gaustwick,

Now i start to understand the way to change shaders in Unity…

It’s not so usual when you come from 3D artist world… but ok, i think i start to get it !

gaustwick,

great job! This is exactly what I was looking for. Was going to write it by myself. Thanks for the beautiful shader!

Cheers

Is it me or does this not work in Unity 3? The cubemapped reflection isn’t showing up no matter what reflection color or intensity I try. I also tried it with several different cubemaps.

Anyone else having this happen?

Edit: I just noticed the comment about the subshader commented out and how it should be rewritten into a surface shader… Anyone smarter than I know what this means or how to do it?