Reputation: 14513
I have a OpenGL shader which uses gl_TexCoord like the following does. But in OpenGL ES, gl_TexCoord is not supported. I wonder what can I do to refactor the code to get it work on OpenGL ES.
void main()
{
//scene depth calculation
float depth = linearize(texture2D(inputImageTexture2,gl_TexCoord[0].xy).x);
if (depthblur)
{
depth = linearize(bdepth(gl_TexCoord[0].xy));
}
...
}
Upvotes: 8
Views: 5916
Reputation: 473322
There isn't one. You do it manually with a user-defined varying
passed from your vertex shader. That's all it ever was anyway; a per-vertex output that your fragment shader took.
Upvotes: 8