You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a 3D fragment shader, when trying to use the POSITION variable, I get this error:
ERROR: get_current_version: MaterialShaderGLES2: Program LINK FAILED:
Fragment info
-------------
0(846) : error C5052: gl_Position is not accessible in this profile
I believe this is because gl_Position is only meant to be used as the output of the vertex shader, not the input to the fragment shader. In the fragment shader, the position is available in gl_FragCoord.
The text was updated successfully, but these errors were encountered:
replacing the line mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["POSITION"]="gl_Position";
with mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["POSITION"]="gl_FragCoord";
in drivers/gles2/shader_compiler_gles2.cpp seems to solve that for me
In a 3D fragment shader, when trying to use the POSITION variable, I get this error:
I believe this is because gl_Position is only meant to be used as the output of the vertex shader, not the input to the fragment shader. In the fragment shader, the position is available in gl_FragCoord.
The text was updated successfully, but these errors were encountered: