summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/fxctmp9_360/engine_post_ps20b.inc
blob: 01f0723721c6c94af8d35f785b006d02cfad32ae (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
#include "shaderlib/cshader.h"
class engine_post_ps20b_Static_Index
{
private:
	int m_nCONVERT_TO_SRGB;
#ifdef _DEBUG
	bool m_bCONVERT_TO_SRGB;
#endif
public:
	void SetCONVERT_TO_SRGB( int i )
	{
		Assert( i >= 0 && i <= 0 );
		m_nCONVERT_TO_SRGB = i;
#ifdef _DEBUG
		m_bCONVERT_TO_SRGB = true;
#endif
	}
	void SetCONVERT_TO_SRGB( bool i )
	{
		m_nCONVERT_TO_SRGB = i ? 1 : 0;
#ifdef _DEBUG
		m_bCONVERT_TO_SRGB = true;
#endif
	}
private:
	int m_nLINEAR_INPUT;
#ifdef _DEBUG
	bool m_bLINEAR_INPUT;
#endif
public:
	void SetLINEAR_INPUT( int i )
	{
		Assert( i >= 0 && i <= 1 );
		m_nLINEAR_INPUT = i;
#ifdef _DEBUG
		m_bLINEAR_INPUT = true;
#endif
	}
	void SetLINEAR_INPUT( bool i )
	{
		m_nLINEAR_INPUT = i ? 1 : 0;
#ifdef _DEBUG
		m_bLINEAR_INPUT = true;
#endif
	}
private:
	int m_nLINEAR_OUTPUT;
#ifdef _DEBUG
	bool m_bLINEAR_OUTPUT;
#endif
public:
	void SetLINEAR_OUTPUT( int i )
	{
		Assert( i >= 0 && i <= 1 );
		m_nLINEAR_OUTPUT = i;
#ifdef _DEBUG
		m_bLINEAR_OUTPUT = true;
#endif
	}
	void SetLINEAR_OUTPUT( bool i )
	{
		m_nLINEAR_OUTPUT = i ? 1 : 0;
#ifdef _DEBUG
		m_bLINEAR_OUTPUT = true;
#endif
	}
public:
	engine_post_ps20b_Static_Index( )
	{
#ifdef _DEBUG
		m_bCONVERT_TO_SRGB = true;
#endif // _DEBUG
		m_nCONVERT_TO_SRGB =  0;
#ifdef _DEBUG
		m_bLINEAR_INPUT = false;
#endif // _DEBUG
		m_nLINEAR_INPUT = 0;
#ifdef _DEBUG
		m_bLINEAR_OUTPUT = false;
#endif // _DEBUG
		m_nLINEAR_OUTPUT = 0;
	}
	int GetIndex()
	{
		// Asserts to make sure that we aren't using any skipped combinations.
		// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
		bool bAllStaticVarsDefined = m_bCONVERT_TO_SRGB && m_bLINEAR_INPUT && m_bLINEAR_OUTPUT;
		Assert( bAllStaticVarsDefined );
#endif // _DEBUG
		return ( 40 * m_nCONVERT_TO_SRGB ) + ( 40 * m_nLINEAR_INPUT ) + ( 80 * m_nLINEAR_OUTPUT ) + 0;
	}
};
#define shaderStaticTest_engine_post_ps20b psh_forgot_to_set_static_LINEAR_INPUT + psh_forgot_to_set_static_LINEAR_OUTPUT + 0
class engine_post_ps20b_Dynamic_Index
{
private:
	int m_nAA_ENABLE;
#ifdef _DEBUG
	bool m_bAA_ENABLE;
#endif
public:
	void SetAA_ENABLE( int i )
	{
		Assert( i >= 0 && i <= 1 );
		m_nAA_ENABLE = i;
#ifdef _DEBUG
		m_bAA_ENABLE = true;
#endif
	}
	void SetAA_ENABLE( bool i )
	{
		m_nAA_ENABLE = i ? 1 : 0;
#ifdef _DEBUG
		m_bAA_ENABLE = true;
#endif
	}
private:
	int m_nAA_QUALITY_MODE;
#ifdef _DEBUG
	bool m_bAA_QUALITY_MODE;
#endif
public:
	void SetAA_QUALITY_MODE( int i )
	{
		Assert( i >= 0 && i <= 1 );
		m_nAA_QUALITY_MODE = i;
#ifdef _DEBUG
		m_bAA_QUALITY_MODE = true;
#endif
	}
	void SetAA_QUALITY_MODE( bool i )
	{
		m_nAA_QUALITY_MODE = i ? 1 : 0;
#ifdef _DEBUG
		m_bAA_QUALITY_MODE = true;
#endif
	}
private:
	int m_nAA_REDUCE_ONE_PIXEL_LINE_BLUR;
#ifdef _DEBUG
	bool m_bAA_REDUCE_ONE_PIXEL_LINE_BLUR;
#endif
public:
	void SetAA_REDUCE_ONE_PIXEL_LINE_BLUR( int i )
	{
		Assert( i >= 0 && i <= 1 );
		m_nAA_REDUCE_ONE_PIXEL_LINE_BLUR = i;
#ifdef _DEBUG
		m_bAA_REDUCE_ONE_PIXEL_LINE_BLUR = true;
#endif
	}
	void SetAA_REDUCE_ONE_PIXEL_LINE_BLUR( bool i )
	{
		m_nAA_REDUCE_ONE_PIXEL_LINE_BLUR = i ? 1 : 0;
#ifdef _DEBUG
		m_bAA_REDUCE_ONE_PIXEL_LINE_BLUR = true;
#endif
	}
private:
	int m_nCOL_CORRECT_NUM_LOOKUPS;
#ifdef _DEBUG
	bool m_bCOL_CORRECT_NUM_LOOKUPS;
#endif
public:
	void SetCOL_CORRECT_NUM_LOOKUPS( int i )
	{
		Assert( i >= 0 && i <= 4 );
		m_nCOL_CORRECT_NUM_LOOKUPS = i;
#ifdef _DEBUG
		m_bCOL_CORRECT_NUM_LOOKUPS = true;
#endif
	}
	void SetCOL_CORRECT_NUM_LOOKUPS( bool i )
	{
		m_nCOL_CORRECT_NUM_LOOKUPS = i ? 1 : 0;
#ifdef _DEBUG
		m_bCOL_CORRECT_NUM_LOOKUPS = true;
#endif
	}
public:
	engine_post_ps20b_Dynamic_Index()
	{
#ifdef _DEBUG
		m_bAA_ENABLE = false;
#endif // _DEBUG
		m_nAA_ENABLE = 0;
#ifdef _DEBUG
		m_bAA_QUALITY_MODE = false;
#endif // _DEBUG
		m_nAA_QUALITY_MODE = 0;
#ifdef _DEBUG
		m_bAA_REDUCE_ONE_PIXEL_LINE_BLUR = false;
#endif // _DEBUG
		m_nAA_REDUCE_ONE_PIXEL_LINE_BLUR = 0;
#ifdef _DEBUG
		m_bCOL_CORRECT_NUM_LOOKUPS = false;
#endif // _DEBUG
		m_nCOL_CORRECT_NUM_LOOKUPS = 0;
	}
	int GetIndex()
	{
		// Asserts to make sure that we aren't using any skipped combinations.
		// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
		bool bAllDynamicVarsDefined = m_bAA_ENABLE && m_bAA_QUALITY_MODE && m_bAA_REDUCE_ONE_PIXEL_LINE_BLUR && m_bCOL_CORRECT_NUM_LOOKUPS;
		Assert( bAllDynamicVarsDefined );
#endif // _DEBUG
		return ( 1 * m_nAA_ENABLE ) + ( 2 * m_nAA_QUALITY_MODE ) + ( 4 * m_nAA_REDUCE_ONE_PIXEL_LINE_BLUR ) + ( 8 * m_nCOL_CORRECT_NUM_LOOKUPS ) + 0;
	}
};
#define shaderDynamicTest_engine_post_ps20b psh_forgot_to_set_dynamic_AA_ENABLE + psh_forgot_to_set_dynamic_AA_QUALITY_MODE + psh_forgot_to_set_dynamic_AA_REDUCE_ONE_PIXEL_LINE_BLUR + psh_forgot_to_set_dynamic_COL_CORRECT_NUM_LOOKUPS + 0