Rynnavinx / sodium-shadowy-path-blocks

Reintroduces vanilla-like smooth lighting to non-full blocks (e.g. dirt paths and how they have dark shading when directly next to a full block) when using Sodium. https://www.curseforge.com/minecraft/mc-mods/sodium-shadowy-path-blocks https://modrinth.com/mod/sodium-shadowy-path-blocks
GNU Lesser General Public License v3.0
18 stars 8 forks source link

Some shadows while using shaders are overly dark while using shaders (doesn't happen on Optifine) #22

Open mrjasonn opened 4 months ago

mrjasonn commented 4 months ago

With Only affect path blocks turned off (Shadowyness 100% used): 2024-03-07_21 05 10 Just turn on the Only affect path blocks with this shaders in similar conditions to see that it should not be that dark (you will get similar looks with Optifine if you turn on this option in this mod) Tested on a Mac. Shaders used: Complementary Reimagined Minecraft version: 1.20.6

Mod list

- boostedbrightness 2.2.0 - fabric-api 0.99.0+1.20.6 - immediatelyfast 1.2.15+1.20.6 - iris 1.7.0+mc1.20.6 - lithium 0.12.3 - reeses-sodium-options 1.7.2+mc1.20.5-build.103 - sodium 0.5.8+mc1.20.6 - sodium-extra 0.5.5+mc1.20.6-build.118 - sspb 3.3.0 - wi_zoom 1.5-MC1.20.6

Path blocks look the same with either Iris + SSPB and Optifine using these shaders on a simple village test, so don't worry about the main blocks that this mod targets

mrjasonn commented 3 months ago

@Rynnavinx It would be very nice if you can get this fixed for the Minecraft 1.20.5 release, I'm guessing we could just detect if shaders are on (not a fake on where shaders are enabled but there is no active shaderpack because apparently Iris can do that), and if they are on then we can disable the shadows added by the mod. See the Iris config file and it should help you understand what I mean.

Rynnavinx commented 2 months ago

The thing is that not all shaders are created equal, and as such, I suspect that this issue may not be present on all shaders. I assume the issue is that shadows or AO or something from the shaderpack is overlapping with the strengthened AO (shadowyness) from this mod, so shaders without heavy shadows or added AO might not be affected. As such, force disabling the shadowyness from SSPB when any shader is in use might be too harsh if there are shaders without this issue.

That's just what I'm speculating though. For now, you can just keep using the "only affect path blocks" option, but I'll look into this when I can.

mrjasonn commented 2 months ago

The thing is that not all shaders are created equal, and as such, I suspect that this issue may not be present on all shaders. I assume the issue is that shadows or AO or something from the shaderpack is overlapping with the strengthened AO (shadowyness) from this mod, so shaders without heavy shadows or added AO might not be affected. As such, force disabling the shadowyness from SSPB when any shader is in use might be too harsh if there are shaders without this issue.

That's just what I'm speculating though. For now, you can just keep using the "only affect path blocks" option, but I'll look into this when I can.

@Rynnavinx Maybe the mod can just detect if shaders are on and if they are on disable itself until they are off? Please keep in mind though Iris can have shaders on, whilst not having shaders actually on (you will see in F3 that shaders are enabled but it can say Shaderpack (off) if none is selected) You may want to look into this solution to see if it's viable, and if needed, what would be needed to be added or changed about this solution.

mrjasonn commented 2 months ago

@Rynnavinx I'm guessing the suggestion I gave above is the best way to resolve this bug, just to let you know.

mrjasonn commented 1 month ago

@Rynnavinx This might be related to shaders being able to turn on old lighting, just trying to help, can't guarantee this is best solution.

Rynnavinx commented 1 month ago

@Rynnavinx This might be related to shaders being able to turn on old lighting, just trying to help, can't guarantee this is best solution.

Do you mean vanilla lighting? I feel like this shouldn't be the case. SSPB shouldn't work on these blocks if that were true.

@Rynnavinx Maybe the mod can just detect if shaders are on and if they are on disable itself until they are off? Please keep in mind though Iris can have shaders on, whilst not having shaders actually on (you will see in F3 that shaders are enabled but it can say Shaderpack (off) if none is selected) You may want to look into this solution to see if it's viable, and if needed, what would be needed to be added or changed about this solution.

This is not a good solution because this problem does not affect every shader. Most shaders I've tried don't have this issue. I can't even seem to produce this issue with the shaders you used (I'm assuming you are also using the latest version of Complementary Reimagined, which is r5.1.1, and used default settings). This is also with Only affect path blocks off and Shadowyness 100%. Only Sodium 0.5.8, SSPB 3.3.0, and Iris 1.7.0 were installed when I tested this. Were you using other mods/settings that could have caused this?

2024-05-28_12 20 55

For now, I'd just turn Only affect path blocks on if that fixes it. I can't really figure out what could cause this in SSPB alone.

mrjasonn commented 1 month ago

@Rynnavinx This might be related to shaders being able to turn on old lighting, just trying to help, can't guarantee this is best solution.

Do you mean vanilla lighting? I feel like this shouldn't be the case. SSPB shouldn't work on these blocks if that were true.

@Rynnavinx Maybe the mod can just detect if shaders are on and if they are on disable itself until they are off? Please keep in mind though Iris can have shaders on, whilst not having shaders actually on (you will see in F3 that shaders are enabled but it can say Shaderpack (off) if none is selected) You may want to look into this solution to see if it's viable, and if needed, what would be needed to be added or changed about this solution.

This is not a good solution because this problem does not affect every shader. Most shaders I've tried don't have this issue. I can't even seem to produce this issue with the shaders you used (I'm assuming you are also using the latest version of Complementary Reimagined, which is r5.1.1, and used default settings). This is also with Only affect path blocks off and Shadowyness 100%. Only Sodium 0.5.8, SSPB 3.3.0, and Iris 1.7.0 were installed when I tested this. Were you using other mods/settings that could have caused this?

2024-05-28_12 20 55

For now, I'd just turn Only affect path blocks on if that fixes it. I can't really figure out what could cause this in SSPB alone.

When you asked if I meant vanilla lighting, no. Turning on the old lighting means that Iris won't strip out the directional lighting while that shader is being used. I can tell you that I was on a Mac when I tested this, and Macs don't support Iris's DSA functionality. This might be a reason. Another reason could be my mods, the mod list has been attached in the main thread. So with this information, please do more testing. @Rynnavinx