diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-03-13 11:01:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 11:01:14 +0100 |
commit | a45e6f67d58e5a646db89a6b06891946e47881a6 (patch) | |
tree | cb3f50b56d3987b8966f0b1be7b7f7c51e859800 /servers | |
parent | 0f429f8f9eb2c2446957b4a97a06b67e616c9d43 (diff) | |
parent | 5ff0924a93ab6eeccfd93367b622df970a3d64af (diff) |
Merge pull request #7981 from RandomShaper/position-for-2d-shaders
Map POSITION to gl_FragCoord.xy for 2D shaders
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/shader_types.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp index cd9afa7735..c5e31b235a 100644 --- a/servers/visual/shader_types.cpp +++ b/servers/visual/shader_types.cpp @@ -138,7 +138,7 @@ ShaderTypes::ShaderTypes() { shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["TIME"] = ShaderLanguage::TYPE_FLOAT; shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SRC_COLOR"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["POSITION"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["POSITION"] = ShaderLanguage::TYPE_VEC2; shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["NORMAL"] = ShaderLanguage::TYPE_VEC3; shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["NORMALMAP"] = ShaderLanguage::TYPE_VEC3; shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT; @@ -150,7 +150,7 @@ ShaderTypes::ShaderTypes() { shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["POINT_COORD"] = ShaderLanguage::TYPE_VEC2; shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["TIME"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["POSITION"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["POSITION"] = ShaderLanguage::TYPE_VEC2; shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["NORMAL"] = ShaderLanguage::TYPE_VEC3; shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["UV"] = ShaderLanguage::TYPE_VEC2; shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["COLOR"] = ShaderLanguage::TYPE_VEC4; |