1 | fragment_program GTP/MultiBounce/PhotonMap_PS hlsl
|
---|
2 | {
|
---|
3 |
|
---|
4 | source GTPMultipleReflection.hlsl
|
---|
5 | entry_point MultipleRefractionPhotonMap_PS
|
---|
6 | target ps_3_0
|
---|
7 | flow_control prefer
|
---|
8 | }
|
---|
9 |
|
---|
10 | material GTP/MultiBounce/PhotonMap
|
---|
11 | {
|
---|
12 | technique
|
---|
13 | {
|
---|
14 | pass
|
---|
15 | {
|
---|
16 | vertex_program_ref GTP/Basic/Shaded_VS
|
---|
17 | {
|
---|
18 | param_named_auto WorldViewProj worldviewproj_matrix
|
---|
19 | param_named_auto World world_matrix
|
---|
20 | param_named_auto WorldInv inverse_world_matrix
|
---|
21 | }
|
---|
22 | fragment_program_ref GTP/MultiBounce/PhotonMap_PS
|
---|
23 | {
|
---|
24 | param_named_auto cameraPos camera_position
|
---|
25 | param_named lastCenter float3 0 0 0
|
---|
26 | param_named refIndex float 0.995
|
---|
27 | }
|
---|
28 | //cubemap of distances
|
---|
29 | texture_unit
|
---|
30 | {
|
---|
31 |
|
---|
32 | }
|
---|
33 | texture_unit
|
---|
34 | {
|
---|
35 | texture object_SE_0_COLORCUBEMAP_L1
|
---|
36 | }
|
---|
37 | texture_unit
|
---|
38 | {
|
---|
39 | texture object_SE_0_COLORCUBEMAP_L2
|
---|
40 | }
|
---|
41 | }
|
---|
42 | }
|
---|
43 | }
|
---|
44 |
|
---|
45 | material GTP/MultiBounce/CauCube_Triangles
|
---|
46 | {
|
---|
47 | technique
|
---|
48 | {
|
---|
49 | pass
|
---|
50 | {
|
---|
51 | cull_hardware none
|
---|
52 | cull_software none
|
---|
53 | scene_blend src_alpha one
|
---|
54 | depth_check off
|
---|
55 | vertex_program_ref GTP/Caustic/CauCube_Triangles_VS
|
---|
56 | {
|
---|
57 | param_named_auto WorldView worldview_matrix
|
---|
58 | param_named_auto Proj projection_matrix
|
---|
59 | param_named PhotonMapResolution float 64
|
---|
60 | param_named WorldSize float 0.002
|
---|
61 | }
|
---|
62 | fragment_program_ref GTP/Caustic/CauCube_Triangles_PS
|
---|
63 | {
|
---|
64 | param_named CausticColor float4 1 1 1 1
|
---|
65 | // param_named WorldSize float 6
|
---|
66 | param_named WorldSize float 1
|
---|
67 |
|
---|
68 | }
|
---|
69 | texture_unit
|
---|
70 | {
|
---|
71 | vertex_texture true
|
---|
72 | }
|
---|
73 | }
|
---|
74 | }
|
---|
75 | }
|
---|
76 |
|
---|
77 |
|
---|
78 | //object_SE_0_DISTANCECUBEMAP_L1
|
---|
79 |
|
---|
80 | material GTP/MultiBounce/CausticRefractor
|
---|
81 | {
|
---|
82 | technique
|
---|
83 | {
|
---|
84 | pass
|
---|
85 | {
|
---|
86 | //cull_hardware none
|
---|
87 | IllumTechniques
|
---|
88 | {
|
---|
89 | RenderTechnique CausticCaster
|
---|
90 | {
|
---|
91 | attenuation 1000000
|
---|
92 | update_interval 1
|
---|
93 | update_all_face true
|
---|
94 | photonmap_resolution 64
|
---|
95 | caustic_cubemap_resolution 256
|
---|
96 | //photon_map_material GTP/MultiBounce/PhotonMap
|
---|
97 | photon_map_material GTP/Caustic/PhotonMap_HitEnv
|
---|
98 | caustic_map_material GTP/MultiBounce/CauCube_Triangles
|
---|
99 | use_triangles true
|
---|
100 | blur_caustic_cubemap true
|
---|
101 | }
|
---|
102 | RenderTechnique ColorCubeMap
|
---|
103 | {
|
---|
104 | resolution 1024
|
---|
105 | update_interval 1
|
---|
106 | distance_calc false
|
---|
107 | face_angle_calc false
|
---|
108 | update_all_face true
|
---|
109 |
|
---|
110 | }
|
---|
111 | RenderTechnique DistanceCubeMap
|
---|
112 | {
|
---|
113 | resolution 1024
|
---|
114 | update_interval 1
|
---|
115 | distance_calc false
|
---|
116 | face_angle_calc false
|
---|
117 | update_all_face true
|
---|
118 | }
|
---|
119 | RenderTechnique ColorCubeMap
|
---|
120 | {
|
---|
121 | resolution 1024
|
---|
122 | layer 1
|
---|
123 | texture_unit_id 2
|
---|
124 | update_interval 1
|
---|
125 | distance_calc false
|
---|
126 | face_angle_calc false
|
---|
127 | update_all_face true
|
---|
128 | render_env false
|
---|
129 | render_self true
|
---|
130 | self_material GTP/MultiBounce/NormalDistanceCCW
|
---|
131 | }
|
---|
132 | RenderTechnique ColorCubeMap
|
---|
133 | {
|
---|
134 | resolution 1024
|
---|
135 | layer 2
|
---|
136 | texture_unit_id 3
|
---|
137 | update_interval 1
|
---|
138 | distance_calc false
|
---|
139 | face_angle_calc false
|
---|
140 | update_all_face true
|
---|
141 | render_env false
|
---|
142 | render_self true
|
---|
143 | self_material GTP/MultiBounce/NormalDistanceCW
|
---|
144 | }
|
---|
145 | }
|
---|
146 | vertex_program_ref GTP/Basic/Shaded_CPos_VS
|
---|
147 | {
|
---|
148 | param_named_auto WorldViewProj worldviewproj_matrix
|
---|
149 | param_named_auto World world_matrix
|
---|
150 | param_named_auto WorldInv inverse_world_matrix
|
---|
151 | }
|
---|
152 | fragment_program_ref GTP/MultiBounce/Refraction_PS
|
---|
153 | {
|
---|
154 | param_named_auto cameraPos camera_position
|
---|
155 | param_named refIndex float 0.995
|
---|
156 | param_named sFresnel float 0.04
|
---|
157 | }
|
---|
158 |
|
---|
159 | //Cube map of environment
|
---|
160 | texture_unit
|
---|
161 | {
|
---|
162 | //filtering none
|
---|
163 | }
|
---|
164 | //Cube map of environment distances
|
---|
165 | texture_unit
|
---|
166 | {
|
---|
167 | filtering none
|
---|
168 | }
|
---|
169 |
|
---|
170 | //Cube map of reflective object's normals and distances CCW
|
---|
171 | texture_unit
|
---|
172 | {
|
---|
173 | filtering none
|
---|
174 | }
|
---|
175 | //Cube map of reflective object's normals and distances CW
|
---|
176 | texture_unit
|
---|
177 | {
|
---|
178 | filtering none
|
---|
179 | }
|
---|
180 | }
|
---|
181 | }
|
---|
182 | } |
---|