You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make a 2D scene by rendering squares (planeBufferGeometry) of various sizes and using a fragment shader to make them appear circular by discarding pixels beyond the radius. This works but renders with ugly jagged edges. I also tried adding an FXAA shader pass but saw no effect (I may have done this incorrectly however).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to make a 2D scene by rendering squares (planeBufferGeometry) of various sizes and using a fragment shader to make them appear circular by discarding pixels beyond the radius. This works but renders with ugly jagged edges. I also tried adding an FXAA shader pass but saw no effect (I may have done this incorrectly however).
Each element is initialized like this:
My shader is awkwardly coded as follows but gives the circular shape with a black border:
Basic canvas setup:
And these are the ugly circles I'd like to clean up:
Beta Was this translation helpful? Give feedback.
All reactions