1 | material GameTools/PhotonMapCaustic
|
---|
2 | {
|
---|
3 | technique
|
---|
4 | {
|
---|
5 |
|
---|
6 | pass
|
---|
7 | {
|
---|
8 | vertex_program_ref GameTools/CubeMap/VertexPrograms/LocalizedVS
|
---|
9 | {
|
---|
10 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
11 | param_named_auto world world_matrix
|
---|
12 | param_named_auto worldIT inverse_transpose_world_matrix
|
---|
13 | }
|
---|
14 | fragment_program_ref GameTools/PhotonMapCausticPS
|
---|
15 | {
|
---|
16 | param_named_auto cameraPos camera_position
|
---|
17 | param_named lastCenter float3 0 0 0
|
---|
18 | }
|
---|
19 |
|
---|
20 | //distanec cubemap
|
---|
21 | texture_unit
|
---|
22 | {
|
---|
23 | cubic_texture
|
---|
24 | filtering none
|
---|
25 | }
|
---|
26 |
|
---|
27 | }
|
---|
28 | }
|
---|
29 | }
|
---|
30 |
|
---|
31 | material GameTools/Cau
|
---|
32 | {
|
---|
33 | technique
|
---|
34 | {
|
---|
35 | pass
|
---|
36 | {
|
---|
37 | cull_hardware none
|
---|
38 | cull_software none
|
---|
39 | lighting off
|
---|
40 | //scene_blend add
|
---|
41 | scene_blend src_alpha one
|
---|
42 | depth_write off
|
---|
43 | point_sprites on
|
---|
44 |
|
---|
45 | vertex_program_ref GameTools/CauVS
|
---|
46 | {
|
---|
47 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
48 | param_named_auto worldView worldview_matrix
|
---|
49 | param_named_auto Proj projection_matrix
|
---|
50 | param_named_auto resolution viewport_width
|
---|
51 | //param_named CauSpriteSize float 10.0
|
---|
52 | param_named CauSpriteSize float 20.0
|
---|
53 | }
|
---|
54 | fragment_program_ref GameTools/CauPS
|
---|
55 | {
|
---|
56 | param_named CauSpriteIntens float 0.15
|
---|
57 | param_named color float3 0.7 0.7 0.5
|
---|
58 | }
|
---|
59 |
|
---|
60 | texture_unit
|
---|
61 | {
|
---|
62 | vertex_texture true
|
---|
63 | texture flare.png
|
---|
64 | }
|
---|
65 | texture_unit
|
---|
66 | {
|
---|
67 | texture PowerOfPhotonHitTexel.dds
|
---|
68 | }
|
---|
69 |
|
---|
70 | }
|
---|
71 | }
|
---|
72 | }
|
---|
73 |
|
---|
74 | vertex_program GameTools/CauTriVS hlsl
|
---|
75 | {
|
---|
76 | source GameTools_CauCube.hlsl
|
---|
77 | entry_point CauVS
|
---|
78 | target vs_3_0
|
---|
79 | }
|
---|
80 |
|
---|
81 | fragment_program GameTools/CauTriPS hlsl
|
---|
82 | {
|
---|
83 | source GameTools_CauCube.hlsl
|
---|
84 | entry_point CauPS
|
---|
85 | target ps_2_0
|
---|
86 |
|
---|
87 | }
|
---|
88 | material GameTools/CauTri
|
---|
89 | {
|
---|
90 | technique
|
---|
91 | {
|
---|
92 | pass
|
---|
93 | {
|
---|
94 | cull_hardware none
|
---|
95 | cull_software none
|
---|
96 | lighting off
|
---|
97 | //scene_blend add
|
---|
98 | scene_blend src_alpha one
|
---|
99 | depth_write off
|
---|
100 |
|
---|
101 | vertex_program_ref GameTools/CauTriVS
|
---|
102 | {
|
---|
103 | param_named_auto worldView worldview_matrix
|
---|
104 | param_named_auto Proj projection_matrix
|
---|
105 | param_named_auto resolution viewport_width
|
---|
106 | }
|
---|
107 | fragment_program_ref GameTools/CauTriPS
|
---|
108 | {
|
---|
109 | param_named color float3 0.7 0.7 0.5
|
---|
110 | }
|
---|
111 |
|
---|
112 | texture_unit
|
---|
113 | {
|
---|
114 | vertex_texture true
|
---|
115 | }
|
---|
116 | }
|
---|
117 | }
|
---|
118 | }
|
---|
119 |
|
---|
120 |
|
---|
121 | material GameTools/CausticGlass
|
---|
122 | {
|
---|
123 |
|
---|
124 | technique
|
---|
125 | {
|
---|
126 |
|
---|
127 | pass
|
---|
128 | {
|
---|
129 | IllumTechniques
|
---|
130 | {
|
---|
131 | RenderTechnique ColorCubeMap
|
---|
132 | {
|
---|
133 | update_interval 0
|
---|
134 | update_all_face true
|
---|
135 | distance_calc true 3.5
|
---|
136 | }
|
---|
137 | RenderTechnique DistanceCubeMap
|
---|
138 | {
|
---|
139 | update_interval 0
|
---|
140 | update_all_face true
|
---|
141 | distance_calc true 3.5
|
---|
142 | }
|
---|
143 | RenderTechnique CausticCaster
|
---|
144 | {
|
---|
145 | attenuation 0
|
---|
146 | photonmap_resolution 32
|
---|
147 | caustic_cubemap_resolution 256
|
---|
148 | caustic_map_material GameTools/CauTri
|
---|
149 | use_triangles true
|
---|
150 | blur_caustic_cubemap true
|
---|
151 | }
|
---|
152 |
|
---|
153 | }
|
---|
154 |
|
---|
155 |
|
---|
156 | vertex_program_ref GameTools/CubeMap/VertexPrograms/LocalizedVS
|
---|
157 | {
|
---|
158 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
159 | param_named_auto world world_matrix
|
---|
160 | }
|
---|
161 | fragment_program_ref GameTools/CubeMap/FragmentPrograms/LocalizedPS
|
---|
162 | {
|
---|
163 | param_named_auto cameraPos camera_position
|
---|
164 | param_named_auto lightPosition light_position 0
|
---|
165 | }
|
---|
166 |
|
---|
167 | //Cube map for reflections and refractions
|
---|
168 | texture_unit
|
---|
169 | {
|
---|
170 | cubic_texture cubemap.jpg combinedUVW
|
---|
171 | tex_address_mode clamp
|
---|
172 | colour_op replace
|
---|
173 | }
|
---|
174 |
|
---|
175 | //Cube map of distances
|
---|
176 | texture_unit
|
---|
177 | {
|
---|
178 | cubic_texture cubemap.jpg combinedUVW
|
---|
179 | tex_address_mode clamp
|
---|
180 | colour_op replace
|
---|
181 | }
|
---|
182 |
|
---|
183 |
|
---|
184 | }
|
---|
185 | }
|
---|
186 | } |
---|