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.
This commit is contained in:
Joe Ludwig
2013-12-23 14:58:45 -08:00
parent 9c37fcc3a8
commit 7309a5f13f
710 changed files with 74048 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
// ======= Copyright © 1996-2007, Valve Corporation, All rights reserved. ======
//
// Run procedural glint generation inner loop in pixel shader (ps_2_0)
//
// =============================================================================
struct PS_INPUT
{
float2 tc : TEXCOORD0; // Interpolated coordinate of current texel
float2 glintCenter : TEXCOORD1; // Uniform value containing center of glint
float3 glintColor : TEXCOORD2; // Uniform value of color of glint
};
float GlintGaussSpotCoefficient( float2 d )
{
return saturate( exp( -25.0f * dot(d, d) ) );
}
float4 main( PS_INPUT i ) : COLOR
{
float2 uv = i.tc - i.glintCenter; // This texel relative to glint center
float intensity = GlintGaussSpotCoefficient( uv + float2(-0.25f, -0.25f) ) +
GlintGaussSpotCoefficient( uv + float2( 0.25f, -0.25f) ) +
5 * GlintGaussSpotCoefficient( uv ) +
GlintGaussSpotCoefficient( uv + float2(-0.25f, 0.25f) ) +
GlintGaussSpotCoefficient( uv + float2( 0.25f, 0.25f) );
intensity *= 4.0f/9.0f;
return float4( intensity * i.glintColor, 1.0f );
}