discard fragment if alpha is 0 in screenspacerenderables

This commit is contained in:
Michael Nilsson
2016-03-18 13:52:11 -04:00
parent 5553ec02c9
commit af8880274c
3 changed files with 13 additions and 9 deletions
+3
View File
@@ -39,6 +39,9 @@ Fragment getFragment(){
float depth = (1.0 + log(abs(OcclusionDepth) + 1/pow(k, 1.0))/log(k)) / 27.0;
frag.color = texture(texture1, vs_st);
frag.color.a = (frag.color.a != 0.0f) ? Alpha : frag.color.a;
if(frag.color.a == 0.0f){
discard;
}
frag.depth = depth;
return frag;