CreativeMD / LittleFrames

GNU Lesser General Public License v3.0
13 stars 7 forks source link

Pictures no get rendered using shaders #49

Closed SrRapero720 closed 1 year ago

SrRapero720 commented 1 year ago

Right now. littleframes no show any picture on 1.19.4 using shaders. (take your time to read this, i documented everything): https://github.com/SrRapero720/waterframes/issues/1

Screenshots

2023-05-05_15h33_40 2023-05-05_15h33_33


I make a backport of littleframes 1.19.4 to 1.19.2 and that version CANT show pictures with shaders. but the current 1.19.2 can do. At the first wave trying to solve this problem i solve it just changing ShaderInstance with GameRenderer::getPositionTexColorShader but shaders apply a weird shadown and tint the picture with a weird orange.

Screenshot

image

I spend a lot of time trying to figure out what is wrong in waterframes, reading littleframes code 10 times figure out what is wrong. if i remove/skip someting but problem is from both mods. Turning off realistic clouds fix the issue, but brightness on pictures get ignored and isn't a good workaround.

Screenshots

How works LittleFrames 1.19.2 image How works LittleFrames/Waterframes in 1.19.4 using BSL without realistic clouds 2023-05-05_15h45_09

Posibles fix

Revert https://github.com/CreativeMD/LittleFrames/commit/e6f87fbbc8dd2dd1c05dc709123f278f8e4d65ce Is the best solution right now. if people see frames very bright they can reduce it in frame config or change shader config to reduce shader brightness (Example with BSL)

2023-05-05_15h54_30


Use this fix: https://github.com/SrRapero720/waterframes/commit/d43178579eb6b0a575bdd827e389cc7f5f787192#diff-a315acec4ad95757cfe4ed0c13b71b2484578f5c4f635339fd9124e7f95358dcR84 The counterpart is pictures get a yellow tint with some shaders and weird shadows on picture borders

CreativeMD commented 1 year ago

First of all thanks a lot for all your effort. Very cool to see you taking the time to document it well.

Compatibility with shaders always has been quite a struggle. Shaders often struggled to calculate proper shadow, which often times resulted in the frame being dark while being in the sunlight. Somebody suggested to me that this has to do with the normals: https://github.com/CreativeMD/LittleFrames/issues/25. So I changed it to get rid of the issue.

I have started to test it on my own. I have tried out various things. To use a different format, added all kinds of render system calls, added my own shader format. Nothing works. Changing it back is probably the easiest solution, but I will try a few more things before I give up. I also contacted the author of the BSL Shader, he could not really help me. Currently trying to get in contact with the authors of Rubidium and Oculus. Let's see. BTW, using Optifine this issue does not occur, but it actually has the same result as leaving out the normals.

SrRapero720 commented 1 year ago

I had forgotten to send updates regarding

I was testing with the old shader (getPositionTexShader) from littletiles 1.19.2 and it generates crashes with some shaders I've tried (Makeup ultra-fast) so the only quick solution is to use getPositionTexColorShader Crashes for example: https://gist.github.com/SrRapero720/502d7c72aabac097604a9c2af45b0427

I was testing and with all shaderpacks i have doesn't crash and it works with or without shaders. the only detail is the overglow and the orange tint which can be fixed by adjusting the blocklight properties which include the shader settings Details here: https://github.com/SrRapero720/waterframes/wiki/Incompatible-Shaders-(and-how-to-make-it-compatible)

with this the only shader that is incompatible with WF and LF would be ComplementaryV4 which overbright the image. but everything else is fine. 2023-05-09_14h48_50

The only issue is that weird deformed shadow in front of the image that i dont know what cause it. but is a minor inconvenient.

2023-05-09_14h50_52 2023-05-09_14h50_34

CreativeMD commented 1 year ago

I have applied your suggested fix for the moment. I could not find a different way to get rid of this issue. Maybe in 1.20 there will be a new way.