added main menus, improved shading
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
bind esc exit;
|
||||
bind f11 exit;
|
||||
bind a +left;
|
||||
bind d +right;
|
||||
bind w +forward;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ DECLARE_CONSTANTS()
|
||||
int2 resolution;
|
||||
uint2 size;
|
||||
int2 position;
|
||||
float4 color;
|
||||
float4 fontColor;
|
||||
float2 glyphPos;
|
||||
float2 glyphSize;
|
||||
uint font;
|
||||
|
||||
Reference in New Issue
Block a user