forked from LeenkxTeam/LNXSDK
Converted rendering engine to reverse-z
This commit is contained in:
@ -34,8 +34,8 @@ vec2 rand2(const vec2 coord) {
|
||||
}
|
||||
|
||||
float linearize(float depth, vec2 cameraProj) {
|
||||
depth = depth * 2.0 - 1.0;
|
||||
return cameraProj.y / (cameraProj.x - depth);
|
||||
return cameraProj.y / (cameraProj.x - max(depth, 1e-6));
|
||||
//return cameraProj.y / (cameraProj.x - depth);
|
||||
}
|
||||
|
||||
float attenuate(const float dist) {
|
||||
|
Reference in New Issue
Block a user