diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-11-17 16:02:34 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-17 16:02:34 -0300 |
commit | 1feeb3e1c8406caf5497d5fcb40820cbb2d0d165 (patch) | |
tree | 14d49efad38f158c81ecad26e188c86f4abdee27 /drivers | |
parent | 0e043162142c2d9f3e9b8520155d049687cbfa75 (diff) | |
parent | 78441b486a6e751764f9c78d9fda27a1f561bcf2 (diff) |
Merge pull request #12924 from vnen/light-shader
Enable light shaders when light variables are used
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/shader_compiler_gles3.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index ad08c59de8..325df8e4f1 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -741,6 +741,7 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() { actions[VS::SHADER_CANVAS_ITEM].usage_defines["NORMAL"] = "#define NORMAL_USED\n"; actions[VS::SHADER_CANVAS_ITEM].usage_defines["NORMALMAP"] = "#define NORMALMAP_USED\n"; actions[VS::SHADER_CANVAS_ITEM].usage_defines["SHADOW_COLOR"] = "#define SHADOW_COLOR_USED\n"; + actions[VS::SHADER_CANVAS_ITEM].usage_defines["LIGHT"] = "#define USE_LIGHT_SHADER_CODE\n"; actions[VS::SHADER_CANVAS_ITEM].render_mode_defines["skip_vertex_transform"] = "#define SKIP_TRANSFORM_USED\n"; @@ -828,6 +829,9 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() { actions[VS::SHADER_SPATIAL].usage_defines["SCREEN_TEXTURE"] = "#define SCREEN_TEXTURE_USED\n"; actions[VS::SHADER_SPATIAL].usage_defines["SCREEN_UV"] = "#define SCREEN_UV_USED\n"; + actions[VS::SHADER_SPATIAL].usage_defines["DIFFUSE_LIGHT"] = "#define USE_LIGHT_SHADER_CODE\n"; + actions[VS::SHADER_SPATIAL].usage_defines["SPECULAR_LIGHT"] = "#define USE_LIGHT_SHADER_CODE\n"; + actions[VS::SHADER_SPATIAL].renames["SSS_STRENGTH"] = "sss_strength"; actions[VS::SHADER_SPATIAL].render_mode_defines["skip_vertex_transform"] = "#define SKIP_TRANSFORM_USED\n"; |