diff options
| author | yum <yum.food.vr@gmail.com> | 2024-12-01 00:11:04 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-12-01 00:11:04 -0800 |
| commit | 3089bd2ea6a3952e3ea0f31d8fc5eca1864cefab (patch) | |
| tree | 8dc16932eb96cc4e592b865731b10c37a8fb31e8 /disinfo.cginc | |
| parent | 8232f195185d7550c331a78ed57b1a44746d294b (diff) | |
Add small programmable text display gimmick
Use Third_Party/gen_atlas to create a 512x512 texture and put it in the
texture slot (the resolution is hardcoded to 512 in shader). Use sliders to
control the grid size. If desired, use global offset to make it possible
to linearly animate between e.g. 0-9 and have it display as ASCII
'0'-'9'.
Diffstat (limited to 'disinfo.cginc')
| -rw-r--r-- | disinfo.cginc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/disinfo.cginc b/disinfo.cginc index c5cc19c..8a6a162 100644 --- a/disinfo.cginc +++ b/disinfo.cginc @@ -87,9 +87,7 @@ float4 renderInBox(int c, float2 uv, float2 cell_uv, texture2D font, int2 font_r remapUVBigger(cell_uv, letter_bot_left, letter_top_right, letter_uv); #if 0 - float4 font_color = font.SampleGrad(linear_clamp_s, letter_uv, - abs(ddx(uv.x)) + abs(ddx(uv.y)), - abs(ddy(uv.x)) + abs(ddy(uv.y))); + float4 font_color = font.Sample(linear_clamp_s, letter_uv); #else float4 font_color = font.SampleLevel(linear_clamp_s, letter_uv, 0); #endif |
