- Home /
Make Water Transparent?
I need to make water transparent, without losing the fx\water shader! Any help?
I've got a script for when you go underwater as well:
var fog = false; var fogColor = Color (0, 0.4, 0.7, 0.6); var fogDensity = 4; var skybox : Material;
function OnTriggerEnter(other : Collider) { fog = true; RenderSettings.fog = fog; RenderSettings.fogColor = fogColor; RenderSettings.fogDensity = fogDensity; RenderSettings.skybox = skybox; }
can you include some more info about whether u want the water to be transparent when your in it or when your over it? what texture is in the water shader? have you tried editing the opacity of the texuture?
ok. i have the basic water textures (come in the Water (basic) package) I would like to know how i could change the Opacity of the water...
Answer by Kos-Dvornik · Oct 09, 2011 at 10:32 AM
You need to add just one line in fx/water shader. In Pass statement( next line after "Pass{") add "Blend SrcAlpha OneMinusSrcAlpha". After that you can control opacity with alpha of HorizontColor property. You can also do it via script.
I had looking for solution a lot. Your post finally helped me. Thanks!
Your answer
Follow this Question
Related Questions
How do you make being underwater LOOK like being underwater? 1 Answer
water transparent 1 Answer
Transparent Shader/Water With Shadows 1 Answer