comment out imgui stuff for now
This commit is contained in:
BIN
resources/frag.spv
Normal file
BIN
resources/frag.spv
Normal file
Binary file not shown.
20
resources/shader.frag
Normal file
20
resources/shader.frag
Normal file
@@ -0,0 +1,20 @@
|
||||
#version 450
|
||||
layout(location = 0) in vec2 vUV;
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(set = 0, binding = 0) uniform sampler2D uImage;
|
||||
|
||||
layout(push_constant) uniform Screen {
|
||||
vec2 size;
|
||||
vec2 offset;
|
||||
} uScreen;
|
||||
|
||||
layout(constant_id = 0) const float Scale = 1.0;
|
||||
|
||||
void main() {
|
||||
vec2 uv = (vUV - uScreen.offset) / uScreen.size;
|
||||
if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {
|
||||
FragColor = vec4(0, 0, 0, 1);
|
||||
} else {
|
||||
FragColor = Scale * textureLod(uImage, uv, 0.0);
|
||||
}
|
||||
}
|
||||
8
resources/shader.vert
Normal file
8
resources/shader.vert
Normal file
@@ -0,0 +1,8 @@
|
||||
#version 450
|
||||
layout(location = 0) in vec2 Position;
|
||||
layout(location = 0) out highp vec2 vUV;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(Position, 0.0, 1.0);
|
||||
vUV = 0.5 * Position + 0.5;
|
||||
}
|
||||
BIN
resources/vert.spv
Normal file
BIN
resources/vert.spv
Normal file
Binary file not shown.
Reference in New Issue
Block a user