Fade a shader?


(]UBC[ McNite) #1

Just wondering whether this is possible:

I want a shader like textures/liquids_sd/siwa_water_2 fade into nothing. Why siwa_water_2? Because it is a good example for a shader with several blend stages.

What I can do is: fade a texture into nothing by using alphablending (that s easy). But that “trick” is done by having the one texture (the nothing) as one stage of that shader, and the visible tex as the other texture.

So what would I need to do to have a surface I use a shader with tcMod scroll, rgbGen and all that stuff on to fade? I can’t really build those stages inside the primary blend stage of an alphashader right?

To work around this: yea i could have brushes I use an alphablending shader on which makes a black tex fade to transparent. That way I can kinda let the other shader “disappear” behind the black. But that s not what I need. I have a brush of like 256 units high, its all visible, and on its surface I want a multiple stage shader effect to fade from 100% visible at the bottom to nothing at the top.

Another thing I can’t get done right now is: Have a multiple stage blend shader slowly fade into vision. The problem with setstates is: objects “pop” into vision. So how can I make a cloud (for example) slowly change from transparent to opaque within like 3 seconds?

Well this is just random thoughts, and leafing through the shader manual didn’t really enlight me, so every help or ideas are appreaciated. :smiley:


(carnage) #2

So what would I need to do to have a surface I use a shader with tcMod scroll, rgbGen and all that stuff on to fade? I can’t really build those stages inside the primary blend stage of an alphashader right?

you can add thoes commands to any shader stae pass exept the lightmap so there is no problems using alpha brushwork blends with only a secondary texture


(Shaderman) #3

Just an idea: http://splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=7680

I think it could be possible if you use alphamod brushes with appropriate alpha channels for your textures.