`IrisTextVertexSink` uses wrong vertex offsets when shaders are disabled
SquidDev opened this issue ยท 3 comments
What happened?
- Install Sodium, Iris, and ComputerCraft in a fresh instance.
- Configure Iris with the default settings (i.e. no shaders)
- Place down a computer and a monitor next to it.
- Write something to the monitor (e.g.
monitor left paint a
). - Observe the monitor is very dark.
A similar issue was reported back in April (#1959), and marked fixed. It's not clear if this is another regression, or if the bug was only fixed in the case of shaders.
Screenshots
With shaders
Without shaders
Log output
Minecraft Version
Minecraft 1.19.4
Iris Version
iris-mc1.19.4-1.6.4
Operating System
Linux, but I've had reports on Windows too.
What is your GPU?
AMD Ryzen 7 Pro 4750U, confirmed on other GPUs
Additional context
See also cc-tweaked/CC-Tweaked#1502 and cc-tweaked/cc-restitched#148 for related issues.
Finally sat down with RenderDoc and looked at this.
Inspecting the input of the vertex shader, we can see that UV2 set is set to (0, 10), when we'd expect it to be fullbright. This causes the output colour to be incredibly dark.
Looking at the VBO itself, we can see that UV2 has an offset of 24, while IrisTextVertexSinkImpl
hard-codes an offset of 28.
I'm assuming what's going on here is that the Iris hard codes the offsets for IrisVertexFormats.ENTITY
. However, because shaders aren't active, this code is skipped and so we're actually rendering with the default POSITION_COLOR_TEX_LIGHTMAP
vertex format.
Recently I came across this problem on ATM9, and discovered that the problem was on Oculus/Iris, I just removed it, if you are not going to use Shaders I highly recommend removing it from your mod pack, the monitors return to normal almost than immediately.