1 | vertex_program BottleVS hlsl
|
---|
2 | {
|
---|
3 | source bottle.hlsl
|
---|
4 | entry_point BottleVS
|
---|
5 | target vs_2_0
|
---|
6 | }
|
---|
7 |
|
---|
8 | fragment_program BottlePS hlsl
|
---|
9 | {
|
---|
10 | source bottle.hlsl
|
---|
11 | entry_point BottlePS
|
---|
12 | target ps_3_0
|
---|
13 | }
|
---|
14 |
|
---|
15 | fragment_program BottlePhotonMapPS hlsl
|
---|
16 | {
|
---|
17 | source bottle.hlsl
|
---|
18 | entry_point BottlePhotonMapPS
|
---|
19 | target ps_3_0
|
---|
20 | }
|
---|
21 |
|
---|
22 | material bottle
|
---|
23 | {
|
---|
24 |
|
---|
25 | transparency_casts_shadows on
|
---|
26 |
|
---|
27 | technique
|
---|
28 | {
|
---|
29 | pass
|
---|
30 | {
|
---|
31 | //scene_blend alpha_blend
|
---|
32 | vertex_program_ref BottleVS
|
---|
33 | {
|
---|
34 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
35 | param_named_auto world world_matrix
|
---|
36 | param_named_auto worldIT inverse_transpose_world_matrix
|
---|
37 | }
|
---|
38 | fragment_program_ref BottlePS
|
---|
39 | {
|
---|
40 | param_named_auto cameraPos camera_position
|
---|
41 | param_named_auto lightPosition light_position 0
|
---|
42 | param_named color float3 0.65 0.4 0.2
|
---|
43 | }
|
---|
44 |
|
---|
45 | //Cube map for reflections and refractions
|
---|
46 | texture_unit
|
---|
47 | {
|
---|
48 | cubic_texture cubemap.jpg combinedUVW
|
---|
49 | tex_address_mode clamp
|
---|
50 | colour_op replace
|
---|
51 | }
|
---|
52 |
|
---|
53 | //Cube map of distances
|
---|
54 | texture_unit
|
---|
55 | {
|
---|
56 | cubic_texture cubemap.jpg combinedUVW
|
---|
57 | tex_address_mode clamp
|
---|
58 | colour_op replace
|
---|
59 | }
|
---|
60 |
|
---|
61 |
|
---|
62 |
|
---|
63 | }
|
---|
64 | }
|
---|
65 | }
|
---|
66 |
|
---|
67 |
|
---|
68 | material bottle2
|
---|
69 | {
|
---|
70 |
|
---|
71 | transparency_casts_shadows on
|
---|
72 | technique
|
---|
73 | {
|
---|
74 | pass
|
---|
75 | {
|
---|
76 | scene_blend zero src_colour
|
---|
77 | vertex_program_ref BottleVS
|
---|
78 | {
|
---|
79 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
80 | param_named_auto world world_matrix
|
---|
81 | param_named_auto worldIT inverse_transpose_world_matrix
|
---|
82 | }
|
---|
83 | fragment_program_ref BottlePS
|
---|
84 | {
|
---|
85 | param_named_auto cameraPos camera_position
|
---|
86 | param_named_auto lightPosition light_position 0
|
---|
87 | param_named color float3 0.2 0.65 0.2
|
---|
88 | }
|
---|
89 |
|
---|
90 | //Cube map for reflections and refractions
|
---|
91 | texture_unit
|
---|
92 | {
|
---|
93 | cubic_texture cubemap.jpg combinedUVW
|
---|
94 | tex_address_mode clamp
|
---|
95 | colour_op replace
|
---|
96 | }
|
---|
97 |
|
---|
98 | //Cube map of distances
|
---|
99 | texture_unit
|
---|
100 | {
|
---|
101 | cubic_texture cubemap.jpg combinedUVW
|
---|
102 | tex_address_mode clamp
|
---|
103 | colour_op replace
|
---|
104 | }
|
---|
105 |
|
---|
106 |
|
---|
107 |
|
---|
108 | }
|
---|
109 | }
|
---|
110 | }
|
---|
111 |
|
---|
112 |
|
---|
113 | material BottlePhotonMap
|
---|
114 | {
|
---|
115 | technique
|
---|
116 | {
|
---|
117 |
|
---|
118 | pass
|
---|
119 | {
|
---|
120 | vertex_program_ref BottleVS
|
---|
121 | {
|
---|
122 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
123 | param_named_auto world world_matrix
|
---|
124 | param_named_auto worldIT inverse_transpose_world_matrix
|
---|
125 | }
|
---|
126 | fragment_program_ref BottlePhotonMapPS
|
---|
127 | {
|
---|
128 | param_named_auto cameraPos camera_position
|
---|
129 | param_named lastCenter float3 0 0 0
|
---|
130 |
|
---|
131 | }
|
---|
132 |
|
---|
133 | //Cube map for reflections and refractions
|
---|
134 | texture_unit
|
---|
135 | {
|
---|
136 | cubic_texture
|
---|
137 | filtering none
|
---|
138 | //tex_address_mode clamp
|
---|
139 | }
|
---|
140 |
|
---|
141 | }
|
---|
142 | }
|
---|
143 | }
|
---|
144 |
|
---|
145 | material Bottle2PhotonMap
|
---|
146 | {
|
---|
147 | technique
|
---|
148 | {
|
---|
149 |
|
---|
150 | pass
|
---|
151 | {
|
---|
152 | vertex_program_ref BottleVS
|
---|
153 | {
|
---|
154 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
155 | param_named_auto world world_matrix
|
---|
156 | param_named_auto worldIT inverse_transpose_world_matrix
|
---|
157 | }
|
---|
158 | fragment_program_ref BottlePhotonMapPS
|
---|
159 | {
|
---|
160 | param_named_auto cameraPos camera_position
|
---|
161 | param_named lastCenter float3 0 0 0
|
---|
162 |
|
---|
163 | }
|
---|
164 |
|
---|
165 | //Cube map for reflections and refractions
|
---|
166 | texture_unit
|
---|
167 | {
|
---|
168 | cubic_texture
|
---|
169 | filtering none
|
---|
170 | //tex_address_mode clamp
|
---|
171 | }
|
---|
172 |
|
---|
173 | }
|
---|
174 | }
|
---|
175 | }
|
---|
176 |
|
---|
177 | material BottleCauMap
|
---|
178 | {
|
---|
179 | technique
|
---|
180 | {
|
---|
181 | pass
|
---|
182 |
|
---|
183 | cull_hardware none
|
---|
184 | cull_software none
|
---|
185 | lighting off
|
---|
186 | scene_blend add
|
---|
187 | scene_blend src_alpha one
|
---|
188 | depth_write off
|
---|
189 | point_sprites on
|
---|
190 |
|
---|
191 | vertex_program_ref GameTools/CauVS
|
---|
192 | {
|
---|
193 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
194 | param_named_auto worldView worldview_matrix
|
---|
195 | param_named_auto Proj projection_matrix
|
---|
196 | param_named_auto resolution viewport_width
|
---|
197 | param_named CauSpriteSize float 11.0
|
---|
198 | }
|
---|
199 | fragment_program_ref GameTools/CauPS
|
---|
200 | {
|
---|
201 | param_named CauSpriteIntens float 0.11
|
---|
202 | param_named color float3 0.65 0.4 0.2
|
---|
203 | }
|
---|
204 |
|
---|
205 | texture_unit
|
---|
206 | {
|
---|
207 | vertex_texture true
|
---|
208 | texture flare.png
|
---|
209 | }
|
---|
210 | texture_unit
|
---|
211 | {
|
---|
212 | texture PowerOfPhotonHitTexel.dds
|
---|
213 | }
|
---|
214 |
|
---|
215 | }
|
---|
216 | }
|
---|
217 | }
|
---|
218 |
|
---|
219 | material Bottle2CauMap
|
---|
220 | {
|
---|
221 | technique
|
---|
222 | {
|
---|
223 | pass
|
---|
224 |
|
---|
225 | cull_hardware none
|
---|
226 | cull_software none
|
---|
227 | lighting off
|
---|
228 | scene_blend add
|
---|
229 | scene_blend src_alpha one
|
---|
230 | depth_write off
|
---|
231 | point_sprites on
|
---|
232 |
|
---|
233 | vertex_program_ref GameTools/CauVS
|
---|
234 | {
|
---|
235 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
236 | param_named_auto worldView worldview_matrix
|
---|
237 | param_named_auto Proj projection_matrix
|
---|
238 | param_named_auto resolution viewport_width
|
---|
239 | param_named CauSpriteSize float 11.0
|
---|
240 | }
|
---|
241 | fragment_program_ref GameTools/CauPS
|
---|
242 | {
|
---|
243 | param_named CauSpriteIntens float 0.10
|
---|
244 | param_named color float3 0.2 0.65 0.2
|
---|
245 | }
|
---|
246 |
|
---|
247 | texture_unit
|
---|
248 | {
|
---|
249 | vertex_texture true
|
---|
250 | texture flare.png
|
---|
251 | }
|
---|
252 | texture_unit
|
---|
253 | {
|
---|
254 | texture PowerOfPhotonHitTexel.dds
|
---|
255 | }
|
---|
256 |
|
---|
257 | }
|
---|
258 | }
|
---|
259 | }
|
---|
260 |
|
---|