Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/Tutorial/Media/materials/scripts/HeatVision.material @ 44

Last change on this file since 44 was 44, checked in by bknecht, 17 years ago

merge from tutorial branche to trunk

File size: 4.3 KB
Line 
1///////////////////////////////////
2//                       PASS 0
3//              HEAT CASTERS PASS
4///////////////////////////////////
5
6vertex_program Fury/HeatVision/HeatCaster_vp cg
7{
8   source HeatVision.cg
9   entry_point HeatCaster_vp
10   profiles vs_1_1 arbvp1
11}
12
13fragment_program Fury/HeatVision/HeatCaster_fp cg
14{
15   source HeatVision.cg
16   entry_point HeatCaster_fp
17   profiles ps_2_0 arbfp1
18}
19
20material Fury/HeatVision/HeatCaster
21{
22    technique
23    {
24        pass
25        {
26            vertex_program_ref Fury/HeatVision/HeatCaster_vp
27            {
28                param_named_auto eyePosition camera_position_object_space
29                param_named_auto worldViewProj worldviewproj_matrix
30            }
31
32            fragment_program_ref Fury/HeatVision/HeatCaster_fp
33            {
34            }
35        }
36    }
37}
38
39///////////////////////////////////
40//                       PASS 0
41//              HEAT CASTERS PASS
42///////////////////////////////////
43
44vertex_program Fury/HeatVision/ColdCaster_vp cg
45{
46   source HeatVision.cg
47   entry_point ColdCaster_vp
48   profiles vs_1_1 arbvp1
49}
50
51fragment_program Fury/HeatVision/ColdCaster_fp cg
52{
53   source HeatVision.cg
54   entry_point ColdCaster_fp
55   profiles ps_2_0 arbfp1
56}
57
58material Fury/HeatVision/ColdCaster
59{
60    technique
61    {
62        pass
63        {
64            vertex_program_ref Fury/HeatVision/ColdCaster_vp
65            {
66                param_named_auto eyePosition camera_position_object_space
67                param_named_auto worldViewProj worldviewproj_matrix
68            }
69
70            fragment_program_ref Fury/HeatVision/ColdCaster_fp
71            {
72            }
73        }
74    }
75}
76
77///////////////////////////////////
78//                        PASS 1
79//  LIGHT TO HEAT CONVERSION PASS
80///////////////////////////////////
81
82vertex_program Fury/HeatVision/LightToHeat_vp cg
83{
84   source HeatVision.cg
85   entry_point LightToHeat_vp
86   profiles vs_1_1 arbvp1
87
88    default_params
89    {
90        param_named_auto flipping render_target_flipping
91    }
92}
93
94fragment_program Fury/HeatVision/LightToHeat_fp cg
95{
96   source HeatVision.cg
97   entry_point LightToHeat_fp
98   profiles ps_2_0 arbfp1
99}
100
101material Fury/HeatVision/LightToHeat
102{
103    technique
104    {
105        // pass 1
106        pass
107        {
108                        cull_hardware none
109                        cull_software none
110                        depth_func always_pass
111
112            vertex_program_ref Fury/HeatVision/LightToHeat_vp
113            {
114            }
115
116            fragment_program_ref Fury/HeatVision/LightToHeat_fp
117            {
118                // these should be *really* random!
119                param_named random_fractions float4 0.3 0.7 0 0
120
121                param_named depth_modulator float4 0.6 0 0 0
122
123                // this one can be fixed
124                param_named heatBiasScale float4 0.0 1.0 0 0
125            }
126
127            // INPUT (from scene, where entities has "Fury/HeatVision/Caster" material for heat emanation)
128            texture_unit
129            {
130                tex_coord_set 0
131                filtering linear linear none
132                tex_address_mode clamp
133            }
134
135            // Noise map
136            texture_unit
137            {
138                texture HeatNoise.tga
139                tex_coord_set 0
140            }
141
142            // heat conversion texture
143            texture_unit
144            {
145                texture HeatLookup.tga
146                tex_coord_set 0
147                filtering point point none
148            }
149        }
150    }
151
152}
153
154
155///////////////////////////////////
156//                        PASS 2
157//                       BLUR PASS
158///////////////////////////////////
159
160vertex_program Fury/HeatVision/Blur_vp cg
161{
162   source HeatVision.cg
163   entry_point Blur_vp
164   profiles vs_1_1 arbvp1
165
166    default_params
167    {
168        param_named_auto flipping render_target_flipping
169    }
170}
171
172fragment_program Fury/HeatVision/Blur_fp cg
173{
174   source HeatVision.cg
175   entry_point Blur_fp
176   profiles ps_2_0 arbfp1
177}
178
179material Fury/HeatVision/Blur
180{
181    technique
182    {
183        // pass 1
184        pass
185        {
186                        cull_hardware none
187                        cull_software none
188                        depth_func always_pass
189
190            vertex_program_ref Fury/HeatVision/Blur_vp
191            {
192            }
193
194            fragment_program_ref Fury/HeatVision/Blur_fp
195            {
196                param_named blurAmount float4 0.5 0 0 0
197            }
198
199            // INPUT (from previous)
200            texture_unit
201            {
202                texture Input
203                tex_coord_set 0
204                filtering linear linear none
205                tex_address_mode clamp
206            }
207        }
208    }
209}
Note: See TracBrowser for help on using the repository browser.