This commit is contained in:
Gene Payne
2016-06-15 15:40:48 +02:00

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));
}