fix: flip Y in vertex shader, dynamic viewport/scissor, clean debug
- Fix: Y coordinate was inverted (1.0 - 2.0*y → 2.0*y - 1.0) Vulkan clip space Y is already down-up, no need to flip - Fix: dynamic viewport/scissor with viewport_count(1) + scissor_count(1) Required by validation layer even with dynamic state - Clean: removed debug eprintlns, restored default clear color - Shaders recompiled to SPIR-V
This commit is contained in:
@@ -16,12 +16,12 @@ layout(location = 1) out vec4 out_fg;
|
||||
layout(location = 2) out vec4 out_bg;
|
||||
|
||||
void main() {
|
||||
vec2 pixel = in_grid * pc.cell_size + in_pos * pc.cell_size;
|
||||
vec2 clip = vec2(
|
||||
vec2 pixel = (in_grid + in_pos) * pc.cell_size;
|
||||
gl_Position = vec4(
|
||||
2.0 * pixel.x / pc.screen_size.x - 1.0,
|
||||
1.0 - 2.0 * pixel.y / pc.screen_size.y
|
||||
2.0 * pixel.y / pc.screen_size.y - 1.0,
|
||||
0.0, 1.0
|
||||
);
|
||||
gl_Position = vec4(clip, 0.0, 1.0);
|
||||
out_uv = in_atlas.xy + in_pos * in_atlas.zw;
|
||||
out_fg = in_fg;
|
||||
out_bg = in_bg;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user