Hints?
Shader Transparency
-
Rixeh
- Greenskin
- Posts: 135
- Joined: Sat Nov 20, 2004 8:36 am
Shader Transparency
Hey all, I need to jump into shaders a bit for the project I'm in, and Ive hit a bump.
Been messing around with the Ocean shader nfz posted from Rendermonkey, and was wondering -- how exactly does one go about adding transparency to it? Apparently you can't just tack on a "scene_blend alpha_blend" into the material {pass}, unless I'm doing it wrong..
Hints?
Thanks!
Hints?
-
nfz
- OGRE Retired Team Member

- Posts: 1263
- Joined: Wed Sep 24, 2003 4:00 pm
- Location: Halifax, Nova Scotia, Canada
your halfway there. You also have to modify the alpha channel of the fragment shader output. It is currently set to 1.0 so its always opaque so if you want transparence then make it less than 1.0. I did make a modified version that stores fx values ie alpha in a second uv set for each vertex so you could have areas close to shore that are more transparent than deep water. You could also use a second texture as a location map that defines what areas are trasnparent and have foam.
I am not able to get access to all my dev stuff (MB,cpu,ram got cooked due to bad electrolytic capacitors) for the next few weeks to be able to upload an updated demo.
I am not able to get access to all my dev stuff (MB,cpu,ram got cooked due to bad electrolytic capacitors) for the next few weeks to be able to upload an updated demo.
-
Rixeh
- Greenskin
- Posts: 135
- Joined: Sat Nov 20, 2004 8:36 am
-
Rixeh
- Greenskin
- Posts: 135
- Joined: Sat Nov 20, 2004 8:36 am
-
Crashy
- Google Summer of Code Student

- Posts: 1005
- Joined: Wed Jan 08, 2003 9:15 pm
- Location: Lyon, France
- x 49
- Contact:
-
Rixeh
- Greenskin
- Posts: 135
- Joined: Sat Nov 20, 2004 8:36 am
