Ensure that all vertex attribute / sampler inputs always have valid values
coderbot16 opened this issue ยท 2 comments
Some render types in Minecraft don't provide a valid base texture (texture/gtexture/tex) or lightmap. They might also not provide valid texture coordinates, lightmap coordinates, vertex normals, or similar.
Where existing code doesn't provide these values, Iris should provide placeholders so that code using these values works as expected.
- texture/gtexture/tex: A 1x1 white pixel
- lightmap: The lightmap texture, as expected
- gl_MultiTexCoord0: (0.5, 0.5)
- gl_MultiTexCoord1: (240, 240)
These placeholder values should make shader packs work as expected more often. It's needed for lines to properly cast shadows with BSL / Complementary and for enchantment glints to work with Sildur's Enhanced Default, for example.
This would fix ender dragon death beams and lightning without needing shader packs to provide workarounds, since both of these use the lightning render type which omits most vertex attributes and doesn't have any vanilla sampler inputs.
Related issue: #706 (the death beams part)
midTexCoord not being properly initialized is also the cause of #865