Convert shader problem

1 reply [Last post]
Rahvin
User offline. Last seen 9 years 23 weeks ago. Offline
Joined: 06/01/2012
Posts:

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?

Brad Larson
Brad Larson's picture
User offline. Last seen 4 years 50 weeks ago. Offline
Joined: 05/14/2008
Posts:

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.

Syndicate content