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 | // Definition of the shaders for the display.
|
---|
15 | // A shader is an object responsible for drawing objects.
|
---|
16 | shader_array
|
---|
17 | {
|
---|
18 | // Shader rendering without lighting.
|
---|
19 | name "plain"
|
---|
20 | ident "eng_shader_std.group"
|
---|
21 | param
|
---|
22 | {
|
---|
23 | env "shaderenv"
|
---|
24 | init_method "init_method"
|
---|
25 | child_array
|
---|
26 | {
|
---|
27 | ident "eng_shader_std.modelmesh"
|
---|
28 | param
|
---|
29 | {
|
---|
30 | env "shaderenv"
|
---|
31 | methods "init_method"
|
---|
32 | usage "render"
|
---|
33 | mesh_var "mesh"
|
---|
34 | texchan_var_array "tex0"
|
---|
35 | tex_attr_var_array "attr0"
|
---|
36 | }
|
---|
37 | }
|
---|
38 | {
|
---|
39 | ident "eng_shader_std.meshenter"
|
---|
40 | param
|
---|
41 | {
|
---|
42 | env "shaderenv"
|
---|
43 | mesh_var_array "mesh"
|
---|
44 | insp_ident "insp_shader_bound"
|
---|
45 |
|
---|
46 | insp_rank 80000
|
---|
47 | insp_color 1.0 0.0 0.0
|
---|
48 | enter_array
|
---|
49 | {
|
---|
50 | triggers "main_trigger" "mirror_trigger"
|
---|
51 | method "main_method"
|
---|
52 | }
|
---|
53 | }
|
---|
54 | }
|
---|
55 | {
|
---|
56 | ident "eng_shader_std.paintmesh"
|
---|
57 | param
|
---|
58 | {
|
---|
59 | env "shaderenv"
|
---|
60 | methods "main_method"
|
---|
61 | rank 41000
|
---|
62 | insp_ident "insp_shader_mesh"
|
---|
63 |
|
---|
64 | cull_mode "back"
|
---|
65 | depth_test "less_equal"
|
---|
66 | depth_write 1
|
---|
67 |
|
---|
68 | mesh_var "mesh"
|
---|
69 | texchan_var_array "tex0"
|
---|
70 | tex_attr_var_array "attr0"
|
---|
71 | attrmat_var_array ""
|
---|
72 | use_vertex_bone_wgh 1
|
---|
73 | use_vertex_bone_subscr 1
|
---|
74 | use_vertex_point 1
|
---|
75 |
|
---|
76 | shaderprog_ident "levelutil/shader/prog/"
|
---|
77 | & "plain_pointtex.s3d_shaderprog_run"
|
---|
78 | shaderprog_param_array
|
---|
79 | }
|
---|
80 | }
|
---|
81 | }
|
---|
82 | }
|
---|
83 | {
|
---|
84 | // Transparent shader rendering without lighting.
|
---|
85 | name "plain_transp"
|
---|
86 | ident "eng_shader_std.group"
|
---|
87 | param
|
---|
88 | {
|
---|
89 | env "shaderenv"
|
---|
90 | init_method "init_method"
|
---|
91 | child_array
|
---|
92 | {
|
---|
93 | ident "eng_shader_std.modelmesh"
|
---|
94 | param
|
---|
95 | {
|
---|
96 | env "shaderenv"
|
---|
97 | methods "init_method"
|
---|
98 | usage "render"
|
---|
99 | mesh_var "mesh"
|
---|
100 | texchan_var_array "tex0"
|
---|
101 | tex_attr_var_array "attr0"
|
---|
102 | }
|
---|
103 | }
|
---|
104 | {
|
---|
105 | ident "eng_shader_std.meshenter"
|
---|
106 | param
|
---|
107 | {
|
---|
108 | env "shaderenv"
|
---|
109 | mesh_var_array "mesh"
|
---|
110 | insp_ident "insp_shader_bound"
|
---|
111 |
|
---|
112 | insp_rank 80000
|
---|
113 | insp_color 1.0 0.0 0.0
|
---|
114 | enter_array
|
---|
115 | {
|
---|
116 | triggers "main_trigger" "mirror_trigger"
|
---|
117 | method "main_method"
|
---|
118 | }
|
---|
119 | }
|
---|
120 | }
|
---|
121 | {
|
---|
122 | ident "eng_shader_std.paintmesh"
|
---|
123 | param
|
---|
124 | {
|
---|
125 | env "shaderenv"
|
---|
126 | methods "main_method"
|
---|
127 | rank 44000
|
---|
128 | insp_ident "insp_shader_mesh"
|
---|
129 |
|
---|
130 | cull_mode "back"
|
---|
131 | depth_test "less_equal"
|
---|
132 | depth_write 1
|
---|
133 |
|
---|
134 | mesh_var "mesh"
|
---|
135 |
|
---|
136 | texchan_var_array "tex0"
|
---|
137 | tex_attr_var_array "attr0"
|
---|
138 | attrmat_var_array ""
|
---|
139 | use_vertex_bone_wgh 1
|
---|
140 | use_vertex_bone_subscr 1
|
---|
141 | use_vertex_point 1
|
---|
142 |
|
---|
143 | blend_col_src_fac "src_alpha"
|
---|
144 | blend_col_dest_fac "inv_src_alpha"
|
---|
145 |
|
---|
146 | shaderprog_ident "levelutil/shader/prog/"
|
---|
147 | & "plain_pointtex.s3d_shaderprog_run"
|
---|
148 | shaderprog_param_array
|
---|
149 | }
|
---|
150 | }
|
---|
151 | }
|
---|
152 | }
|
---|