fix fisheye rendering bug

This commit is contained in:
Emil Axelsson
2016-06-15 10:41:47 +02:00
parent 76a2f78676
commit fa1bf5873f
+1 -5
View File
@@ -53,11 +53,7 @@ float pscDepth(vec4 position) {
// For now: simply convert power scaled coordinates to a linear scale.
// TODO: get rid of power scaled coordinates and use scale graph instead.
// return (position.w + log(abs(position.z) + 1/pow(k, position.w))/log(k)) / 27.0;
if (position.z < 0) {
return safeLength(pscToLinear(position));
} else {
return -safeLength(pscToLinear(position));
}
return safeLength(pscToLinear(position));
}