blob: d2662e6d9723d7fad29416398f9262f186a2aeef (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Run procedural glint generation inner loop in pixel shader
//
// $Header: $
// $NoKeywords: $
//===========================================================================//
#include "BaseVSShader.h"
#include "shaderlib/cshader.h"
#include "eyeglint_vs20.inc"
#include "eyeglint_ps20.inc"
#include "eyeglint_ps20b.inc"
DEFINE_FALLBACK_SHADER( EyeGlint, EyeGlint_dx9 )
BEGIN_VS_SHADER( EyeGlint_dx9, "Help for EyeGlint" )
BEGIN_SHADER_PARAMS
END_SHADER_PARAMS
SHADER_INIT
{
}
SHADER_FALLBACK
{
if ( g_pHardwareConfig->GetDXSupportLevel() < 90 )
{
return "Wireframe";
}
return 0;
}
SHADER_DRAW
{
SHADOW_STATE
{
pShaderShadow->EnableDepthWrites( false );
pShaderShadow->EnableBlending( true );
pShaderShadow->BlendFunc( SHADER_BLEND_ONE, SHADER_BLEND_ONE ); // Additive blending
int pTexCoords[3] = { 2, 2, 3 };
pShaderShadow->VertexShaderVertexFormat( VERTEX_POSITION, 3, pTexCoords, 0 );
pShaderShadow->EnableCulling( false );
pShaderShadow->EnableSRGBWrite( false ); // linear texture
DECLARE_STATIC_VERTEX_SHADER( eyeglint_vs20 );
SET_STATIC_VERTEX_SHADER( eyeglint_vs20 );
SET_STATIC_PS2X_PIXEL_SHADER_NO_COMBOS( eyeglint );
}
DYNAMIC_STATE
{
DECLARE_DYNAMIC_VERTEX_SHADER( eyeglint_vs20 );
SET_DYNAMIC_VERTEX_SHADER( eyeglint_vs20 );
SET_DYNAMIC_PS2X_PIXEL_SHADER_NO_COMBOS( eyeglint );
}
Draw();
}
END_SHADER
|