We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
resetUniform
1 parent 103b91a commit 3344fc1Copy full SHA for 3344fc1
1 file changed
src/renderer/webgl/WebGLShader.js
@@ -418,6 +418,31 @@ var WebGLShader = new Class({
418
return this.uniforms.hasOwnProperty(name);
419
},
420
421
+ /**
422
+ * Resets the cached values of the given uniform.
423
+ *
424
+ * @method Phaser.Renderer.WebGL.WebGLShader#resetUniform
425
+ * @since 3.50.0
426
427
+ * @param {string} name - The name of the uniform to reset.
428
429
+ * @return {this} This WebGLShader instance.
430
+ */
431
+ resetUniform: function (name)
432
+ {
433
+ var uniform = this.uniforms[name];
434
+
435
+ if (uniform)
436
437
+ uniform.value1 = null;
438
+ uniform.value2 = null;
439
+ uniform.value3 = null;
440
+ uniform.value4 = null;
441
+ }
442
443
+ return this;
444
+ },
445
446
/**
447
* Sets the given uniform value/s based on the name and GL function.
448
*
0 commit comments