ComplementaryDevelopment / ComplementaryReimagined

Complementary is a graphical rework pack for Minecraft with exceptional quality, detail, and performance.
https://www.complementary.dev/shaders/
Other
185 stars 53 forks source link

Fully transparent pixels and partially transparent pixels in specular maps have weird interactions at acute angles as well as at distance #25

Closed Traister101 closed 1 year ago

Traister101 commented 1 year ago

Firstly here's a minimum reproducible pack it has two specular maps, one for sand and one for red sand. Sand has a single pixel in the top left which is at 60% opacity (not special just what I happened to chose) this pixel should be (and is) emissive however at acute angles as well as at a distance it "spreads" to the whole block. The red sand is identical accept it's top left pixel is instead fully transparent this means it shouldn't be emissive and it's not, most of the time. Similar to the normal sand at acute angles or at a distance it is emissive as well as "spreads" to the whole block. The following screenshot is what this looks like in game. 2023-06-01_00 04 16 When using Complementary v4 (or other packs) it looks like this 2023-06-01_00 04 26 ~~For example here's Sildur's Vibrant shaders 2023-06-01_00 21 48~~ Realized that Sildur's doesn't seem to support PBR so here is a screenshot using BSL 2023-06-01_00 30 24 You can see how it looks similar to Complementary v4 and doesn't have the same issue Reimaged is having.

Obviously they won't look exactly the same because of differences between them but there's also something clearly wrong with Reimaged here.

I'm playing on Minecraft: 1.19.3 Fabric: 0.14.19 Using Iris: 1.5.2 and Sodium: 0.4.9 no other mods are present. I'm using an Nvidia GTX 1660 Super running the latest drivers which are 535.98 Complementary Reimaged version is: 2.1 (latest) I'll even throw in my settings which is just enabling labPBR RP support (in this minimal reproducible example)

EminGT commented 1 year ago

Oh, I was the one that fixed this issue on BSL as well, but I forgot to put the same fix in Reimagined. This is caused by specular mipmapping blurring the texture, causing 100% alpha pixels to blend with your 60% or 0% alpha pixels, resulting higher-than-intended emission levels. It will be fixed in the 1.20 update for Reimagined (r2.2), but you can also fix the problem by replacing your 100% alpha pixels in your speculars with 0% alpha pixels. Thank you for the detailed report!

Traister101 commented 1 year ago

Ah, that makes sense. The thing with the alpha is that yes fully opaque pixels (100%) will prevent the issue it'll also stop emission from working seeing as it's tied to the alpha lol. Can see how my thoughts went to the screwy PR :/

Thanks, glad to help out

Traister101 commented 1 year ago

Alright r2.2 has resolved the issue so I'll close this, appreciate your work!