GPUImage
GPUImage copied to clipboard
using another simpler2D in my custom filter
Hello, Brad I wrote a shader file for my custom filter. But in this shader, I have to use another simpler2D. That is to say, I need two texture. I have tried the following codes , however it doesn't work. lightenEyes=[[GPUImageFilter alloc] initWithFragmentShaderFromFile:@"LightenEyes"]; glActiveTexture(GL_TEXTURE8); glBindTexture(GL_TEXTURE_2D, renderer->maskTexture); if (renderer->maskTexture) { NSLog(@"why no result"); } [lightenEyes setInteger:8 forUniformName:@"maskTexture"]; [lightenEyes setFloat:contrastForEyes forUniformName:@"contrast"]; Can you help me? Thanks a lot !