Fix volume rendering depth sorting issue

This commit is contained in:
Emil Axelsson
2018-11-22 12:37:11 +01:00
parent 9d0f0e00df
commit b6d3a4a8ea
+1 -2
View File
@@ -30,10 +30,9 @@ in vec4 positionCameraSpace;
Fragment getFragment() {
vec4 position = positionCameraSpace;
float depth = safeLength(position);
Fragment frag;
frag.color = vec4(positionLocalSpace.xyz + 0.5, 1.0);
frag.depth = depth;
frag.depth = -position.z;
return frag;
}