@@ 142,7 142,7 @@ export class Engine {
uniforms: {
tDiffuse: { value: null },
palette: { value: palette },
- threshold: { value: 0.1 },
+ threshold: { value: 0.03 },
},
vertexShader: [
"out vec2 vUv;",
@@ 165,7 165,7 @@ export class Engine {
"int firstIndex = 0;",
"int secondIndex = 0;",
"float secondClosestDistance = 1.0;",
- "vec3 secondClosestColor = palette[0];",
+ "vec3 secondClosestColor = palette[4];",
/*
* loop through the palette colors and compute the two closest colors
* to the input pixel color