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 4a32cacd..53751dc3 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); |
@@ -126,42 +126,42 @@ var RadialBlurMaterial = function RadialBlurMaterial() { | |||
126 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) | 126 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) |
127 | var radialBlurMaterialDef = | 127 | var radialBlurMaterialDef = |
128 | { 'shaders': | 128 | { 'shaders': |
129 | { | 129 | { |
130 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", | 130 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", |
131 | 'defaultFShader': "assets/shaders/radialBlur.frag.glsl" | 131 | 'defaultFShader': "assets/shaders/radialBlur.frag.glsl" |
132 | }, | 132 | }, |
133 | 'techniques': | 133 | 'techniques': |
134 | { | 134 | { |
135 | 'default': | 135 | 'default': |
136 | [ | 136 | [ |
137 | { | 137 | { |
138 | 'vshader': 'defaultVShader', | 138 | 'vshader': 'defaultVShader', |
139 | 'fshader': 'defaultFShader', | 139 | 'fshader': 'defaultFShader', |
140 | // attributes | 140 | // attributes |
141 | 'attributes': | 141 | 'attributes': |
142 | { | 142 | { |
143 | 'vert': { 'type': 'vec3' }, | 143 | 'vert': { 'type': 'vec3' }, |
144 | 'normal': { 'type': 'vec3' }, | 144 | 'normal': { 'type': 'vec3' }, |
145 | 'texcoord': { 'type': 'vec2' } | 145 | 'texcoord': { 'type': 'vec2' } |
146 | }, | 146 | }, |
147 | // parameters | 147 | // parameters |
148 | 'params': | 148 | 'params': |
149 | { | 149 | { |
150 | 'u_tex0': { 'type': 'tex2d' }, | 150 | 'u_tex0': { 'type': 'tex2d' }, |
151 | 'u_time': { 'type': 'float' }, | 151 | 'u_time': { 'type': 'float' }, |
152 | 'u_speed': { 'type': 'float' }, | 152 | 'u_speed': { 'type': 'float' }, |
153 | 'u_resolution': { 'type': 'vec2' }, | 153 | 'u_resolution': { 'type': 'vec2' }, |
154 | }, | 154 | }, |
155 | 155 | ||
156 | // render states | 156 | // render states |
157 | 'states': | 157 | 'states': |
158 | { | 158 | { |
159 | 'depthEnable': true, | 159 | 'depthEnable': true, |
160 | 'offset': [1.0, 0.1] | 160 | 'offset': [1.0, 0.1] |
161 | } | 161 | } |
162 | } | 162 | } |
163 | ] | 163 | ] |
164 | } | 164 | } |
165 | }; | 165 | }; |
166 | 166 | ||
167 | 167 | ||