Remove the surface prop, create your own normal maps and take out the
dudvmap, we found specifying a bump map as well as a normal map helped (
just use the normal map). Best to provide different levels of refractin
dependant on DX level, as they change, I assume because it shifts from per
pixel to per vertex. You'll also need to create fallbacks for dx 6, 7 and 8
(on low shaders) as they don't support the refraction shader. You might also
run into trouble with the flashlight causing clients to crash when the
flashlight hits the refraction shader.

It might be a plan to take out the animation proxy too, the ripple from the
refraction is more than enough, but that's up to you.

Hope it helps,

Ging

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Spk Spk
Sent: 05 June 2005 13:17
To: [email protected]
Subject: [hlcoders] Predator Effect Problems

Hello guys,

I'm currently implementing a stealth suit for my mod, and yeah, I couldn't
resist to give the predator effect a try.

Here's the material code I'm using:

"Refract"
{
        "$model" 1
        "$refractamount" "1.0"
        "$refracttint" "[1.0 1 1]"

        "$dudvmap" "dev/water_dudv"
        "$normalmap" "dev/water_normal"

        "$surfaceprop" "water"
        "$bumpframe" "0"

        "Proxies"
        {
                "AnimatedTexture"
                {
                        "animatedtexturevar" "$normalmap"
                        "animatedtextureframenumvar" "$bumpframe"
                        "animatedtextureframerate" 30.00
                }
        }
}

I got the effect to load properly ingame but I'm running into a wierd
problem depending on the angle I am facing. The effect is working just fine
from one side, and goes totally wrong when I move to the other side. It no
longer seems to "refract" what's behind it. For instance, if I put a player
A using the stealth effect in front of another player B not using it, you
won't see player B through player A. If I change my position a bit, i will
get it to work as intended.

I am not sure what the problem is here. Since this is a ripoff from the
water shader, I'm guessing it has something to do with the effect only
applying from one side. Could anyone give me some pointers or even better,
some code to fix this please?

Also, is it possible to dynamically change a material parameter (such as
$refractionamount ) from the code?

Thanks in advance!
Spk
- Nuclear Dawn



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to