Initial vulkan context and immediate drawer.
Extremely rough, just checking in so DrChat can snoop.
This commit is contained in:
23
src/xenia/ui/vulkan/shaders/immediate.frag
Normal file
23
src/xenia/ui/vulkan/shaders/immediate.frag
Normal file
@@ -0,0 +1,23 @@
|
||||
#version 450 core
|
||||
precision highp float;
|
||||
|
||||
layout(push_constant) uniform PushConstants {
|
||||
mat4 projection_matrix;
|
||||
int restrict_texture_samples;
|
||||
} push_constants;
|
||||
|
||||
layout(set = 0, binding = 0) uniform sampler2D texture_sampler;
|
||||
|
||||
layout(location = 0) in vec2 vtx_uv;
|
||||
layout(location = 1) in vec4 vtx_color;
|
||||
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
void main() {
|
||||
out_color = vtx_color;
|
||||
if (push_constants.restrict_texture_samples == 0 || vtx_uv.x <= 1.0) {
|
||||
vec4 tex_color = texture(texture_sampler, vtx_uv);
|
||||
out_color *= tex_color;
|
||||
// TODO(benvanik): microprofiler shadows.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user