Problem example

This is the problem I have. I have created a shader that draws circle. But depending on the distance from the camera thickness changes.

Circle Shader

Is it possible to keep thickness constant?

  • 1
    \$\begingroup\$ Did you check out previous questions about using shaders to draw circles? \$\endgroup\$ – DMGregory Jan 26 at 17:58
  • \$\begingroup\$ @DMGregory I had a look at them but I am not good with HLSL or GLSL. While I can copy paste some things, I am better at shader graph. I will definitely research more, but for Global Game Jam I don't have too much time to spare. Thanks. \$\endgroup\$ – Candid Moon _Max_ Jan 26 at 22:20
  • 1
    \$\begingroup\$ To use the trick in my answer there in a graph, you'll need the DDX / DDY nodes described here. The technique should translate pretty directly. :) \$\endgroup\$ – DMGregory Jan 26 at 22:23
  • \$\begingroup\$ @DMGregory Thank you in pointing me in the right direction. I will definitely try to replicate it in Shader Graph and post about my success here. \$\endgroup\$ – Candid Moon _Max_ Jan 27 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.