Continuation of #14736 as a result of fix #14752
While fog now works on mobile with mediump, it is still bugged.
Sorry for the less than perfect example, adding the heightmap to highlight the issue would be a pain. Will do so if necessary.
https://jsfiddle.net/titansoftime/o81nje2a/
See the break of fog on the green plane at the furthest distance:
This is also what I am seeing in app (although much more noticeable than in the example):
/cc @greggman
I already gave you a solution.
@titansoftime Please help by experimenting with your code to identify changes that will make the problem go away.
Try reducing the value of the camera's far plane.
So this new fog puts a limit on camera.far? In the example this is no problem, in app however, it means I will have to make things a bit smaller as I have lensflares, and domes from the hemisphere light example etc. that need to be further than the terrain plane.
In master version I have no issues whatsoever and the fog doesn't really look noticeably different.
It's not like three.js to knowingly include bugs.
It's not like three.js to knowingly include bugs.
That is a false premise.
Please help by experimenting with your code to identify changes that will make the problem go away.
...and then report back.
The change that make the bug go away in all situations is using the master version instead of the dev build.
I recommend reverting the change to fog as bhouston has pointed out the previous method not only worked but is considered a viable option by respected voices in the 3d community.
I feel like I have put more than enough time into this issue. I will be overwriting the fog shader code moving forward as that seems to be recommended solution for resolving three.js issues.
Leaving this open in case anyone decides to actually fix it.
@titansoftime what @WestLangley is asking for is to see if you can help us by tweaking the camera.far
and fog.far
values and see if the artifact goes away at some point. We can't reproduce outselves so that kind of information will help us when trying to resolve this.
Also, is this with Fog
or FogExp2
?
I will unfortunately not have the free time myself to play around with this until at least this weekend (if not the weekend after that). Debugging mobile at my pharmacy is too obvious lol. Kids just started school etc. etc. Super busy.
FogExp2.
Okay. Reverted for now.
Most helpful comment
@titansoftime Please help by experimenting with your code to identify changes that will make the problem go away.
Try reducing the value of the camera's far plane.