palette-shader 0.20.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/rendererShared.ts +4 -1
package/package.json
CHANGED
package/src/rendererShared.ts
CHANGED
|
@@ -107,8 +107,11 @@ export abstract class BasePaletteRenderer {
|
|
|
107
107
|
|
|
108
108
|
this.canvasElement = document.createElement('canvas');
|
|
109
109
|
this.canvasElement.classList.add(canvasClassName);
|
|
110
|
-
const gl = this.canvasElement.getContext('webgl2');
|
|
110
|
+
const gl = this.canvasElement.getContext('webgl2', { antialias: false });
|
|
111
111
|
if (!gl) throw new Error('WebGL2 not supported');
|
|
112
|
+
// Disable dithering so float→8-bit conversion is deterministic across
|
|
113
|
+
// drivers (matters for getColorAtUV readback; no visual cost for flat fills).
|
|
114
|
+
gl.disable(gl.DITHER);
|
|
112
115
|
this.glContext = gl;
|
|
113
116
|
|
|
114
117
|
this.paletteTexture = gl.createTexture()!;
|