2021-08-12 23:29:45 -07:00
|
|
|
#version 450
|
2022-08-15 19:48:59 -07:00
|
|
|
#extension GL_GOOGLE_include_directive : enable
|
|
|
|
|
|
|
|
|
|
#include "vulkan_test_include.glsl"
|
2021-08-12 23:29:45 -07:00
|
|
|
|
|
|
|
|
// Temporary test shader for vulkan bringup...
|
|
|
|
|
// See https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Shader_modules
|
|
|
|
|
|
|
|
|
|
layout(location = 0) out vec3 fragColor;
|
2022-02-27 22:10:17 -08:00
|
|
|
layout(location = 0) in vec3 vertex_position;
|
2022-07-07 00:23:14 -07:00
|
|
|
layout(location = 1) in vec3 vertex_normal;
|
|
|
|
|
layout(location = 2) in vec3 vertex_tangent;
|
2022-02-27 22:10:17 -08:00
|
|
|
layout(constant_id = 0) const int QUALITY_LEVEL = 64; // Specialization constant test
|
2021-08-12 23:29:45 -07:00
|
|
|
|
2022-07-07 19:29:50 -07:00
|
|
|
layout( push_constant ) uniform constants
|
|
|
|
|
{
|
|
|
|
|
vec3 fade_color;
|
|
|
|
|
mat4 model_matrix;
|
|
|
|
|
} PushConstants;
|
|
|
|
|
|
2021-08-12 23:29:45 -07:00
|
|
|
void main() {
|
2022-02-28 21:27:25 -08:00
|
|
|
gl_Position = vec4(vertex_position * 0.5, 1.0);
|
2022-08-15 19:48:59 -07:00
|
|
|
fragColor = vertex_normal * 0.25 + vec3(0.5, 0.5, 0.5) * VULKAN_TEST_BRIGHTNESS;
|
2021-08-12 23:29:45 -07:00
|
|
|
}
|