Jump to content
  • Advertisement
Sign in to follow this  
KumGame

OpenGL Passing data from vertex shader to fragment shader

This topic is 4453 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

Hi guys... Is there some way to pass data from vertex shader to fragment shader in OpenGL low-level shaders? In the case of GLSL we have varyings for that purpose. Is there a similar technique in low-level shaders also ? Thanks in advance.. :-)

Share this post


Link to post
Share on other sites
Advertisement
It depends on the extension. ARB_vertex_program, for example, pass its results to the fragment program through the 'result' struct. ARB_fragment_program receives these results through the 'fragment' struct. These aren't really structs, but you can think of them this way because of the way you access members (e.g. fragment.texcoord[0]).

I suggest you take a look at the specifications of these extensions for a better explanation.

ARB_vertex_program
ARB_fragment_program

HellRaiZer

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!