added main menus, improved shading

This commit is contained in:
2025-07-18 20:37:52 +03:00
parent dddf1b5881
commit 070c3ff309
45 changed files with 859 additions and 271 deletions

View File

@@ -1,4 +1,4 @@
bind esc exit;
bind f11 exit;
bind a +left;
bind d +right;
bind w +forward;

View File

@@ -7,9 +7,8 @@ float4 _main(
) : SV_TARGET
{
float dist = SampleTexture(font, (input.uv+glyphPos)*glyphSize).x;
float smoothing = 0.2;
float alpha = smoothstep(0.5-smoothing, 0.5+smoothing, dist);
if (alpha<0.01) discard;
return float4(color);
float smoothing = 0.4;
float alpha = clamp(smoothstep(0.5-smoothing, 0.5+smoothing, dist),0,1);
return float4(fontColor.xyz, alpha);
}

View File

@@ -12,7 +12,7 @@ DECLARE_CONSTANTS()
int2 resolution;
uint2 size;
int2 position;
float4 color;
float4 fontColor;
float2 glyphPos;
float2 glyphSize;
uint font;