I couldn’t decide how to properly write a title for this post. Feel free to edit.
I have 3 uniforms on fragment shader for defining colors. They all set from .material and also by using go.set and colors(values) are correct(I tested them one by one).
This happens only on Vulkan, works with GL
When I try to assign those colors to vec3 using .rgb, values are not taken into account.
vec3 col = color1.rgb; // <- This works
if (d_light > border.x)
{
col = color2.rgb; // <- not working, no effect
col = vec3(color2.r, color2.g color2.b); // <- not working, no effect
col = vec3(0.9, 0.27, 0.22); // <- This works
}
if (d_light > border.y)
{
col = color3.rgb; // <- not working , no effect
col = vec3(color3.x, color3.y, color3.z); // <- not working, no effect
col = vec3(0.68, 0.18, 0.27); // <- This works
}
[above code is just for giving you a info, I know last line overwrites the col. I tested them one by one]
If I use col = color2.rgb; or col = color3.rgb; then the result is always the col = color1.rgb; :
Not sure what’s going on to be honest.
Perhaps you can use Renderdoc to debug the uniforms, and see what’s going on?
I wonder if we for some reason doesn’t upload the uniforms correctly?