• Advertisement
Sign in to follow this  

geometry shader to pixel shader

This topic is 1786 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 

 

 

 

 

Share this post


Link to post
Share on other sites
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.

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement