VirtualZer0 / IsaacOnTwitchReloaded

The Binding of Isaac mod for Twitch integration
https://isaacontwitch.com
GNU General Public License v3.0
19 stars 6 forks source link

[BUG] Shaders cause black screen #21

Closed danielhrt closed 2 years ago

danielhrt commented 2 years ago

Bug description | Краткое описание A black screen when a start game with the mod

How to reproduce | При каких условиях появляется When the mod is active he make a black screen on game when a start to play

Expected behavior | Как это должно работать правильно

OS/Browser/Game versions | ОС, версия браузера и/или игры last version, windows 10

Log files/Console messages | Логи и сообщения консоли

Additional infromation | Дополнительная информация

VirtualZer0 commented 2 years ago

Looks like the old shader bug is back. It is very specific and occurs only on certain hardware. To fix it, i will need someone who can help with testing it on their PC.

danielhrt commented 2 years ago

I know how to code a little in lua, I can try to find the problem, do you have an indication for the main or the script file to tell me where the problem can come from? Or at least where was the old shaders bug

VirtualZer0 commented 2 years ago

You need the shaders.xml file in the mod folder. Remove one shader at a time from this file until the black screen disappears.

VirtualZer0 commented 2 years ago

And just in case, let me know the characteristics of your hardware.

danielhrt commented 2 years ago

winows 10 CPU : 5700X GPU : 6600XT 8Go Ram : viper steel 2x8Go

danielhrt commented 2 years ago

I found the problem is this part of shaders.xml

0) { tintColor.r *= sin(TimeOut * 0.0432f)*2; tintColor.g *= sin(TimeOut * 0.0376f)*2; tintColor.b *= sin(TimeOut * 0.0231f)*2; } color.rgb = color.rgb + (smoothstep(0.1,0.9, screenPosX - .7) * tintColor.rgb); color.rgb = color.rgb + (smoothstep(0.1,0.9, .3 - screenPosX) * tintColor.rgb); color.rgb = color.rgb + (smoothstep(0.1,0.9, screenPosY - .7) * tintColor.rgb); color.rgb = color.rgb + (smoothstep(0.1,0.9, .3 - screenPosY) * tintColor.rgb); gl_FragColor = color; } ]]>
VirtualZer0 commented 2 years ago

Okay, now turn the shader back on, start the game, and start a new run. After that, log out and send your log.txt, which is located here: C:\Users\username\Documents\My Games\Binding of Isaac Afterbirth+

danielhrt commented 2 years ago

log.txt

danielhrt commented 2 years ago

[INFO] - Failed to compile fragment shader. Errors - WARNING: 0:119: '#extension' : extension not supported: GL_ARB_texture_query_levels WARNING: 0:120: '#extension' : extension not supported: GL_ARB_fragment_layer_viewport ERROR: 0:19: 'floating-point suffix' : not supported for this version or the enabled extensions ERROR: 0:19: '' : compilation terminated ERROR: 2 compilation errors. No code generated.

If you prefered that is the error

VirtualZer0 commented 2 years ago

Try to remove all "f" from

if (TimeOut > 0) {
tintColor.r *= sin(TimeOut * 0.0432f)*2;
tintColor.g *= sin(TimeOut * 0.0376f)*2;
tintColor.b *= sin(TimeOut * 0.0231f)*2;
}
danielhrt commented 2 years ago

Is that enable is just the letter "f" who crash the shaders, thanks you

VirtualZer0 commented 2 years ago

Glad the problem is fixed. Tomorrow I will release an update with this fix. Thanks for the help.