diff options
| author | Joe Ludwig <[email protected]> | 2013-12-23 14:58:45 -0800 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-12-23 15:00:03 -0800 |
| commit | 7309a5f13f63fdcc7b1e090f6c176113a9d95061 (patch) | |
| tree | ad65c7fbe46a3c70bdc0a1426e88247ce1b0d7f5 /mp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmap_NoLighting_ps14.vsh | |
| parent | Merge pull request #182 from ardneran/master (diff) | |
| download | source-sdk-2013-7309a5f13f63fdcc7b1e090f6c176113a9d95061.tar.xz source-sdk-2013-7309a5f13f63fdcc7b1e090f6c176113a9d95061.zip | |
Added many shader source files
This should include the latest version of every shader that was in the
2007 SDK. It also includes a smattering of debug shaders, both VR
distortion shaders, and other assorted shaders that will hopefully be
useful.
None of these new files are included in the game shader DLL project. If
you need to modify one of these shaders for use in your mod you will
need to rename it so that you don't collide with the version of that
shader that lives in stdshader_dx9.dll.
Diffstat (limited to 'mp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmap_NoLighting_ps14.vsh')
| -rw-r--r-- | mp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmap_NoLighting_ps14.vsh | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/mp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmap_NoLighting_ps14.vsh b/mp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmap_NoLighting_ps14.vsh new file mode 100644 index 00000000..2ac66164 --- /dev/null +++ b/mp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmap_NoLighting_ps14.vsh @@ -0,0 +1,90 @@ +vs.1.1 + +# DYNAMIC: "DOWATERFOG" "0..1" +# DYNAMIC: "SKINNING" "0..1" + +;------------------------------------------------------------------------------ +; Shader specific constant: +; $SHADER_SPECIFIC_CONST_5 = [sOffset, tOffset, 0, 0] +;------------------------------------------------------------------------------ + +#include "macros.vsh" + +;------------------------------------------------------------------------------ +; Vertex blending +;------------------------------------------------------------------------------ + +&AllocateRegister( \$worldPos ); +&AllocateRegister( \$worldNormal ); +&AllocateRegister( \$worldTangentS ); +&AllocateRegister( \$worldTangentT ); + +&SkinPositionNormalAndTangentSpace( $worldPos, $worldNormal, + $worldTangentS, $worldTangentT ); + +;------------------------------------------------------------------------------ +; Transform the position from world to proj space +;------------------------------------------------------------------------------ + +&AllocateRegister( \$projPos ); + +dp4 $projPos.x, $worldPos, $cViewProj0 +dp4 $projPos.y, $worldPos, $cViewProj1 +dp4 $projPos.z, $worldPos, $cViewProj2 +dp4 $projPos.w, $worldPos, $cViewProj3 +mov oPos, $projPos + +;------------------------------------------------------------------------------ +; Fog +;------------------------------------------------------------------------------ +&CalcFog( $worldPos, $projPos ); + +&FreeRegister( \$projPos ); + +;------------------------------------------------------------------------------ +; Lighting +;------------------------------------------------------------------------------ + +; Transform tangent space basis vectors to env map space (world space) +; This will produce a set of vectors mapping from tangent space to env space +; We'll use this to transform normals from the normal map from tangent space +; to environment map space. +; NOTE: use dp3 here since the basis vectors are vectors, not points + +; svect +mov oT1.x, $worldTangentS.x +mov oT2.x, $worldTangentS.y +mov oT3.x, $worldTangentS.z +&FreeRegister( \$worldTangentS ); + +; tvect +mov oT1.y, $worldTangentT.x +mov oT2.y, $worldTangentT.y +mov oT3.y, $worldTangentT.z +&FreeRegister( \$worldTangentT ); + +; normal +mov oT1.z, $worldNormal.x +mov oT2.z, $worldNormal.y +mov oT3.z, $worldNormal.z + +&FreeRegister( \$worldNormal ); + +; Compute the vector from vertex to camera +&AllocateRegister( \$eyeVector ); +sub $eyeVector.xyz, $cEyePos, $worldPos + +&FreeRegister( \$worldPos ); + +; eye vector +mov oT4.xyz, $eyeVector + +&FreeRegister( \$eyeVector ); + +;------------------------------------------------------------------------------ +; Texture coordinates +;------------------------------------------------------------------------------ +dp4 oT0.x, $vTexCoord0, $SHADER_SPECIFIC_CONST_4 +dp4 oT0.y, $vTexCoord0, $SHADER_SPECIFIC_CONST_5 + + |