公告
财富商城
积分规则
提问
发文
2019-04-23 14:21发布
可以哭但决不认输i
Can fragment shader in OpenGL ES 2.0 change the Z value (depth) of a pixel?
How is this achieved in OpenGL ES 2.0?
No -- gl_FragDepth (which is part of the desktop version of GLSL) is not present in OpenGL ES.
gl_FragDepth
You can, however, check for the existence of GL_EXT_frag_depth. If it's available, then you can write the depth to gl_FragDepthEXT.
GL_EXT_frag_depth
gl_FragDepthEXT
The extension paper gives more details about how to enable the extension and such.
最多设置5个标签!
No --
gl_FragDepth
(which is part of the desktop version of GLSL) is not present in OpenGL ES.You can, however, check for the existence of
GL_EXT_frag_depth
. If it's available, then you can write the depth togl_FragDepthEXT
.The extension paper gives more details about how to enable the extension and such.