feat: three render modes — terminal, ascii, graphics
Three render modes: - --mode terminal: pure ANSI ASCII in terminal - --mode ascii: Vulkan window with ASCII characters (glyph atlas) - --mode graphics: Vulkan window with colored cells (no glyphs, each material = unique base color, no lighting yet) Graphics renderer: - Same Vulkan pipeline as ASCII but without glyph atlas - Simpler shaders: graphics.vert/frag just output instance color - No descriptor set, no texture sampling - Each cell = colored quad, material color fills entire cell - Entities rendered as colored shapes (player=yellow, goblin=green) Default mode changed to --mode ascii 109 tests, 0 failures
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#version 450
|
||||
|
||||
layout(location = 0) in vec4 in_color;
|
||||
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
void main() {
|
||||
out_color = in_color;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#version 450
|
||||
|
||||
layout(push_constant) uniform PC {
|
||||
vec2 screen_size;
|
||||
vec2 cell_size;
|
||||
} pc;
|
||||
|
||||
layout(location = 0) in vec2 in_pos;
|
||||
layout(location = 1) in vec2 in_grid;
|
||||
layout(location = 2) in vec4 in_color;
|
||||
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
void main() {
|
||||
vec2 pixel = (in_grid + in_pos) * pc.cell_size;
|
||||
gl_Position = vec4(
|
||||
2.0 * pixel.x / pc.screen_size.x - 1.0,
|
||||
2.0 * pixel.y / pc.screen_size.y - 1.0,
|
||||
0.0, 1.0
|
||||
);
|
||||
out_color = in_color;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user