mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Add textureUnit parameter to Utils.updateLightingUniforms.
This allows us to use lighting in any texture situation.
This commit is contained in:
parent
1421058f4d
commit
66bbf8ea4a
3 changed files with 5 additions and 1 deletions
|
@ -172,6 +172,7 @@ module.exports = {
|
|||
* @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGLRenderer instance.
|
||||
* @param {Phaser.Renderer.WebGL.DrawingContext} drawingContext - The DrawingContext instance.
|
||||
* @param {Phaser.Renderer.WebGL.ShaderProgramManager} programManager - The ShaderProgramManager instance.
|
||||
* @param {number} textureUnit - The texture unit to use for the normal map.
|
||||
* @param {Phaser.Math.Vector2} vec - A Vector2 instance.
|
||||
* @param {boolean} [selfShadow] - Whether to enable self-shadowing.
|
||||
* @param {number} [selfShadowPenumbra] - The penumbra value for self-shadowing.
|
||||
|
@ -182,6 +183,7 @@ module.exports = {
|
|||
renderer,
|
||||
drawingContext,
|
||||
programManager,
|
||||
textureUnit,
|
||||
vec,
|
||||
selfShadow,
|
||||
selfShadowPenumbra,
|
||||
|
@ -200,7 +202,7 @@ module.exports = {
|
|||
{
|
||||
programManager.setUniform(
|
||||
'uNormSampler',
|
||||
1
|
||||
textureUnit
|
||||
);
|
||||
|
||||
programManager.setUniform(
|
||||
|
|
|
@ -255,6 +255,7 @@ var BatchHandlerQuad = new Class({
|
|||
this.manager.renderer,
|
||||
drawingContext,
|
||||
programManager,
|
||||
1,
|
||||
this._lightVector,
|
||||
renderOptions.selfShadow,
|
||||
renderOptions.selfShadowThreshold,
|
||||
|
|
|
@ -147,6 +147,7 @@ var BatchHandlerTriFlat = new Class({
|
|||
this.manager.renderer,
|
||||
drawingContext,
|
||||
programManager,
|
||||
1,
|
||||
this._lightVector
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue