aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/linear-gradient-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/linear-gradient-material.js')
-rwxr-xr-xjs/lib/rdge/materials/linear-gradient-material.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/js/lib/rdge/materials/linear-gradient-material.js b/js/lib/rdge/materials/linear-gradient-material.js
index d216a2c0..da6d205c 100755
--- a/js/lib/rdge/materials/linear-gradient-material.js
+++ b/js/lib/rdge/materials/linear-gradient-material.js
@@ -107,15 +107,15 @@ var LinearGradientMaterial = function LinearGradientMaterial() {
107 107
108/////////////////////////////////////////////////////////////////////////////////////// 108///////////////////////////////////////////////////////////////////////////////////////
109// RDGE shader 109// RDGE shader
110 110
111// shader spec (can also be loaded from a .JSON file, or constructed at runtime) 111// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
112var linearGradientMaterialDef = 112var linearGradientMaterialDef =
113{'shaders': 113{'shaders':
114 { 114 {
115 // shader file 115 // shader file
116 'defaultVShader':"assets/shaders/linearGradient.vert.glsl", 116 'defaultVShader':"assets/shaders/linearGradient.vert.glsl",
117 'defaultFShader':"assets/shaders/linearGradient.frag.glsl", 117 'defaultFShader':"assets/shaders/linearGradient.frag.glsl",
118 118
119 // this shader is inline 119 // this shader is inline
120 'dirLightVShader': "\ 120 'dirLightVShader': "\
121 uniform mat4 u_mvMatrix;\ 121 uniform mat4 u_mvMatrix;\
@@ -130,7 +130,7 @@ var linearGradientMaterialDef =
130 vNormal.xyz = (u_normalMatrix*vec4(a_nrm, 0.0)).xyz;\ 130 vNormal.xyz = (u_normalMatrix*vec4(a_nrm, 0.0)).xyz;\
131 gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0);\ 131 gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0);\
132 vPos = (u_worldMatrix * vec4(a_pos,1.0)).xyz;\ 132 vPos = (u_worldMatrix * vec4(a_pos,1.0)).xyz;\
133 }", 133 }",
134 'dirLightFShader': "\ 134 'dirLightFShader': "\
135 precision highp float;\ 135 precision highp float;\
136 uniform vec4 u_light1Diff;\ 136 uniform vec4 u_light1Diff;\
@@ -150,7 +150,7 @@ var linearGradientMaterialDef =
150 }" 150 }"
151 }, 151 },
152 'techniques': 152 'techniques':
153 { 153 {
154 'default': 154 'default':
155 [ 155 [
156 { 156 {
@@ -164,16 +164,16 @@ var linearGradientMaterialDef =
164 'texcoord' : { 'type' : 'vec2' } 164 'texcoord' : { 'type' : 'vec2' }
165 }, 165 },
166 // parameters 166 // parameters
167 'params' : 167 'params' :
168 { 168 {
169 'u_color1' : { 'type' : 'vec4' }, 169 'u_color1' : { 'type' : 'vec4' },
170 'u_color2' : { 'type' : 'vec4' }, 170 'u_color2' : { 'type' : 'vec4' },
171 'u_color3' : { 'type' : 'vec4' }, 171 'u_color3' : { 'type' : 'vec4' },
172 'u_color4' : { 'type' : 'vec4' }, 172 'u_color4' : { 'type' : 'vec4' },
173 'u_colorStop1': { 'type' : 'float' }, 173 'u_colorStop1': { 'type' : 'float' },
174 'u_colorStop2': { 'type' : 'float' }, 174 'u_colorStop2': { 'type' : 'float' },
175 'u_colorStop3': { 'type' : 'float' }, 175 'u_colorStop3': { 'type' : 'float' },
176 'u_colorStop4': { 'type' : 'float' }, 176 'u_colorStop4': { 'type' : 'float' },
177 'u_cos_sin_angle': { 'type' : 'vec2' }, 177 'u_cos_sin_angle': { 'type' : 'vec2' },
178 'u_texTransform': { 'type' : 'mat3' } 178 'u_texTransform': { 'type' : 'mat3' }
179 //'u_colorCount': {'type' : 'int' } 179 //'u_colorCount': {'type' : 'int' }
@@ -181,7 +181,7 @@ var linearGradientMaterialDef =
181 }, 181 },
182 182
183 // render states 183 // render states
184 'states' : 184 'states' :
185 { 185 {
186 'depthEnable' : true, 186 'depthEnable' : true,
187 'offset':[1.0, 0.1] 187 'offset':[1.0, 0.1]
@@ -197,12 +197,12 @@ var linearGradientMaterialDef =
197 'a_nrm' : { 'type' : 'vec3' } 197 'a_nrm' : { 'type' : 'vec3' }
198 }, 198 },
199 // parameters 199 // parameters
200 'params' : 200 'params' :
201 { 201 {
202 }, 202 },
203 203
204 // render states 204 // render states
205 'states' : 205 'states' :
206 { 206 {
207 'depthEnable' : true, 207 'depthEnable' : true,
208 "blendEnable" : true, 208 "blendEnable" : true,