Zero out memory from color variable

According to [here](https://www.khronos.org/opengl/wiki/Type_Qualifier_(GLSL)#Fragment_shader_outputs) memory of a fragment shader variable is initialized with undefined values. Therefore it should be zeroed out.
This commit is contained in:
Felix Weilbach
2020-04-27 16:44:24 +02:00
committed by GitHub
parent be066bcb6e
commit c91f8d65a5

View File

@@ -13,6 +13,9 @@ uniform bool shake;
void main()
{
// zero out memory since an out variable is initialized with undefined values by default
color = vec4(0.0f);
vec3 sample[9];
// sample from texture offsets if using convolution matrix
if(chaos || shake)