Dear developers,
I’m trying to know how I could show just a part from objects using shader.
for example for an object 3D as a circle, I show only the half.
Thank you for any suggestion.
Best regards,
Rimiki
Dear developers,
I’m trying to know how I could show just a part from objects using shader.
for example for an object 3D as a circle, I show only the half.
Thank you for any suggestion.
Best regards,
Rimiki
I’m not sure I understand what you want, as how do you decide what parts to show?
Hiding parts of objects using shaders is not very hard, and there are many ways of doing it, it mainly depends on what end result you want.
That is playing around with stencil buffers and quite easy.
To be honest they could have made it alot easier to work with by only having 2 shaders, 1 invisible one, and one for the object inside the cube.
Then set the stencil ref values from the material editor. (No custom material editor needed!)
They could also have optimized it a bit more, but that is probably less relevant for you?
And while stencil buffers are awesome for some effects, they do have limitations. (That mainly have to do with stencil values not being z-buffer dependant, so it’s hard to know if something is inside a stenciled area, or behind it, at least without multiple passes.)