Is there a way to make a stencil use a gradient in three.js? Like a fade off using a gradient at the edges.
I thought the only way I can do this currently is by ensuring the background of the scene is a solid colour, then having a gradient texture that matches that colour tied to the edges of the stencil but rendering in front of it, creating a sort of vignette effect for a fake gradient.
But what if I wanted geometry to render in that gradient or other objects that are behind the stencil where a gradient/fadeoff would show?