Fix type error for checkerboard shader

This commit is contained in:
2025-03-12 16:15:53 -05:00
parent cd780efd3c
commit 2694a860d2
2 changed files with 2 additions and 4 deletions

View File

@@ -97,8 +97,6 @@ class ShaderFrontend implements FrontendPlugin {
transformedCode += 'uniform vec2 cameraPos;\n';
transformedCode += 'uniform float cameraZoom;\n';
// TODO Implement round for the targets that weirdly don't have it
// give uniforms their default values
var defaultSetterExps = [];
var uniformMapExps = [];

View File

@@ -14,8 +14,8 @@ void main()
float row = floor(position.y / checkSize);
float col = floor(position.x / checkSize);
bool oddRow = mod(row, 2) == 1;
bool oddCol = mod(col, 2) == 1;
bool oddRow = mod(row, 2.0) == 1.0;
bool oddCol = mod(col, 2.0) == 1.0;
vec4 oddColor = oddRow ? color1 : color2;
vec4 evenColor = oddRow ? color2 : color1;