1 | vertex_program DefaultVS hlsl
|
---|
2 | {
|
---|
3 | source MetalTeapot.hlsl
|
---|
4 | entry_point DefaultVS
|
---|
5 | target vs_2_0
|
---|
6 | }
|
---|
7 |
|
---|
8 | fragment_program Metal1BouncePS hlsl
|
---|
9 | {
|
---|
10 | source MetalTeapot.hlsl
|
---|
11 | entry_point Metal1BouncePS
|
---|
12 | target ps_3_0
|
---|
13 | }
|
---|
14 |
|
---|
15 | material MetalTeapot
|
---|
16 | {
|
---|
17 | technique
|
---|
18 | {
|
---|
19 | pass
|
---|
20 | {
|
---|
21 | IllumTechniques
|
---|
22 | {
|
---|
23 | RenderTechnique ColorCubeMap
|
---|
24 | {
|
---|
25 | update_interval 0
|
---|
26 | distance_calc false
|
---|
27 | face_angle_calc false
|
---|
28 | }
|
---|
29 | RenderTechnique DistanceCubeMap
|
---|
30 | {
|
---|
31 | update_interval 0
|
---|
32 | distance_calc true false
|
---|
33 | face_angle_calc true false
|
---|
34 | }
|
---|
35 |
|
---|
36 | }
|
---|
37 | vertex_program_ref DefaultVS
|
---|
38 | {
|
---|
39 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
40 | param_named_auto world world_matrix
|
---|
41 | param_named_auto worldview worldview_matrix
|
---|
42 | param_named_auto worldI inverse_world_matrix
|
---|
43 | }
|
---|
44 | fragment_program_ref Metal1BouncePS
|
---|
45 | {
|
---|
46 | param_named_auto cameraPos camera_position
|
---|
47 | //param_named n float3 0.21 0.96 1.17
|
---|
48 | //param_named k float3 4.16 2.57 2.32
|
---|
49 | param_named F0 float3 0.95 0.63 0.54
|
---|
50 | }
|
---|
51 |
|
---|
52 | //Cube map for reflections and refractions
|
---|
53 | texture_unit
|
---|
54 | {
|
---|
55 |
|
---|
56 | }
|
---|
57 |
|
---|
58 | //Cube map of distances
|
---|
59 | texture_unit
|
---|
60 | {
|
---|
61 |
|
---|
62 | }
|
---|
63 | }
|
---|
64 | }
|
---|
65 | }
|
---|
66 |
|
---|
67 | fragment_program NormalDistancePS hlsl
|
---|
68 | {
|
---|
69 | source MetalTeapot.hlsl
|
---|
70 | entry_point NormalDistancePS
|
---|
71 | target ps_3_0
|
---|
72 | }
|
---|
73 |
|
---|
74 | material NormalDistanceCW
|
---|
75 | {
|
---|
76 | technique
|
---|
77 | {
|
---|
78 | pass
|
---|
79 | {
|
---|
80 | cull_hardware clockwise
|
---|
81 |
|
---|
82 | vertex_program_ref DefaultVS
|
---|
83 | {
|
---|
84 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
85 | param_named_auto world world_matrix
|
---|
86 | param_named_auto worldview worldview_matrix
|
---|
87 | param_named_auto worldI inverse_world_matrix
|
---|
88 | }
|
---|
89 | fragment_program_ref NormalDistancePS
|
---|
90 | {
|
---|
91 | param_named refIndex float 200
|
---|
92 | }
|
---|
93 | }
|
---|
94 | }
|
---|
95 | }
|
---|
96 |
|
---|
97 | material NormalDistanceCCW
|
---|
98 | {
|
---|
99 | technique
|
---|
100 | {
|
---|
101 | pass
|
---|
102 | {
|
---|
103 | cull_hardware anticlockwise
|
---|
104 | vertex_program_ref DefaultVS
|
---|
105 | {
|
---|
106 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
107 | param_named_auto world world_matrix
|
---|
108 | param_named_auto worldview worldview_matrix
|
---|
109 | param_named_auto worldI inverse_world_matrix
|
---|
110 | }
|
---|
111 | fragment_program_ref NormalDistancePS
|
---|
112 | {
|
---|
113 | param_named refIndex float 200
|
---|
114 | }
|
---|
115 | }
|
---|
116 | }
|
---|
117 | }
|
---|
118 |
|
---|
119 | fragment_program DistanceMinMaxPS hlsl
|
---|
120 | {
|
---|
121 | source MetalTeapot.hlsl
|
---|
122 | entry_point DistanceMinMaxPS
|
---|
123 | target ps_3_0
|
---|
124 | }
|
---|
125 |
|
---|
126 | material DistanceMinMaxCW
|
---|
127 | {
|
---|
128 | technique
|
---|
129 | {
|
---|
130 | pass
|
---|
131 | {
|
---|
132 | cull_hardware clockwise
|
---|
133 | scene_blend max
|
---|
134 | depth_test off
|
---|
135 |
|
---|
136 | vertex_program_ref DefaultVS
|
---|
137 | {
|
---|
138 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
139 | param_named_auto world world_matrix
|
---|
140 | param_named_auto worldview worldview_matrix
|
---|
141 | param_named_auto worldI inverse_world_matrix
|
---|
142 | }
|
---|
143 | fragment_program_ref DistanceMinMaxPS
|
---|
144 | {
|
---|
145 | }
|
---|
146 | }
|
---|
147 | }
|
---|
148 | }
|
---|
149 |
|
---|
150 | material DistanceMinMaxCCW
|
---|
151 | {
|
---|
152 | technique
|
---|
153 | {
|
---|
154 | pass
|
---|
155 | {
|
---|
156 | cull_hardware anticlockwise
|
---|
157 | scene_blend max
|
---|
158 | depth_test off
|
---|
159 |
|
---|
160 | vertex_program_ref DefaultVS
|
---|
161 | {
|
---|
162 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
163 | param_named_auto world world_matrix
|
---|
164 | param_named_auto worldview worldview_matrix
|
---|
165 | param_named_auto worldI inverse_world_matrix
|
---|
166 | }
|
---|
167 | fragment_program_ref DistanceMinMaxPS
|
---|
168 | {
|
---|
169 | }
|
---|
170 | }
|
---|
171 | }
|
---|
172 | }
|
---|
173 |
|
---|
174 | fragment_program MetalMultipleBouncePS hlsl
|
---|
175 | {
|
---|
176 | //source MetalTeapot.hlsl
|
---|
177 | //entry_point MetalMultipleBouncePS
|
---|
178 | source MetalTeapotNew.hlsl
|
---|
179 | entry_point mainPS
|
---|
180 |
|
---|
181 | target ps_3_0
|
---|
182 | flow_control prefer
|
---|
183 | }
|
---|
184 |
|
---|
185 | material MetalTeapotMultipleBounce
|
---|
186 | {
|
---|
187 | technique
|
---|
188 | {
|
---|
189 | pass
|
---|
190 | {
|
---|
191 | //cull_hardware none
|
---|
192 | IllumTechniques
|
---|
193 | {
|
---|
194 | RenderTechnique ColorCubeMap
|
---|
195 | {
|
---|
196 | resolution 1024
|
---|
197 | update_interval 0
|
---|
198 | distance_calc false
|
---|
199 | face_angle_calc false
|
---|
200 | update_all_face true
|
---|
201 | }
|
---|
202 | RenderTechnique DistanceCubeMap
|
---|
203 | {
|
---|
204 | resolution 1024
|
---|
205 | update_interval 0
|
---|
206 | get_minmax true
|
---|
207 | min_var_name min
|
---|
208 | distance_calc false
|
---|
209 | face_angle_calc false
|
---|
210 | update_all_face true
|
---|
211 | }
|
---|
212 | RenderTechnique ColorCubeMap
|
---|
213 | {
|
---|
214 | resolution 1024
|
---|
215 | layer 1
|
---|
216 | texture_unit_id 2
|
---|
217 | get_minmax true
|
---|
218 | min_var_name min1
|
---|
219 | update_interval 0
|
---|
220 | distance_calc false
|
---|
221 | face_angle_calc false
|
---|
222 | update_all_face true
|
---|
223 | render_env false
|
---|
224 | render_self true
|
---|
225 | self_material NormalDistanceCCW
|
---|
226 | }
|
---|
227 | RenderTechnique ColorCubeMap
|
---|
228 | {
|
---|
229 | resolution 1024
|
---|
230 | layer 2
|
---|
231 | texture_unit_id 3
|
---|
232 | get_minmax true
|
---|
233 | min_var_name min2
|
---|
234 | update_interval 0
|
---|
235 | distance_calc false
|
---|
236 | face_angle_calc false
|
---|
237 | update_all_face true
|
---|
238 | render_env false
|
---|
239 | render_self true
|
---|
240 | self_material NormalDistanceCW
|
---|
241 | }
|
---|
242 | }
|
---|
243 | vertex_program_ref DefaultVS
|
---|
244 | {
|
---|
245 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
246 | param_named_auto world world_matrix
|
---|
247 | param_named_auto worldview worldview_matrix
|
---|
248 | param_named_auto worldI inverse_world_matrix
|
---|
249 |
|
---|
250 | }
|
---|
251 | fragment_program_ref MetalMultipleBouncePS
|
---|
252 | {
|
---|
253 | param_named_auto cameraPos camera_position
|
---|
254 | //param_named n float3 0.21 0.96 1.17
|
---|
255 | //param_named k float3 4.16 2.57 2.32
|
---|
256 | param_named F0 float3 0.95 0.95 0.95
|
---|
257 | param_named SingleBounce float 0.0
|
---|
258 | param_named refIndex float 0.6667
|
---|
259 | }
|
---|
260 |
|
---|
261 | //Cube map of environment
|
---|
262 | texture_unit
|
---|
263 | {
|
---|
264 | //filtering none
|
---|
265 | }
|
---|
266 | //Cube map of environment distances
|
---|
267 | texture_unit
|
---|
268 | {
|
---|
269 | filtering none
|
---|
270 | }
|
---|
271 |
|
---|
272 | //Cube map of reflective object's normals and distances CCW
|
---|
273 | texture_unit
|
---|
274 | {
|
---|
275 | filtering none
|
---|
276 | }
|
---|
277 |
|
---|
278 | //Cube map of reflective object's normals and distances CW
|
---|
279 | texture_unit
|
---|
280 | {
|
---|
281 | filtering none
|
---|
282 | }
|
---|
283 | }
|
---|
284 | }
|
---|
285 | } |
---|