Browse Source

chromatic aberration alpha

Trevor Baron 7 năm trước cách đây
mục cha
commit
1cf5796df7
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;
 }