Question by
twoski · Nov 12, 2018 at 02:13 AM ·
shadersshader programmingshader writing
Inner Stroke Fragment Shader
Let's say i have a simple 2d mesh resembling a flat circle. I want to have a shader which specifies 2 colors and fades from color A to color B towards the center of the circle.
Picture to demonstrate: https://i.imgur.com/uuEqJRM.png (the circle on the right).
Now let's say the mesh is a square instead. The colors would still fade towards the center in a similar fashion.
How might one go about doing this? Is it even feasible?
Comment