diff options
author | makamys <makamys@outlook.com> | 2022-06-20 22:05:05 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-20 22:05:05 +0200 |
commit | 413bee34e68e977a779a95a0c2e89d60c254d261 (patch) | |
tree | 415796ef6b57519195d0a952f89d884df78c928d /src/main/resources/shaders/chunk.frag | |
parent | 42b814f0470317661a23aa1403041cad27ec880f (diff) | |
download | Neodymium-413bee34e68e977a779a95a0c2e89d60c254d261.tar.gz Neodymium-413bee34e68e977a779a95a0c2e89d60c254d261.tar.bz2 Neodymium-413bee34e68e977a779a95a0c2e89d60c254d261.zip |
Fix lava rendering
Diffstat (limited to 'src/main/resources/shaders/chunk.frag')
-rw-r--r-- | src/main/resources/shaders/chunk.frag | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/resources/shaders/chunk.frag b/src/main/resources/shaders/chunk.frag index b19f152..24cc97e 100644 --- a/src/main/resources/shaders/chunk.frag +++ b/src/main/resources/shaders/chunk.frag @@ -17,10 +17,13 @@ uniform sampler2D lightTex; void main() { - float wrappedU = mod(MQPos.x, 1.0); - float wrappedV = mod(MQPos.y, 1.0); - - vec2 goodTexCoord = ProvokingTexCoord.xy + (((TexCoord.xy - ProvokingTexCoord.xy) / MQPos.zw) * vec2(wrappedU, wrappedV)); + vec2 goodTexCoord = TexCoord; + if(MQPos.x <= 254){ + float wrappedU = mod(MQPos.x, 1.0); + float wrappedV = mod(MQPos.y, 1.0); + + goodTexCoord = ProvokingTexCoord.xy + (((TexCoord.xy - ProvokingTexCoord.xy) / MQPos.zw) * vec2(wrappedU, wrappedV)); + } vec4 texColor = texture(atlas, goodTexCoord); |