geometry shader to pixel shader

Started by
2 comments, last by the dodger uk 11 years, 1 month ago

is there a way to send a int number or bool to the pixel shader from the geometry shader

i been writing a geometry shader for grass , which expands a point to a grass which has 4 quads which are all created on the geometry shader.

now these all texture colour correctly . now is there a way to send a bool from the geometry shader to the pixel shader so that it will then texture sample from a picture of a flower,

so that the grass can either be grass or grass with a flower head at the end of it

Advertisement

You can send whatever you want, but it has to be as vertex data. So you'd have to add that bool to each vertex that you emit from the geometry shader.

You can send whatever you want, but it has to be as vertex data. So you'd have to add that bool to each vertex that you emit from the geometry shader.

how can i access the vertex data from the geometry shader , they take in compleatly differnt data

cheers , just figured out what you mean and how to do it :)

thank you

This topic is closed to new replies.

Advertisement