spiralhalo / LumiLights

Gameplay focused visual improvements for Canvas
GNU Lesser General Public License v3.0
124 stars 11 forks source link

Entities appear too bright #8

Closed Reeses-Puffs closed 3 years ago

Reeses-Puffs commented 3 years ago

I was playing on an SMP and I noticed that darker colored entities, namely spiders and endermen, appeared to be very bright.

Reeses-Puffs commented 3 years ago

2020-12-07_16 41 25 2020-12-07_16 41 44 2020-12-07_21 16 46

spiralhalo commented 3 years ago

Commit 56a31f70152911d192d8df530d639e9972c16ff9 just seem to fix this, but I can't explain this behavior. I will mark is as resolved for the time being and open another issue when I found the root cause.

spiralhalo commented 3 years ago

The root cause seem to be F0 as expected.

F0--determined by index of refraction--represents base reflectivity which is assumed to be 0.04 for non-metals.

In reality each material has different base reflectivity which is too complicated to define individually. I thought 0.04 was low enough to not matter but it seem to cause every dark objects to appear too bright, including blocks.

The problem now is that I don't really know if this is an issue. For example, we don't know the index of refraction of Endermen skin to begin with. F0 wasn't supposed to be a controllable parameter unlike roughness and metallic. Though since I already made an assumption, I will probably make a different assumption that a material's F0 is affected by their texture brightness. Should work to fix the dark object problem at least.

spiralhalo commented 3 years ago

I still can't explain why 56a31f70152911d192d8df530d639e9972c16ff9 fixed it though.

spiralhalo commented 3 years ago

It looks like 56a31f70152911d192d8df530d639e9972c16ff9 fixed a completely different problem (which I still don't understand, by the way). I have opened #11 for base reflectivity related issue if anyone is interested.