diff options
author | makamys <makamys@outlook.com> | 2022-06-10 18:06:59 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-10 19:21:01 +0200 |
commit | b34ebe6e5df8c788405934a84bd5d0ab3423391d (patch) | |
tree | 47ddde3aa17d3a99b2227023229b8c18554e6ae8 /src/main | |
parent | e1097c3f69077be93089d1ef91aa8cdebd00d43c (diff) | |
download | Neodymium-b34ebe6e5df8c788405934a84bd5d0ab3423391d.tar.gz Neodymium-b34ebe6e5df8c788405934a84bd5d0ab3423391d.tar.bz2 Neodymium-b34ebe6e5df8c788405934a84bd5d0ab3423391d.zip |
me_no_understant
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/MeshQuad.java | 4 | ||||
-rw-r--r-- | src/main/resources/shaders/chunk.frag | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/MeshQuad.java b/src/main/java/makamys/neodymium/renderer/MeshQuad.java index 7d3c50b..0f275f7 100644 --- a/src/main/java/makamys/neodymium/renderer/MeshQuad.java +++ b/src/main/java/makamys/neodymium/renderer/MeshQuad.java @@ -200,10 +200,10 @@ public class MeshQuad { } } - if((verticesTouching[1] && verticesTouching[2]) || (verticesTouching[3] && verticesTouching[0])) { + if((verticesTouching[0] && verticesTouching[1]) || (verticesTouching[2] && verticesTouching[3])) { quadCountByDirection[0] += o.quadCountByDirection[0]; } - if((verticesTouching[0] && verticesTouching[1]) || (verticesTouching[2] && verticesTouching[3])) { + if((verticesTouching[1] && verticesTouching[2]) || (verticesTouching[3] && verticesTouching[0])) { quadCountByDirection[1] += o.quadCountByDirection[1]; } diff --git a/src/main/resources/shaders/chunk.frag b/src/main/resources/shaders/chunk.frag index e779d7c..d399114 100644 --- a/src/main/resources/shaders/chunk.frag +++ b/src/main/resources/shaders/chunk.frag @@ -23,7 +23,7 @@ void main() if(true){ //FragColor = vec4(1, 1, 1, 1); //FragColor = vec4((SPos.x), (SPos.y), 0, 1); - FragColor = vec4(SPos.x>0.5?1:0,0, 0, 1); + FragColor = vec4(SPos.xy, 0, 1); //FragColor = vec4(abs(TexCoord.x - ProvokingTexCoord.x) * 100.0, abs(TexCoord.y - ProvokingTexCoord.y) * 100.0, 0, 1); //FragColor = vec4((TexCoord.xy - ProvokingTexCoord.xy) * 100.0, 0, 1); } else { @@ -34,9 +34,9 @@ void main() float goodTexCoordU = ProvokingTexCoord.x + (((TexCoord.x - ProvokingTexCoord.x) / SPos.z) * relU); float goodTexCoordV = ProvokingTexCoord.y + (((TexCoord.y - ProvokingTexCoord.y) / SPos.w) * relV); - //vec2 goodTexCoord = vec2(goodTexCoordU, goodTexCoordV); + vec2 goodTexCoord = vec2(goodTexCoordU, goodTexCoordV); - vec2 goodTexCoord = ProvokingTexCoord + vec2(SPos.x / 3.0, SPos.y) * (1.0/16.0); + //vec2 goodTexCoord = ProvokingTexCoord + vec2(SPos.x / 3.0, SPos.y) * (1.0/16.0); vec4 texColor = texture(atlas, goodTexCoord); //vec4 texColor = texture(atlas, TexCoord); |