Skip to content
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

Mesh Outline Effect #384

Open
pavledev opened this issue May 14, 2023 · 2 comments
Open

Mesh Outline Effect #384

pavledev opened this issue May 14, 2023 · 2 comments
Labels

Comments

@pavledev
Copy link

pavledev commented May 14, 2023

Can outline effect be created for mesh like in Blender?

@NicusorN5
Copy link

Yes This is a method on how to do so:
1.) Write a shader that returns the outline color in the pixel shader.
2.) Modify the stencil state so the stencil buffer is not used. (The outline will be visible trough other objects in this case)
3.) Draw the coloured model with a bigger scale.
4.) Reset the stencil state.
5.) Draw the initial model.

@pavledev
Copy link
Author

Yes This is a method on how to do so: 1.) Write a shader that returns the outline color in the pixel shader. 2.) Modify the stencil state so the stencil buffer is not used. (The outline will be visible trough other objects in this case) 3.) Draw the coloured model with a bigger scale. 4.) Reset the stencil state. 5.) Draw the initial model.

Can you help me to implement code for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants