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