vram-guild / canvas

Shader-Based Minecraft Renderer for Fabric
GNU Lesser General Public License v3.0
415 stars 40 forks source link

Change warm_glow material shader #376

Closed supsm closed 2 years ago

supsm commented 2 years ago

warm_glow currently has some issues with allowing things like wood to be emissive, which looks really weird. The detection algorithm is changed from subtraction to comparing the ratios Before: 2022-05-18_17 15 54 jpg After: 2022-05-18_17 13 29 jpg

Don't think it has any unintended side effects, but jack-o-lanterns still look a bit weird since they're fully emissive (but it's always been this way)

spiralhalo commented 2 years ago

Wow that's pretty neat. Have you tested it against all the current usage of warm_glow? (I can do it if you haven't)

supsm commented 2 years ago

I've tested a few, but not all. Seems to be fine from the limited testing

spiralhalo commented 2 years ago

My hunch tells me it will break on redstone lamp or glow berries (don't remember if glow berries use it) since they have more brownish color. Of course we can have some compromise, or alternatively make 2 warm glow materials for different tolerance.

I think you're on the right track by testing it on FmN tho. Lumi or Canvas Standard didn't make the difference very obvious.

supsm commented 2 years ago

Yeah, I'd been playing with it recently and noticed my campfire looked a little off. Really highlights the emissivity well

supsm commented 2 years ago

You're right, but the glow berries actually have the opposite effect: the brown parts between the berries are emissive. Redstone lamp has a few spots that look weird. Looks like I need to do some more tweaking

spiralhalo commented 2 years ago

the brown parts between the berries are emissive

You had one job... /j

Redstone lamp is probably beyond saving. It's fine if you don't support it. It probably needs a "warm_dark_glow"

spiralhalo commented 2 years ago

Actually, it'd probably be fine to make the entire redstone lamp emissive when it's on using sprite predicate. I'll do that after the merge.

supsm commented 2 years ago

Redstone lamp still has some issues, glow berries are fixed

supsm commented 2 years ago

Also a random sidenote: redstone torch looks pretty awful (it uses the redstone material)

supsm commented 2 years ago

Why is the redstone lamp material applied when the lamp is off :concern:

spiralhalo commented 2 years ago

Nice. Here are things that uses warm_glow btw

campfire ✔ blast_furnace cave_vines (glow berries) ✔ cave_vines_plant (bottom glow berry) ✔ furnace lantern magma_block redstone_lamp (unnecessary, will change) torch ✔ wall_torch ✔ blaze (could simply be emissive rather than warm_glow?) glow_item_frame (?)

supsm commented 2 years ago

blast furnace, furnace, lantern, and magma block look good. not sure about lantern... it looks a little weird but at the same time I don't really see how it could be better. glow item frame does not work.

2022-05-18_22 41 26 jpg

supsm commented 2 years ago

blaze also looks fine

2022-05-18_22 46 28 jpg

spiralhalo commented 2 years ago

Neat. Is this ready to merge then?

supsm commented 2 years ago

Probably. after merging, redstone material (redstone.frag) and redstone lamp should be changed