CC: Tweaked

CC: Tweaked

59M Downloads

Monitors can't display colors without shader

137-Trimethylxanthin opened this issue ยท 1 comments

commented

Minecraft Version

1.20.x

Version

1.106.1

Details

my log:
latest.log

my mods :
mods.txt

with shader:
2023-08-01_18 24 11

without shader:
2023-08-01_18 08 31

so i have been using this mod for about 1 week now and have maybe found a bug in the latest version.
the colors are broken on monitors when i don't use a shader
the first time it was when i re-ran my code, the colors broke with the shader but after a restart it fixed it but the shadows were to annoying so i kept the shader off during development but i wondered why it wouldn't work with the colors then and after some testing i found it works with the shader on and off it just wouldn't

to recreate it i think you must

  1. set shader to rethinking voxels whit iris and sodium
    rethinking-voxels_r0.1_alpha4.zip
  2. get an advanced monitor
  3. set the background color to white
  4. watch what happens
  5. turn off the shader
  6. watch what happens

my code for the display looks like this

local function draw_chest_space()
    monitor.clear()
    monitor.setCursorPos(1, 1)
    width, height = monitor.getSize()
    monitor.setBackgroundColor(colors.white)
    monitor.clear()
    print(monitor.getBackgroundColor())
    
    monitor.setTextColor(colors.green)
    monitor.setBackgroundColor(colors.red)
    print(monitor.getBackgroundColor())
    monitor.setCursorPos(width / 2 - 6, height / 2 - 2)
    monitor.write("Chest Space:")
    monitor.setCursorPos(width / 2 - 2, height / 2 - 1)

    monitor.write(chest[1].currentSizeMissing .. "/" .. chest[1].maxSize)
    
    local percentacge = chest[1].currentSizeMissing / chest[1].maxSize

    for i = 2, width - 1 do
        monitor.setCursorPos(i, height / 2)
        if i - 1 <= percentacge * (width - 2) then
            monitor.setBackgroundColor(colors.red)
        else
            monitor.setBackgroundColor(colors.white)
        end
        
        monitor.write(" ")
    end

end

i hope its a genuine error and not just me being stupid
sorry if i wasted your time

commented

I'm afraid this is an issue with Iris - see IrisShaders/Iris#2053.