mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 23:46:29 +02:00
writting the abs differently
This commit is contained in:
parent
f509d1fca4
commit
0b221abfb2
1 changed files with 2 additions and 1 deletions
|
@ -127,7 +127,8 @@ int frustumGrid_eyeDepthToClusterLayer(float eyeZ) {
|
|||
ivec3 frustumGrid_eyeToClusterPos(vec3 eyePos) {
|
||||
|
||||
// make sure the frontEyePos is always in the front to eval the grid pos correctly
|
||||
vec3 frontEyePos = vec3(eyePos.x, eyePos.y, -abs(eyePos.z));
|
||||
vec3 frontEyePos = eyePos;
|
||||
frontEyePos.z = (eyePos.z > 0.0f ? -eyePos.z : eyePos.z);
|
||||
vec3 volumePos = frustumGrid_eyeToVolume(frontEyePos, frustumGrid.eyeToGridProj, frustumGrid.rangeNear, frustumGrid.rangeFar);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue