Skip to main content
6 events
when toggle format what by license comment
Jan 21, 2013 at 20:27 comment added Nathan Reed @Dr.ABT It's exactly the same way that texture coordinates, normal vectors, and all that kind of stuff are normally sent to the pixel shader - by writing outputs from the vertex/geometry shader that are interpolated and input to the pixel shader.
Jan 21, 2013 at 20:20 comment added Dr. Andrew Burnett-Thompson I see, can this be done by sending outputs from the GeometryShader or instancing? For extra credit (if you're interested), I added a Q here: gamedev.stackexchange.com/questions/47831/…
Jan 21, 2013 at 19:59 comment added Nathan Reed @Dr.ABT The parameters of the mathematical line have to be sent down to the pixel shader via interpolators. The pixel shader has no direct access to the geometry.
Jan 21, 2013 at 19:51 comment added Dr. Andrew Burnett-Thompson Hey @NathanReed going back to this - if I used Geometry Shader or instancing to draw quads, then Point1/Point2 are opposite vertices of a quad, how in the Pixel Shader can I calculate distance to the line between Pt1 & Pt2? Does the pixel shader have knowledge of input geometry?
Jan 3, 2013 at 21:23 comment added Dr. Andrew Burnett-Thompson Hey thanks - yes I'm aware of that article, no source code with it unfortunately :-( The premise of GeoShader+FragShader seems to be a winner for this type of work. Getting the data to the GPU efficiently is going to be the tricky part!
Jan 3, 2013 at 17:58 history answered Nathan Reed CC BY-SA 3.0