Wrong render shader used for some GUI component rendering
VoidedMirror opened this issue ยท 11 comments
Minecraft Version
1.20.x
Version
1.108.3
Details
All border_, pocket_, and sidebar_ textures are rendered using the rendertype_text shader instead of the preferred rendertype_gui shader.
I'm working on a texture pack and i use the redertype_gui shader to recolor different text components. However some shades of gray in the gui textures i have are getting recolored to white. I believe the renderer used for the Turtles and the Disk drive textures are using the normal rendering method for UI elements (I'm not sure if this is specifically the rendertype_gui)
Can you explain why you rendertype_gui
is preferred? From what I can tell, this is only used when filling a solid colour. Indeed, rendertype_gui
doesn't even accept a texture.
Can you link your texture pack? rendertype_gui is never used for text rendering, so I suspect you're misdiagnosing what's going on.
I don't believe it's a miss diagnosis. I tested with this resource pack that changes all elements using the rendertype_text frag shader to full red. Here are some screenshots of the computer and turtle for reference.
rtype_text_red.zip
Ahhh, I assume you meant to say "rendertype_text" in "i use the redertype_gui shader to recolor different text components"?
I'm fear what you're trying to do here just won't work. The vanilla game (ab)uses the text rendertype for several other things (most prominently for held maps) - it's pretty much the only built-in rendertype which works for basic textured elements.
Yes, I'm using the rendertype_text renderer to recolor text elements.
In recent versions of the game most of the rendering has been separated to different renderers. The rendertype_text renderer is only used to render text elements in the base Vanilla game. However, i have noticed that some mod implementations use various shaders to draw dynamic elements that use other vanilla shaders.
This mod is the only one i've come across that actually is using a rendertype_text shader to draw textures. Most of them are drawn correctly as is the case with how the textures are drawn for the Turtle and Computer. It might be that they use different draw methods that have different assigned render shaders? Or it could be an issue with how Forge rendering draws blitz textures and it naively assumes it should keep using the previously assigned shader for the remaining draws.
but then why not define your own rendertype for that?
Unfortunately this tends to cause issues with shader mods like Iris. We're safe to do this with MONITOR_TBO
as that's not compatible with shader mods anyway, but everywhere else we're careful to only use built-in render types.
The rendertype_text renderer is only used to render text elements in the base Vanilla game.
I'm not quite sure about 1.20.2 (I'm hoping things are better there after the GUI sprite changes, but haven't checked), but on 1.20.1 this isn't the case for maps yet:
The problem here is that there are no suitable substitutes for RenderType.text
. There are no other RenderType
s which allow for rendering textures and colours, which is why a lot of mods (and vanilla itself!) end up using it.
Hmm strange the modpack i'm testing on seems to change the map renderer so it's not affected by the text shader anymore. I do see the issue with needing to have a Rendertype that can be used to change the colors but then why not define your own rendertype for that?
I suppose i could alter the colors on my texture to not use those specific shades of gray.