Remove roundPixels from DrawingContext, but keep it in QuadLight.

This commit is contained in:
Ben Richards 2024-06-21 15:51:26 +12:00
parent cbcb14f724
commit aa69e4f8b3
3 changed files with 2 additions and 33 deletions

View file

@ -165,30 +165,6 @@ var DrawingContext = new Class({
*/
this.inUse = false;
/**
* Whether to override the camera's roundPixels setting
* with the DrawingContext's own setting.
*
* @name Phaser.Renderer.WebGL.DrawingContext#overrideRoundPixels
* @type {boolean}
* @default false
* @since 3.90.0
*/
this.overrideRoundPixels = false;
/**
* Whether to round the camera's position before rendering.
*
* This value is taken from the camera's `roundPixels` property
* when `setCamera` is called if `overrideRoundPixels` is `false`.
*
* @name Phaser.Renderer.WebGL.DrawingContext#roundPixels
* @type {boolean}
* @default false
* @since 3.90.0
*/
this.roundPixels = false;
if (options.autoResize)
{
this.renderer.on(Events.RESIZE, this.resize, this);
@ -278,8 +254,6 @@ var DrawingContext = new Class({
this.texture = source.texture;
this.camera = source.camera;
this.blendMode = source.blendMode;
this.overrideRoundPixels = source.overrideRoundPixels;
this.roundPixels = source.roundPixels;
this.state = {
bindings:
@ -388,11 +362,6 @@ var DrawingContext = new Class({
setCamera: function (camera)
{
this.camera = camera;
if (!this.overrideRoundPixels)
{
this.roundPixels = camera ? camera.roundPixels : false;
}
},
/**

View file

@ -194,7 +194,7 @@ var BatchHandlerQuad = new Class({
{
this.program.setUniform(
'uRoundPixels',
drawingContext.roundPixels
drawingContext.camera.roundPixels
);
},

View file

@ -151,7 +151,7 @@ var BatchHandlerQuadLight = new Class({
program.setUniform(
'uRoundPixels',
drawingContext.roundPixels
drawingContext.camera.roundPixels
);
program.setUniform(
'uCamera',