1
vote
2answers
94 views

Bad pixels on shader when loading cached binary programs

I have been trying to cache binary shader programs in my game and load them accordingly using "glGetProgramBinaryOES" and "glProgramBinaryOES" respectively. I was successfully able to cache and load ...
0
votes
0answers
60 views

Very basic OpenGL ES 2 error

This is an incredibly simple shader, yet I'm having a lot of trouble understanding what's wrong with it. I'm trying to send a float to my fragment shader. Its purpose is to adjust the alpha of the ...
0
votes
1answer
126 views

Normal Map Issues

I'm experiencing a very strange result in my very simple normal map implementation on iOS 7 - OpenGL ES 2.0. I'm only using the bare parameters necessary and I'm also skipping on all the tangent and ...
7
votes
2answers
5k views

GLSL Shader - Change Hue/Saturation/Brightness

I'm trying to change the hue of an image using a GLSL fragment shader. I want to achieve something similar to Photoshop's Hue/Saturation Adjustment layer. In the following image you can see what I've ...
8
votes
1answer
576 views

GL ES: Fragment shader optimization

Summary: I get FPS slowdown as soon as I try to tint the sprites (i.e: multiply texture with color in the fragment shader) Details: Hardware: iPod touch 4 I am drawing 700 sprites on the screen ...
7
votes
1answer
1k views

Optimizing performance of a heavy fragment shader

I need help optimizing the following set of shaders: Vertex: precision mediump float; uniform vec2 rubyTextureSize; attribute vec4 vPosition; attribute vec2 a_TexCoordinate; varying vec2 tc; ...
1
vote
1answer
74 views

I have a frag shader, one with an empty s_lightMap, how and why is it effecting the output?

I have an image of concrete rocks of different shades of colors, and I'm applying this shader, but without referencing s_lightMap's uniform in my program: precision mediump float; ...
1
vote
1answer
399 views

GL_EXT_shadow_samplers killing my shader

I have the following fragment shader for my scene #extension GL_EXT_shadow_samplers : require ... vec4 color = texture2D(uTextureUnit0, varTexCoord0); if (colorTransformEnabled != 0) { vec3 ...
1
vote
3answers
1k views

iOS - pass UIImage to shader as texture

I am trying to pass UIImage to GLSL shader. The fragment shader is: varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { ...