Hi all,
Am using a vertex shader for shadow volume extrusion and have hit a snag. When two vertices share a common position but not normal or texture coord, I create degenerate faces between them an this works fin for mist cases.
the problem is that the vertex shader calculates whether to extrude the vertex or not based on the vertex normal and not the face normal, this can create areas where a vertex should be extruded away but is not since it's shared vertex normal is not pointing away from the light.
Short of creating unique vertices for each face I cannot think od a solution to this.
Any ideas?
Am using a vertex shader for shadow volume extrusion and have hit a snag. When two vertices share a common position but not normal or texture coord, I create degenerate faces between them an this works fin for mist cases.
the problem is that the vertex shader calculates whether to extrude the vertex or not based on the vertex normal and not the face normal, this can create areas where a vertex should be extruded away but is not since it's shared vertex normal is not pointing away from the light.
Short of creating unique vertices for each face I cannot think od a solution to this.
Any ideas?