-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want anti-aliasing of the outlines. #15
Comments
You can try to add antialiasing as a post process after the outline shader runs. In ThreeJS there is a built-in FXAA shader, here's an example using it: webgl-outlines/threejs-outlines-minimal/src/index.js Lines 59 to 64 in 42e2103
I think another idea that may produce better results is MSAA? To render it to a bigger offscreen canvas and then scale it down when rendering to the final screen |
I am already using FXAA and don't know how to use MSAA. Could you provide some sample codes? |
I unfortunately do not have a code sample for this. My understanding is you would need to set up the post process to render to a framebuffer that's larger than the screen (maybe 2x as large?) and then scale it down when rendering to the screen, and that may produce better results. Otherwise, as far as I can tell ThreeJS can do MSAA for you but only when rendering directly to a screen, not a framebuffer like we're doing here for post processing? Not 100% sure. |
Thank you for your replying. |
I think these outlines are too rough.
![image](https://user-images.githubusercontent.com/85370491/221376608-ee178aa0-0e1e-4589-b5d1-395a5957003d.png)
Is there anyway to activate anti-aliasing for the outlines?
The text was updated successfully, but these errors were encountered: