Преглед изворни кода

chromatic aberration alpha

Trevor Baron пре 7 година
родитељ
комит
1cf5796df7
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/Shaders/chromaticAberration.fragment.fx

+ 1 - 1
src/Shaders/chromaticAberration.fragment.fx

@@ -39,6 +39,6 @@ void main(void)
 	original.r = texture2D(textureSampler, ref_coords_r).r;
 	original.g = texture2D(textureSampler, ref_coords_g).g;
 	original.b = texture2D(textureSampler, ref_coords_b).b;
-
+	original.a = clamp(texture2D(textureSampler, ref_coords_r).a + texture2D(textureSampler, ref_coords_g).a + texture2D(textureSampler, ref_coords_b).a, 0., 1.);
 	gl_FragColor = original;
 }