DirectXTK
DirectXTK copied to clipboard
Mesh Outline Effect
Can outline effect be created for mesh like in Blender?
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.
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?