Skip to main content
Expand abbreviation in case anyone else, like me, needed to look up what it means...
Source Link

Question

Is there a way to compute sth.something in a first shader program (eg. screen-space coordinates from word-space ones) and access those results in an another shader program?

#Possible solutions

Possible solutions

  1. Give up multiple-shader-programs architecture and create one combined shader program
  2. Save somehow results to a buffer objects (I couldn't find out if this is possible except computation shaders)
  3. Render to texture and read the texture

Is there a nicer solution?

Question

Is there a way to compute sth. in a first shader program (eg. screen-space coordinates from word-space ones) and access those results in an another shader program?

#Possible solutions

  1. Give up multiple-shader-programs architecture and create one combined shader program
  2. Save somehow results to a buffer objects (I couldn't find out if this is possible except computation shaders)
  3. Render to texture and read the texture

Is there a nicer solution?

Question

Is there a way to compute something in a first shader program (eg. screen-space coordinates from word-space ones) and access those results in an another shader program?

Possible solutions

  1. Give up multiple-shader-programs architecture and create one combined shader program
  2. Save somehow results to a buffer objects (I couldn't find out if this is possible except computation shaders)
  3. Render to texture and read the texture

Is there a nicer solution?

Source Link
BPiek
  • 307
  • 1
  • 8

Sharing calculation result between shader programs in OpenGL

Question

Is there a way to compute sth. in a first shader program (eg. screen-space coordinates from word-space ones) and access those results in an another shader program?

#Possible solutions

  1. Give up multiple-shader-programs architecture and create one combined shader program
  2. Save somehow results to a buffer objects (I couldn't find out if this is possible except computation shaders)
  3. Render to texture and read the texture

Is there a nicer solution?