Uninitialized variables!
For Vulkan, uninitialized variables might produce strange results in your shader. It is recommended that you always initialize your variables.
Code: Select all
// might "work" in OpenGL but produce strange results in Vulkan
vec4 newColor;
// this is safer and will ensure consistency in both OpenGL and Vulkan
vec4 newColor = vec4(0.0, 0.0, 0.0, 0.0);
Happy shading!