Hey everyone

I'm trying to decipher how shaders work in the Source Engine, but
there's one thing that has me stumped. I've been looking at the
Aftershock effect and in aftershock_helper.cpp, but lines 106-109 have
me a little confused:

pShaderShadow->EnableTexture( SHADER_SAMPLER0, true ); // Refraction texture
                pShaderShadow->EnableSRGBRead( SHADER_SAMPLER0, true );
                pShaderShadow->EnableTexture( SHADER_SAMPLER1, true ); // Bump
                pShaderShadow->EnableSRGBRead( SHADER_SAMPLER1, false ); // Not 
sRGB

Now, I understand that the textures are being mapped to the sampler
registers for the shaders, but where does it say which texture is
mapped to which to the register? I see that the refraction texture is
being mapped to s0, but I only know that it's the refraction texture
because of the comment. Where does it specify what texture this method
is mapping to s0?

Thanks

Adam

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

Reply via email to