I have just include OpenGL ES 3.0 in my iOS app and it is working fine.
I have a working shader below:
#version 300 es
precision mediump float;
uniform sampler2D texSampler;
uniform float fExposure;
in vec2 fTexCoord;
in vec3 fColor;
out vec4 fragmentColor;
void main()
{
fragmentColor = texture(texSampler, fTexCoord) * vec4(fColor, 1.0) * fExposure;
}
Now, I want to use a sampler3D
so I have:
#version 300 es
precision mediump float;
uniform sampler3D texSampler;
uniform float fExposure;
in vec3 fTexCoord;
in vec3 fColor;
out vec4 fragmentColor;
void main()
{
fragmentColor = texture(texSampler, fTexCoord) * vec4(fColor, 1.0) * fExposure;
}
and it doesn't compile. Also, I changed the vec2 texCoord
to vec3 texCoord
in the vertex shader.
Actually, sampler3D
is not recognized, but as far as i know it exists in OpenGL ES 3.0.
Any ideas?