Finish fix for POSITION in 2D shaders

This commit is contained in:
Pedro J. Estébanez 2017-03-06 18:31:29 +01:00
parent 6a62831195
commit 1e79f80b90
2 changed files with 4 additions and 5 deletions

View file

@ -876,8 +876,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["EXTRA_MATRIX"]="extra_matrix";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["TIME"]="time";
//mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["POSITION"]="gl_Position";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["POSITION"]="gl_FragCoord";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["POSITION"]="(gl_FragCoord.xy)";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["NORMAL"]="normal";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["NORMALMAP"]="normal_map";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["NORMALMAP_DEPTH"]="normal_depth";
@ -892,7 +891,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["POINT_COORD"]="gl_PointCoord";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["TIME"]="time";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["POSITION"]="gl_Position";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["POSITION"]="(gl_FragCoord.xy)";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["NORMAL"]="normal";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["UV"]="uv_interp";
mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["COLOR"]="color";

View file

@ -1153,7 +1153,7 @@ const ShaderLanguage::BuiltinsDef ShaderLanguage::ci_vertex_builtins_defs[]={
const ShaderLanguage::BuiltinsDef ShaderLanguage::ci_fragment_builtins_defs[]={
{ "SRC_COLOR", TYPE_VEC4},
{ "POSITION", TYPE_VEC4},
{ "POSITION", TYPE_VEC2},
{ "NORMAL", TYPE_VEC3},
{ "NORMALMAP", TYPE_VEC3},
{ "NORMALMAP_DEPTH", TYPE_FLOAT},
@ -1175,7 +1175,7 @@ const ShaderLanguage::BuiltinsDef ShaderLanguage::ci_fragment_builtins_defs[]={
const ShaderLanguage::BuiltinsDef ShaderLanguage::ci_light_builtins_defs[]={
{ "POSITION", TYPE_VEC4},
{ "POSITION", TYPE_VEC2},
{ "NORMAL", TYPE_VEC3},
{ "UV", TYPE_VEC2},
{ "COLOR", TYPE_VEC4},