0

I have a small question about transform feedbacks in OpenGL.

Is it possible for my output to be a different size than my output ? Let say a VS like:

in vec3 pos;
in vec3 move;

out vec3 newPos;

void main()
{
  newPos = pos + move;
}

So my output buffer would just be the new position!

Or the other way around, have more outputs than inputs.

widgg
  • 1,358
  • 2
  • 16
  • 35

1 Answers1

1

Sure. Transform feedback saves the out values from a vertex shader. They don't need to match the inputs in either type or number when being passed to geometry or fragment shaders, so don't need to match for transform feedback either.

The OpenGL SuperBible has a good section on transform feedback.

Hugh
  • 1,641
  • 1
  • 11
  • 3
  • thanks! I don't have the most recent version of the Super Bible :) But thanks for the info... this might be the solution I was looking for instead of going with OpenCL (because the driver is not always installed and it's better not asking clients to install it:)) – widgg Aug 22 '12 at 01:20