source: GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/Shark3D/demo_v5x0x7_t164x31u_enterpr_kwin32/src/res/levelutil/shader/prog/bump_mild.s3d_shaderprog @ 2330

Revision 2330, 5.3 KB checked in by igarcia, 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
17// Opengl Highlevel Shaderlanguage
18ogl
19{
20    glsl
21    {
22        vertshader
23        {
24            code_variant_array
25            {
26                req_ver "1x0"
27                code_array "levelutil/shader/prog/ogl_glsl/"
28                        & "bump_ogl_glsl_vs1x0.s3d_shadercode_run"
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                name "S3D_PARALLAX_MAPPING"
49            }
50        }
51
52        fragshader
53        {
54            code_variant_array
55            {
56                req_ver "1x0"
57                code_array "levelutil/shader/prog/ogl_glsl/"
58                        & "bump_ogl_glsl_fs1x0.s3d_shadercode_run"
59            }
60            predefine_array
61            {
62                name "S3D_SPECULAR_EXP"
63                val "4.0"
64            }
65            {
66                name "S3D_PARALLAX_MAPPING"
67            }
68            {
69                name "S3D_PARALLAX_SCALE"
70                val "0.07"
71            }
72            {
73                name "S3D_PARALLAX_BIAS"
74                val "0.50196078431372549" // = 128/255
75            }
76            {
77                name "S3D_MILD"
78                val "0.66666666"
79            }
80        }
81
82        param_array
83        {
84            src_progvar "prog_light_cenrange"
85            dest_codevar "lightCenRange"
86            type "float4"
87        }
88        {
89            src_progvar "prog_light_ambient"
90            dest_codevar "lightAmbient"
91            type "float4"
92        }
93        {
94            src_progvar "prog_light_diffuse"
95            dest_codevar "lightDiffuse"
96            type "float4"
97        }
98        {
99            src_progvar "prog_light_specular"
100            dest_codevar "lightSpecular"
101            type "float4"
102        }
103
104        sampler_array "tex0" "normalSamp"
105    }
106}
107
108d3d9
109{
110    hlsl_vertshader
111    {
112        // Code of the pixel program
113        code_variant_array
114        {
115            profile "1x1"
116            entry_point "main"
117            code "levelutil/shader/prog/d3d9_hlsl/"
118                    & "bump_d3d9_hlsl_vs1x1.s3d_shadercode_run"
119            //debug_code_file "src/res/levelutil/shader/prog/d3d9_hlsl/"
120            //      & "bump_d3d9_hlsl_vs1x1.s3d_shadercode"
121        }
122
123
124        // Copy matrices into vertex program constants.
125        // The field "chan" can be one
126        // of "identity", "proj", "view" or "projview" "bone"
127        // The field "trans" can be one
128        // of "identity", "inv", "transp" or "invtransp"
129        // One matrix needs 4 constants.
130        tracking
131        {
132            codevar "projMat"
133            slot 0
134            chan "proj"
135            trans "identity"
136        }
137        {
138            codevar "matBone"
139            slot 0
140            chan "bone"
141            trans "identity"
142        }
143
144        param_array
145        {
146            src_progvar "prog_light_cenrange"
147            dest_codevar "lightCenRange"
148            type "float4"
149        }
150
151        predefine_array
152        {
153            name "S3D_USE_BONESUBSCR"
154        }
155        {
156            name "S3D_MATBONE_CNT"
157            val "32"
158        }
159        {
160            name "S3D_PARALLAX_MAPPING"
161        }
162    }
163
164    hlsl_pixshader
165    {
166        code_variant_array
167        {
168            profile "2x0"
169            entry_point "main"
170            code "levelutil/shader/prog/d3d9_hlsl/"
171                    & "bump_d3d9_hlsl_ps2x0.s3d_shadercode_run"
172        }
173       
174        param_array
175        {
176            src_progvar "prog_light_ambient"
177            dest_codevar "lightAmbient"
178            type "float4"
179        }
180        {
181            src_progvar "prog_light_diffuse"
182            dest_codevar "lightDiffuse"
183            type "float4"
184        }
185        {
186            src_progvar "prog_light_specular"
187            dest_codevar "lightSpecular"
188            type "float4"
189        }
190
191        predefine_array
192        {
193            name "S3D_SPECULAR_EXP"
194            val "4.0"
195        }
196        {
197            name "S3D_PARALLAX_MAPPING"
198        }
199        {
200            name "S3D_PARALLAX_SCALE"
201            val "0.07"
202        }
203        {
204            name "S3D_PARALLAX_BIAS"
205            val "0.50196078431372549" // = 128/255
206        }
207        {
208            name "S3D_MILD"
209            val "0.66666666"
210        }
211    }
212}
213
Note: See TracBrowser for help on using the repository browser.