Original Post
I am in com sci but I am no good at programming (to most people that would come across as an oxymoron, but people in computer science know that most of us can't program). I am implementing a double z buffer algorithm and in order to do this I need to, for every pixel, calculate its corresponding plane equation and find its min and max depth. Finding the equation is simple math, but I need three points to create that equation, how do I pass this to the fragment shader? I know that the primitive to which the current fragment belongs to was created in the previous phase in the pipeline, but is there a way I can access that primitive (face or set of vertices or whatever you wish to call it). thanks