ComputerCraft

ComputerCraft

21M Downloads

Monitors causing miscolouration of tile entities

char opened this issue ยท 10 comments

commented

Hey - with a monitor in the field of vision, the glColor does not get reset before rendering other tile entities, leading to things like chests being broken.

Here, green text is being drawn on a monitor under me, and the chests are green as well.

image

And here, with the monitor out of frame, the chests return to normal colour.

image

I think this can easily be fixed by running a glColor3f(1, 1, 1) after you've rendered monitors.

commented

Worth noting that this doesn't trigger on all systems - I suspect drivers are a factor, as I've seen a Windows 10 / Nvidia system do it (newer hardware & newer drivers) and a Windows 8.1 / Nvidia system avoid it (older hardware & older drivers).

commented

Alright - I'm on Linux / Nvidia with latest proprietary drivers.

commented

It's worth noting that it already calls GlStateManager.color after rendering. However, this may not have any effect as I believe glCallList will change OpenGL's colour, but not the colours in GLStateManager. Adding a call to GLStateManager.resetColor() after each call to GLStateManager.callList should fix it - I've been unable to reproduce so could someone else test this?

commented

So it isn't just me. Good. @SquidDev I'm able to reproduce this with both signs and chests on the same server - Airwaves. Running AMD graphics.

commented

@DevelopedLogic Could you try with the file linked here and confirm it solves your problem?

commented

@SquidDev I can, however it will be several hours before I can do so. I'm out now so will do it ASAP. Will this fix work on 1.11.2?

commented

@DevelopedLogic It's just for 1.9.4-1.10.2 currently. Though if the bug manifests on 1.11, it'll also appear on 1.10.

commented

@SquidDev I have tested, and I can confirm this issue exists in 1.12 . The screenshots the OP provided were in Airwaves, which was 1.11 at the time, meaning the issued existed in 1.11 . Airwaves is now 1.12 and I still get it.
2017-07-05_20 00 23

Interestingly, I only seem to have the issue when the monitor renders a colour which is not normal, aka one which has been created via setPaletteColour. No matter what angle I go at it, the issue doesn't occur with the default red colour.
2017-07-05_20 03 23

commented

@DevelopedLogic The bug hasn't been fixed in the Airwaves version of ComputerCraft* - you'll need to download the above version and test in a 1.10 world.

*To be more precise, it hasn't been fixed in any version - just in the download.

commented

To explain better - It will not get fixed until this PR gets merged.