Skip to content

Commit c8db671

Browse files
committed
Override monitors' lightmap coordinates
Shaders appear to ignore all the other subtle (and not-so-subtle) hints we drop that monitors shouldn't be rendered with shadows. This solution isn't optimal, as monitors may still be tinted due to sunlight, but there is nothing we can do about that. Many thanks to ferreusveritas for their help in diagnosing, fixing and testing this issue.
1 parent 52641b7 commit c8db671

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/dan200/computercraft/client/render/TileEntityMonitorRenderer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import net.minecraft.client.Minecraft;
1919
import net.minecraft.client.renderer.BufferBuilder;
2020
import net.minecraft.client.renderer.GlStateManager;
21+
import net.minecraft.client.renderer.OpenGlHelper;
2122
import net.minecraft.client.renderer.Tessellator;
2223
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
2324
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
@@ -97,6 +98,7 @@ private void renderMonitorAt( TileMonitor monitor, double posX, double posY, dou
9798

9899
// Draw the contents
99100
GlStateManager.depthMask( false );
101+
OpenGlHelper.setLightmapTextureCoords( OpenGlHelper.lightmapTexUnit, 0xFF, 0xFF );
100102
GlStateManager.disableLighting();
101103
mc.entityRenderer.disableLightmap();
102104
try

0 commit comments

Comments
 (0)