Select stuff (hit detection is still off)

This commit is contained in:
2021-03-19 02:43:28 +01:00
parent 02f39453ac
commit ff80f7b9aa
8 changed files with 43 additions and 14 deletions

View File

@@ -1,6 +1,11 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
layout(push_constant) uniform PushConstants {
mat4 model;
bool is_selected;
} push;
layout(binding = 0) uniform ObjectUniformData {
mat4 view;
mat4 projection;
@@ -42,4 +47,7 @@ void main() {
vec3 specular_color = specular_value * specular_strength * light_color;
out_color = vec4(ambient_color + diffuse_color + specular_color, 1.0) * texture(diffuse_tex, tex_coords);
if (push.is_selected) {
out_color = mix(out_color, vec4(0.5, 0.5, 0.0, 1.0), 0.1);
}
}