Fix postprocessing being weird
This commit is contained in:
@@ -24,6 +24,10 @@ void main() {
|
||||
}
|
||||
|
||||
float depth = texture(depthTex, UV.xy).r;
|
||||
if (depth == 0.0f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
depth = projDepth(rev3d(vec3(UV.xy, depth)));
|
||||
depth = min(1.0f-(2.0f/((1<<24)-1)), depth);
|
||||
depth = depth * 0.5f + 0.5f;
|
||||
|
||||
@@ -53,7 +53,7 @@ void main() {
|
||||
point += scale*0.5f;//Offset to the center of the textile
|
||||
float depth = texture(depthTex, point).r;
|
||||
vec4 ocolour = vec4(0);
|
||||
if (depth < 1.0f) {
|
||||
if (depth!=0.0f && depth < 1.0f) {
|
||||
vec4 colour = texture(colourTex, point);
|
||||
if (colour == vec4(0.0f, 0.0f, 0.0f, 0.0f)) {
|
||||
ocolour = vec4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
Reference in New Issue
Block a user