diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-11 20:44:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-11 20:44:41 +0100 |
commit | 37e198c32006d18c9443bf65963ba8182b7d76a6 (patch) | |
tree | 79d4b605a628942a7aff3aa6bf599af0c63f54a8 /servers | |
parent | 1b038bed94519bddcc4328ca053874a754ae37fd (diff) | |
parent | 2042d6214e1ab302a1d9a0a4bd8a018bf6ee679b (diff) |
Merge pull request #23483 from clayjohn/fragment_camera_view
Make VIEW vector available in fragment shader
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/shader_types.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp index 8685bdb113..87767c0955 100644 --- a/servers/visual/shader_types.cpp +++ b/servers/visual/shader_types.cpp @@ -86,6 +86,7 @@ ShaderTypes::ShaderTypes() { shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3; shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["TANGENT"] = ShaderLanguage::TYPE_VEC3; shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["BINORMAL"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["VIEW"] = constt(ShaderLanguage::TYPE_VEC3); shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMALMAP"] = ShaderLanguage::TYPE_VEC3; shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT; shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["UV"] = constt(ShaderLanguage::TYPE_VEC2); |