-
-
Notifications
You must be signed in to change notification settings - Fork 20.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for POSITION fragment shader var in 2.1 stable. #7565
Conversation
@@ -818,7 +818,8 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() { | |||
//mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["POSITION"]="IN_POSITION"; | |||
mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["NORMAL"]="normal"; | |||
mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["TANGENT"]="tangent"; | |||
mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["POSITION"]="gl_Position"; | |||
//mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["POSITION"]="gl_Position"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why keep it as a comment though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No real reason.
CC @RandomShaper, my new shader expert :p |
Calling me an expert is very kind of you. Not too accurate, though. :) Anyway, I've tested it with 2D and 3D shaders and it works nice. The only thing I'd say is that z and w are meaningless for 2D so it would be better to have a vec2 POSITION for 2D with only gl_FragCoord.xy mapped to it. |
Would you maybe make a PR for that, or should we merge the current one as is? |
Working on it. |
Have a look at #7969. |
Superseded by #7969. |
Fix for the issues related to the POSITION var in fragment shaders.
#3226
#7416