diff options
Diffstat (limited to 'js/lib/rdge/materials/radial-blur-material.js')
-rw-r--r-- | js/lib/rdge/materials/radial-blur-material.js | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/js/lib/rdge/materials/radial-blur-material.js b/js/lib/rdge/materials/radial-blur-material.js index d71a0459..c1a6fe2e 100644 --- a/js/lib/rdge/materials/radial-blur-material.js +++ b/js/lib/rdge/materials/radial-blur-material.js | |||
@@ -49,17 +49,17 @@ var RadialBlurMaterial = function RadialBlurMaterial() { | |||
49 | /////////////////////////////////////////////////////////////////////// | 49 | /////////////////////////////////////////////////////////////////////// |
50 | // Property Accessors | 50 | // Property Accessors |
51 | /////////////////////////////////////////////////////////////////////// | 51 | /////////////////////////////////////////////////////////////////////// |
52 | this.getName = function () { return this._name; }; | 52 | this.getName = function () { return this._name; }; |
53 | this.getShaderName = function () { return this._shaderName; }; | 53 | this.getShaderName = function () { return this._shaderName; }; |
54 | this.getShaderDef = function() { return radialBlurMaterialDef; }; | 54 | this.getShaderDef = function() { return radialBlurMaterialDef; }; |
55 | this.isAnimated = function () { return true; }; | 55 | this.isAnimated = function () { return true; }; |
56 | 56 | ||
57 | /////////////////////////////////////////////////////////////////////// | 57 | /////////////////////////////////////////////////////////////////////// |
58 | // Material Property Accessors | 58 | // Material Property Accessors |
59 | /////////////////////////////////////////////////////////////////////// | 59 | /////////////////////////////////////////////////////////////////////// |
60 | this._propNames = ["u_tex0", "u_speed"]; | 60 | this._propNames = ["u_tex0", "u_speed"]; |
61 | this._propLabels = ["Texture map", "Speed" ]; | 61 | this._propLabels = ["Texture map", "Speed" ]; |
62 | this._propTypes = ["file", "float" ]; | 62 | this._propTypes = ["file", "float" ]; |
63 | this._propValues = []; | 63 | this._propValues = []; |
64 | 64 | ||
65 | this._propValues[this._propNames[0]] = this._defaultTexMap.slice(0); | 65 | this._propValues[this._propNames[0]] = this._defaultTexMap.slice(0); |
@@ -136,42 +136,42 @@ var RadialBlurMaterial = function RadialBlurMaterial() { | |||
136 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) | 136 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) |
137 | var radialBlurMaterialDef = | 137 | var radialBlurMaterialDef = |
138 | { 'shaders': | 138 | { 'shaders': |
139 | { | 139 | { |
140 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", | 140 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", |
141 | 'defaultFShader': "assets/shaders/radialBlur.frag.glsl" | 141 | 'defaultFShader': "assets/shaders/radialBlur.frag.glsl" |
142 | }, | 142 | }, |
143 | 'techniques': | 143 | 'techniques': |
144 | { | 144 | { |
145 | 'default': | 145 | 'default': |
146 | [ | 146 | [ |
147 | { | 147 | { |
148 | 'vshader': 'defaultVShader', | 148 | 'vshader': 'defaultVShader', |
149 | 'fshader': 'defaultFShader', | 149 | 'fshader': 'defaultFShader', |
150 | // attributes | 150 | // attributes |
151 | 'attributes': | 151 | 'attributes': |
152 | { | 152 | { |
153 | 'vert': { 'type': 'vec3' }, | 153 | 'vert': { 'type': 'vec3' }, |
154 | 'normal': { 'type': 'vec3' }, | 154 | 'normal': { 'type': 'vec3' }, |
155 | 'texcoord': { 'type': 'vec2' } | 155 | 'texcoord': { 'type': 'vec2' } |
156 | }, | 156 | }, |
157 | // parameters | 157 | // parameters |
158 | 'params': | 158 | 'params': |
159 | { | 159 | { |
160 | 'u_tex0': { 'type': 'tex2d' }, | 160 | 'u_tex0': { 'type': 'tex2d' }, |
161 | 'u_time': { 'type': 'float' }, | 161 | 'u_time': { 'type': 'float' }, |
162 | 'u_speed': { 'type': 'float' }, | 162 | 'u_speed': { 'type': 'float' }, |
163 | 'u_resolution': { 'type': 'vec2' }, | 163 | 'u_resolution': { 'type': 'vec2' }, |
164 | }, | 164 | }, |
165 | 165 | ||
166 | // render states | 166 | // render states |
167 | 'states': | 167 | 'states': |
168 | { | 168 | { |
169 | 'depthEnable': true, | 169 | 'depthEnable': true, |
170 | 'offset': [1.0, 0.1] | 170 | 'offset': [1.0, 0.1] |
171 | } | 171 | } |
172 | } | 172 | } |
173 | ] | 173 | ] |
174 | } | 174 | } |
175 | }; | 175 | }; |
176 | 176 | ||
177 | 177 | ||