Improve texels drawing

This commit is contained in:
Lubos Lenco
2021-10-13 08:40:36 +02:00
parent ca114cd845
commit 6d3fc5b8cb
+6 -2
View File
@@ -292,8 +292,12 @@ class MakeMesh {
if (lastPass && Context.drawTexels) {
frag.add_uniform('vec2 texpaintSize', '_texpaintSize');
frag.write('vec2 texel = texCoord * texpaintSize;');
frag.write('basecol *= max(float(mod(int(texel.x), 2.0) == mod(int(texel.y), 2.0)), 0.9);');
frag.write('vec2 texel0 = texCoord * texpaintSize * 0.01;');
frag.write('vec2 texel1 = texCoord * texpaintSize * 0.1;');
frag.write('vec2 texel2 = texCoord * texpaintSize;');
frag.write('basecol *= max(float(mod(int(texel0.x), 2.0) == mod(int(texel0.y), 2.0)), 0.9);');
frag.write('basecol *= max(float(mod(int(texel1.x), 2.0) == mod(int(texel1.y), 2.0)), 0.9);');
frag.write('basecol *= max(float(mod(int(texel2.x), 2.0) == mod(int(texel2.y), 2.0)), 0.9);');
}
if (lastPass && Context.drawWireframe) {