From 55ed12f8d1eb6887d348be03aee5573d44177ffb Mon Sep 17 00:00:00 2001 From: Michael Sartain Date: Thu, 2 Oct 2014 08:25:55 -0700 Subject: Updated the SDK with the latest code from the TF and HL2 branches. --- .../stdshaders/LightmappedGeneric_Decal.psh | 94 +++++++++++----------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'mp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh') diff --git a/mp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh b/mp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh index 86e627e5..01984202 100644 --- a/mp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh +++ b/mp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh @@ -1,47 +1,47 @@ -ps.1.1 - -;------------------------------------------------------------------------------ -; Computes the diffuse component of lighting using lightmap + bumpmap -; t0 - decal texture -; t1 - Lightmap1 -; t2 - Lightmap2 -; t3 - Lightmap3 -; -; The texture coordinates need to be defined as follows: -; tc0 - Normalmap and lightmap texture coordinates -; c0, c1, c2 - ( ( N dot basis[0] )^2 ), ( ( N dot basis[1] )^2 ), ( ( N dot basis[2] )^2 ) -;------------------------------------------------------------------------------ - -; Get the decal color -tex t0 - -; Sample the lightmaps -tex t1 -tex t2 -tex t3 - -; output = lightmapColor[0] * ( ( N dot basis[0] )^2 ) + -; lightmapColor[1] * ( ( N dot basis[1] )^2 ) + -; lightmapColor[2] * ( ( N dot basis[2] )^2 ) + - -; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) -mul r0, t1, c0 - -; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) + lightmapColor[1] * ( ( N dot basis[1] )^2 ) -mad r0, t2, c1, r0 - -; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) + -; lightmapColor[1] * ( ( N dot basis[1] )^2 ) + -; lightmapColor[2] * ( ( N dot basis[2] )^2 ) -mad r0, t3, c2, r0 - -; Modulate by decal texture -mul r0.rgb, r0, t0 -+ mov r0.a, t0.a - -; Modulate by constant color -mul r0, r0, c3 - -; Modulate by per-vertex factor -mul r0, r0, v0 - +ps.1.1 + +;------------------------------------------------------------------------------ +; Computes the diffuse component of lighting using lightmap + bumpmap +; t0 - decal texture +; t1 - Lightmap1 +; t2 - Lightmap2 +; t3 - Lightmap3 +; +; The texture coordinates need to be defined as follows: +; tc0 - Normalmap and lightmap texture coordinates +; c0, c1, c2 - ( ( N dot basis[0] )^2 ), ( ( N dot basis[1] )^2 ), ( ( N dot basis[2] )^2 ) +;------------------------------------------------------------------------------ + +; Get the decal color +tex t0 + +; Sample the lightmaps +tex t1 +tex t2 +tex t3 + +; output = lightmapColor[0] * ( ( N dot basis[0] )^2 ) + +; lightmapColor[1] * ( ( N dot basis[1] )^2 ) + +; lightmapColor[2] * ( ( N dot basis[2] )^2 ) + + +; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) +mul r0, t1, c0 + +; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) + lightmapColor[1] * ( ( N dot basis[1] )^2 ) +mad r0, t2, c1, r0 + +; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) + +; lightmapColor[1] * ( ( N dot basis[1] )^2 ) + +; lightmapColor[2] * ( ( N dot basis[2] )^2 ) +mad r0, t3, c2, r0 + +; Modulate by decal texture +mul r0.rgb, r0, t0 ++ mov r0.a, t0.a + +; Modulate by constant color +mul r0, r0, c3 + +; Modulate by per-vertex factor +mul r0, r0, v0 + -- cgit v1.2.3