gostan99 / damage-numbers-DOTS

Show thousands of damage numbers in DOTS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

damage-numbers-DOTS

Show thousands of damage numbers in DOTS.

It uses a hacky technique to draw numbers on GPU instanced quads. To draw 648, this code block

                float texturePitPoint = myNumber / 10;
                float uvProgress = input.uv.x - myNumberIndex / numberCount;
                float textureProgress = uvProgress * numberCount / 10;
                float fX = texturePitPoint + textureProgress;
                float2 uv = float2(fX, input.uv.y * _UVY.x - _UVY.y);

draw the pixel color like this:
to achieve this:

This is a module from: Malignant Survivors (https://store.steampowered.com/app/2783610/Malignant_Survivors)

*Max possible number is 999.999

About

Show thousands of damage numbers in DOTS.

License:MIT License


Languages

Language:C# 64.8%Language:ShaderLab 35.2%