Quantcast
Viewing all articles
Browse latest Browse all 40524

Varying vec2 surfacePosition

Hi @roymacdonald, thanks for replying.
you can check the code on here http://glslsandbox.com/e#27266.0
it should be correct but it's not mine.
I tried to substitute the ofRect with a

in .h

ofPlanePrimitive plane;

in setup()

plane.set(ofGetWidth(), ofGetHeight(), 10, 10);

in draw();

plane.mapTexCoords(0,0, ofGetWidth(), ofGetHeight());
plane.draw();

I get a flashy plane but it is not what I should get. from what I understand the varying vec2 surfacePosition communicates the position of each vertex? but How do I communicate that to the main app?

cheers


Viewing all articles
Browse latest Browse all 40524

Trending Articles