mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Minor changes
This commit is contained in:
parent
e6752008e0
commit
e5afca89f7
8 changed files with 50 additions and 2 deletions
|
@ -137,10 +137,15 @@ void main(void)
|
|||
float bottomPlaneIntersect = clamp((cloudHeight - cameraPosition.y) / viewVec.y, 0., 4. * fogDistance);
|
||||
float topPlaneIntersect = clamp((cloudHeight + cloudThickness - cameraPosition.y) / viewVec.y, 0., 4. * fogDistance);
|
||||
|
||||
#if (VOLUMETRICS_UNDERSAMPLING <= 1)
|
||||
bottomPlaneIntersect = min(depth, bottomPlaneIntersect);
|
||||
topPlaneIntersect = min(depth, topPlaneIntersect);
|
||||
#else
|
||||
if ((bottomPlaneIntersect > depth + 5.0) != (topPlaneIntersect > depth + 5.0)) {
|
||||
bottomPlaneIntersect = min(depth, bottomPlaneIntersect);
|
||||
topPlaneIntersect = min(depth, topPlaneIntersect);
|
||||
}
|
||||
#endif
|
||||
|
||||
float startDepth = min(bottomPlaneIntersect, topPlaneIntersect);
|
||||
float endDepth = max(bottomPlaneIntersect, topPlaneIntersect);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue