source: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/IllumDemoApplication/src/res/levelutil/shader/prog/partic.s3d_shaderprog @ 2269

Revision 2269, 8.8 KB checked in by barsi, 17 years ago (diff)
Line 
1///////////////////////////////////////////////////////////////////////////////
2//
3//      ##  ######
4//       ######  ###
5//  ## ###############        Shark 3D Engine (www.shark3d.com)
6//   ########## # # #
7//    ########                Copyright (c) 1996-2006 Spinor GmbH.
8//   ######### # # #          All rights reserved.
9//  ##   ##########
10//      ##
11//
12///////////////////////////////////////////////////////////////////////////////
13
14// Shader program configuration.
15// Different drivers access different parameters.
16
17ogl
18{
19    glsl
20    {
21        vertshader
22        {
23            code_variant_array
24            {
25                req_ver "1x0"
26                code_array "levelutil/shader/prog/ogl_glsl/"
27                        & "partic_ogl_glsl_vs1x0.s3d_shadercode_run"
28            }
29
30            tracking
31            {
32                // uniform mat4 matBone[4];
33                cnt 4
34                codevar "matBone[$]"
35                chan "bone"
36                trans "identity"
37            }
38
39            //  attribute vec4 bone_wgh;
40            bone_wgh "boneWgh"
41            //bone_subscr "boneSubscr"
42
43            predefine_array
44            {
45                name "S3D_USE_BONEWGH"
46            }
47        }
48
49        fragshader
50        {
51            code_variant_array
52            {
53                req_ver "1x0"
54                code_array "levelutil/shader/prog/ogl_glsl/"
55                        & "partic_ogl_glsl_fs1x0.s3d_shadercode_run"
56            }
57        }
58       
59        sampler_array "tex0"
60       
61        param_array
62        {
63            src_progvar "prog_anim"
64            dest_codevar "anim"
65            type "float4"
66        }
67        {
68            src_progvar "prog_color_alpha"
69            dest_codevar "colorAlpha"
70            type "float4"
71        }
72        {
73            src_progvar "prog_param"
74            dest_codevar "param"
75            type "float4"
76        }
77        {
78            src_progvar "prog_move_lin"
79            dest_codevar "moveLin"
80            type "float4"
81        }
82        {
83            src_progvar "prog_move_quadr"
84            dest_codevar "moveQuadr"
85            type "float4"
86        }
87        {
88            src_progvar "prog_move_vari"
89            dest_codevar "moveVari"
90            type "float4"
91        }
92        {
93            src_progvar "prog_move_jiggle"
94            dest_codevar "moveJiggle"
95            type "float4"
96        }
97        {
98            src_progvar "prog_shrink"
99            dest_codevar "shrink"
100            type "float4"
101        }
102        {
103            src_progvar "prog_other"
104            dest_codevar "other"
105            type "float4"
106        }
107    }
108}
109
110d3d9
111{
112    hlsl_vertshader
113    {
114        code_variant_array
115        {
116            profile "2x0"
117            entry_point "main"
118            code "levelutil/shader/prog/d3d9_hlsl/"
119                    & "partic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
120            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
121            //      & "partic_d3d9_hlsl_vs2x0.s3d_shadercode"
122        }
123
124        tracking
125        {
126            codevar "projMat"
127            slot 0
128            chan "proj"
129            trans "identity"
130        }
131        {
132            codevar "matBone"
133            slot 0
134            chan "bone"
135            trans "identity"
136        }
137
138        light_array
139        {
140            cnt 5
141            pos_codevar "lightArray[$].pos"
142            dir_codevar ""
143            ambient_codevar "lightArray[$].ambient"
144            diffuse_codevar "lightArray[$].diffuse"
145            specular_codevar "lightArray[$].specular"
146            atten_codevar "lightArray[$].atten"
147        }
148        light_activecnt_codevar "activeLights"
149
150        mtl
151        {
152            power_codevar "mtrlPower"
153            emissive_codevar "mtrlEmissive"
154        }
155       
156        param_array
157        {
158            src_progvar "prog_anim"
159            dest_codevar "anim"
160            type "float4"
161        }
162        {
163            src_progvar "prog_color_alpha"
164            dest_codevar "colorAlpha"
165            type "float4"
166        }
167        {
168            src_progvar "prog_param"
169            dest_codevar "param"
170            type "float4"
171        }
172        {
173            src_progvar "prog_move_lin"
174            dest_codevar "moveLin"
175            type "float4"
176        }
177        {
178            src_progvar "prog_move_quadr"
179            dest_codevar "moveQuadr"
180            type "float4"
181        }
182        {
183            src_progvar "prog_move_vari"
184            dest_codevar "moveVari"
185            type "float4"
186        }
187        {
188            src_progvar "prog_move_jiggle"
189            dest_codevar "moveJiggle"
190            type "float4"
191        }
192        {
193            src_progvar "prog_shrink"
194            dest_codevar "shrink"
195            type "float4"
196        }
197        {
198            src_progvar "prog_other"
199            dest_codevar "other"
200            type "float4"
201        }
202
203        predefine_array
204        {
205            name "S3D_USE_BONESUBSCR"
206        }
207        {
208            name "S3D_MATBONE_CNT"
209            val "32"
210        }
211        {
212            name "S3D_LIGHT_CNT"
213            val "5"
214        }
215    }
216
217    hlsl_pixshader
218    {
219        code_variant_array
220        {
221            profile "2x0"
222            entry_point "main"
223            code "levelutil/shader/prog/d3d9_hlsl/"
224                    & "partic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
225        }
226           
227        fog_codevar "paramFog"
228    }
229}
230
231//#ifdef S3D_GENERAL_PLATFORM_XE
232xe
233{
234    hlsl_vertshader
235    {
236        code_variant_array
237        {
238            profile "2x0"
239            entry_point "main"
240            code "levelutil/shader/prog/d3d9_hlsl/"
241                    & "partic_d3d9_hlsl_vs2x0.s3d_shadercode_run"
242            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
243            //      & "partic_d3d9_hlsl_vs2x0.s3d_shadercode"
244        }
245        {
246            profile "1x1"
247            entry_point "main"
248            code "levelutil/shader/prog/d3d9_hlsl/"
249                    & "partic_d3d9_hlsl_vs1x1.s3d_shadercode_run"
250            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
251            //      & "partic_d3d9_hlsl_vs1x1.s3d_shadercode"
252        }
253
254        tracking
255        {
256            codevar "projMat"
257            slot 0
258            chan "proj"
259            trans "identity"
260        }
261        {
262            codevar "matBone"
263            slot 0
264            chan "bone"
265            trans "identity"
266        }
267
268        light_array
269        {
270            cnt 5
271            pos_codevar "lightArray[$].pos"
272            dir_codevar ""
273            ambient_codevar "lightArray[$].ambient"
274            diffuse_codevar "lightArray[$].diffuse"
275            specular_codevar "lightArray[$].specular"
276            atten_codevar "lightArray[$].atten"
277        }
278        light_activecnt_codevar "activeLights"
279
280        mtl
281        {
282            power_codevar "mtrlPower"
283            emissive_codevar "mtrlEmissive"
284        }
285
286        param_array
287        {
288            src_progvar "prog_anim"
289            dest_codevar "anim"
290            type "float4"
291        }
292        {
293            src_progvar "prog_color_alpha"
294            dest_codevar "colorAlpha"
295            type "float4"
296        }
297        {
298            src_progvar "prog_param"
299            dest_codevar "param"
300            type "float4"
301        }
302        {
303            src_progvar "prog_move_lin"
304            dest_codevar "moveLin"
305            type "float4"
306        }
307        {
308            src_progvar "prog_move_quadr"
309            dest_codevar "moveQuadr"
310            type "float4"
311        }
312        {
313            src_progvar "prog_move_vari"
314            dest_codevar "moveVari"
315            type "float4"
316        }
317        {
318            src_progvar "prog_move_jiggle"
319            dest_codevar "moveJiggle"
320            type "float4"
321        }
322        {
323            src_progvar "prog_shrink"
324            dest_codevar "shrink"
325            type "float4"
326        }
327        {
328            src_progvar "prog_other"
329            dest_codevar "other"
330            type "float4"
331        }
332
333        predefine_array
334        {
335            name "S3D_USE_BONESUBSCR"
336        }
337        {
338            name "S3D_MATBONE_CNT"
339            val "32"
340        }
341        {
342            name "S3D_LIGHT_CNT"
343            val "5"
344        }
345    }
346
347    hlsl_pixshader
348    {
349        code_variant_array
350        {
351            profile "2x0"
352            entry_point "main"
353            code "levelutil/shader/prog/d3d9_hlsl/"
354                    & "partic_d3d9_hlsl_ps2x0.s3d_shadercode_run"
355        }
356           
357        fog_codevar "paramFog"
358    }
359}
360//#endif
Note: See TracBrowser for help on using the repository browser.