Convert shader problem
Fri, 06/22/2012 - 06:11
Hi,
I'm trying to convert this shader to work mit GPUImage on iOS 5:
http://www.geeks3d.com/20110408/cross-stitching-post-processing-shader-g...
Unfortunately I don't get it to work. The first problem is the vertex-shader:
[Vertex_Shader] void main() { gl_Position = ftransform(); gl_TexCoord[0] = gl_MultiTexCoord0; }
ftransform(), gl_TexCoord[0], gl_MultiTexCoord0 are deprecated and throw a compiler error. They should be replaced with something like
gl_Position = gl_ModelViewMatrix * gl_ProjectionMatrix * gl_Vertex;
But this also does not work.
How can I convert the Vertex_Shader to run with GPUImage and iOS 5?
Ignore the vertex shader they have and use my standard vertex shader. I set up everything you need to draw a textured quad to the screen with it.
You just need to adjust their fragment shader to replace tex0 with inputImageTexture and gl_TexCoord[0].st with textureCoordinate.