Select stuff (hit detection is still off)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -3,6 +3,7 @@
|
||||
|
||||
layout(push_constant) uniform PushConstants {
|
||||
mat4 model;
|
||||
bool is_selected;
|
||||
} push;
|
||||
|
||||
layout(binding = 0) uniform ObjectUniformData {
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user