Improve texels drawing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user