feat(rendering): on-screen debug overlay showing current biome and coordinates
Asset-free bitmap-text overlay: a 5x7 font (glyphs defined as verifiable ASCII-art) drawn as solid quads through a tiny 2D shader, white text with a drop shadow for legibility over any background. Renders 'BIOME: <name>' and 'XYZ: x, y, z' top-left, updating live. Adds Shader.SetVector2 and WorldGenerator.BiomeNameAt support; text scale and spawn-height offset read from Configuration.
This commit is contained in:
10
Assets/shaders/debugtext.frag
Normal file
10
Assets/shaders/debugtext.frag
Normal file
@@ -0,0 +1,10 @@
|
||||
#version 330 core
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform vec3 u_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(u_color, 1.0);
|
||||
}
|
||||
12
Assets/shaders/debugtext.vert
Normal file
12
Assets/shaders/debugtext.vert
Normal file
@@ -0,0 +1,12 @@
|
||||
#version 330 core
|
||||
|
||||
// Positions are already in normalized device coordinates; u_offset nudges the
|
||||
// whole batch by a few pixels (in NDC) for the drop-shadow pass.
|
||||
layout (location = 0) in vec2 aPos;
|
||||
|
||||
uniform vec2 u_offset;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(aPos + u_offset, 0.0, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user