1 | material GameTools/CubeMap/Reduce
|
---|
2 | {
|
---|
3 |
|
---|
4 | technique
|
---|
5 | {
|
---|
6 | pass
|
---|
7 | {
|
---|
8 | //depth_check off
|
---|
9 | lighting off
|
---|
10 |
|
---|
11 | vertex_program_ref GameTools/CubeMap/VertexPrograms/ReduceVS
|
---|
12 | {
|
---|
13 | // param_named_auto worldViewProj worldviewproj_matrix
|
---|
14 | // param_named_auto world world_matrix
|
---|
15 | }
|
---|
16 | fragment_program_ref GameTools/CubeMap/FragmentPrograms/ReducePS
|
---|
17 | {
|
---|
18 | //param_named_auto cameraPos camera_position
|
---|
19 | param_named nFace int 0
|
---|
20 | param_named CUBEMAP_SIZE int 256
|
---|
21 | //param_named RATE int 2
|
---|
22 |
|
---|
23 | }
|
---|
24 |
|
---|
25 | //Cube map for reflections and refractions
|
---|
26 | texture_unit
|
---|
27 | {
|
---|
28 | filtering point point point
|
---|
29 | cubic_texture cubemap.jpg combinedUVW
|
---|
30 | tex_address_mode clamp
|
---|
31 | // env_map cubic_reflection
|
---|
32 | colour_op modulate
|
---|
33 | }
|
---|
34 |
|
---|
35 |
|
---|
36 | }
|
---|
37 | }
|
---|
38 | }
|
---|
39 |
|
---|
40 | material GameTools/Diffuse
|
---|
41 | {
|
---|
42 | technique
|
---|
43 | {
|
---|
44 | pass
|
---|
45 | {
|
---|
46 |
|
---|
47 | IllumTechniques
|
---|
48 | {
|
---|
49 | RenderTechnique DistanceCubeMap
|
---|
50 | {
|
---|
51 | update_interval 1
|
---|
52 | distance_calc false
|
---|
53 | }
|
---|
54 | RenderTechnique ReducedColorCubeMap
|
---|
55 | {
|
---|
56 | update_interval 1
|
---|
57 | reduced_resolution 4
|
---|
58 | resolution 128
|
---|
59 | distance_calc false
|
---|
60 | face_angle_calc false
|
---|
61 | update_all_face true
|
---|
62 | }
|
---|
63 | }
|
---|
64 |
|
---|
65 |
|
---|
66 | vertex_program_ref GameTools/DiffuseVS
|
---|
67 | {
|
---|
68 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
69 | param_named_auto world world_matrix
|
---|
70 |
|
---|
71 | }
|
---|
72 | fragment_program_ref GameTools/DiffusePS
|
---|
73 | {
|
---|
74 | param_named_auto cameraPos camera_position
|
---|
75 | param_named REDUCED_CUBEMAP_SIZE int 8
|
---|
76 | param_named lastCenter float3 0 0 0
|
---|
77 | }
|
---|
78 |
|
---|
79 | //Cube map for reflections and refractions
|
---|
80 | texture_unit
|
---|
81 | {
|
---|
82 | cubic_texture cubemap.jpg combinedUVW
|
---|
83 | tex_address_mode clamp
|
---|
84 | colour_op replace
|
---|
85 | }
|
---|
86 |
|
---|
87 | //Cube map of distances
|
---|
88 | texture_unit
|
---|
89 | {
|
---|
90 | cubic_texture cubemap.jpg combinedUVW
|
---|
91 | tex_address_mode clamp
|
---|
92 | colour_op replace
|
---|
93 | }
|
---|
94 | }
|
---|
95 | }
|
---|
96 | }
|
---|
97 |
|
---|
98 |
|
---|
99 |
|
---|
100 | vertex_program Diffuse2VS hlsl
|
---|
101 | {
|
---|
102 | source GameTools_Diffuse.hlsl
|
---|
103 | entry_point DiffuseVS
|
---|
104 | target vs_3_0
|
---|
105 | }
|
---|
106 |
|
---|
107 | fragment_program Diffuse2PS hlsl
|
---|
108 | {
|
---|
109 | source GameTools_Diffuse.hlsl
|
---|
110 | entry_point DiffusePS
|
---|
111 | target ps_3_0
|
---|
112 | }
|
---|
113 |
|
---|
114 | material GameTools/Diffuse/use
|
---|
115 | {
|
---|
116 | technique
|
---|
117 | {
|
---|
118 | pass
|
---|
119 | {
|
---|
120 |
|
---|
121 | IllumTechniques
|
---|
122 | {
|
---|
123 | RenderTechnique DistanceCubeMap
|
---|
124 | {
|
---|
125 | update_interval 1
|
---|
126 | distance_calc false
|
---|
127 | }
|
---|
128 | RenderTechnique ReducedColorCubeMap
|
---|
129 | {
|
---|
130 | update_interval 1
|
---|
131 | reduced_resolution 4
|
---|
132 | resolution 128
|
---|
133 | distance_calc false
|
---|
134 | face_angle_calc false
|
---|
135 | update_all_face true
|
---|
136 | }
|
---|
137 | }
|
---|
138 |
|
---|
139 |
|
---|
140 | vertex_program_ref Diffuse2VS
|
---|
141 | {
|
---|
142 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
143 | param_named_auto world world_matrix
|
---|
144 |
|
---|
145 | }
|
---|
146 | fragment_program_ref Diffuse2PS
|
---|
147 | {
|
---|
148 | param_named_auto cameraPos camera_position
|
---|
149 | param_named REDUCED_CUBEMAP_SIZE int 4
|
---|
150 | param_named lastCenter float3 0 0 0
|
---|
151 | param_named_auto world_IT inverse_transpose_world_matrix
|
---|
152 | }
|
---|
153 |
|
---|
154 | //Cube map for reflections and refractions
|
---|
155 | texture_unit
|
---|
156 | {
|
---|
157 | cubic_texture cubemap.jpg combinedUVW
|
---|
158 | tex_address_mode clamp
|
---|
159 | colour_op replace
|
---|
160 | }
|
---|
161 |
|
---|
162 | //Cube map of distances
|
---|
163 | texture_unit
|
---|
164 | {
|
---|
165 | cubic_texture cubemap.jpg combinedUVW
|
---|
166 | tex_address_mode clamp
|
---|
167 | colour_op replace
|
---|
168 | }
|
---|
169 | }
|
---|
170 | }
|
---|
171 | } |
---|