SPIR-V shader error


I’m trying to see if I can add Vulkan support for my game. However, I’m seeing some shader error:

	Uniforms 'mtx_worldview, mtx_view' from set 0 have the same binding 0

There are only 4 errors (at least so far, maybe more will reveal after I fix these :blush) has anyone seen this?



I think there is some uniform declared but not really used in the code of the shader. Maybe…



Thanks this resolved the error! However, my transparent textures are now completely transparent after switching. Here’s the FP where I made custom adjustments:

attribute highp vec4 position;
attribute mediump vec2 texcoord0;
attribute mediump vec3 normal;

uniform mediump mat4 mtx_worldview;
uniform mediump mat4 mtx_view;
uniform mediump mat4 mtx_proj;
uniform mediump mat4 mtx_normal;
uniform mediump vec4 light;
uniform lowp vec4 shiftz;

varying highp vec4 var_position;
varying mediump vec3 var_normal;
varying mediump vec2 var_texcoord0;
varying mediump vec4 var_light;

void main()
	vec4 p = mtx_worldview * vec4(position.xyz, 1.0);
	var_light = mtx_view * vec4(light.xyz, 1.0);
	var_position = p;
	var_texcoord0 = texcoord0 + shiftz.xy;
	var_normal = normalize((mtx_normal * vec4(normal, 0)).xyz);
	gl_Position = mtx_proj * p;

Not sure what the issue is. I’m applying a “shiftz” variable to morph my transparent textures (to animate them for the portals in my game, etc.)

EDIT: Fixed it! It was the fact I was changing a user variable “tint” in the shader, but the material didn’t have tint added. For some reason there was no issue without SPIR-V but with it, it required me to add that. Glad I did this, my shaders are improving as a result.