New answers tagged

1

This question popped to the top because of Aeroson's answer (above/below/adjacent/falling in bits around this one) and thought I'd yoink my answer from this question in the event that it was useful to someone. What the below shader does: Downsides: not a mobile-friendly shader, due to using the stencil buffer and rendering the object twice (depending ...


2

The idea is that you extrude the object vertices along their normals. First render highlight: Render the object with disabled z write but enabled z test. Vertex shader: to each vertex add normal * highlight size before you pass it on Fragment shader: render only color, don't apply lighting Then render the object: Render with z write and z test ...


0

So basically you are looking to paint your environment as it is shot? Apply 2 textures to your object, the main texture being pure black, the secondary being the actual coloured texture. Grab the point on the object that the mesh was struck Convert this point into the x,y coordinate on the texture itself Grab the pixel (and maybe surrounding pixels) and ...



Top 50 recent answers are included