summaryrefslogtreecommitdiff
path: root/drivers/gles3
diff options
context:
space:
mode:
authorFerenc Arn <tagcup@yahoo.com>2017-10-21 19:35:54 -0400
committerFerenc Arn <tagcup@yahoo.com>2017-10-21 19:35:54 -0400
commitcb0bf1edeae4687c0778f4eb80824f92a7955901 (patch)
treef745dc0228b61201bbd9750a2eee16cea6ce3abc /drivers/gles3
parent50306041e5be9859bd448fe80a52be45694b6688 (diff)
Rename Schlick GGX to GGX.
Schlick's approximation and GGX are orthogonal concepts. Furthermore, it's usage so far has been inconsistent: we don't even use it with anisotropic SchlickGGX, and Burley (Disney) diffuse does use it while its name doesn't indicate it. The use of Schlick's approximation in Burley and GGX is an implementation detail and doesn't need to be reflected to the namig.
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp2
-rw-r--r--drivers/gles3/shaders/scene.glsl6
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index 5fe7b53a7d..6c0e4f74ff 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -838,7 +838,7 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() {
actions[VS::SHADER_SPATIAL].render_mode_defines["diffuse_lambert_wrap"] = "#define DIFFUSE_LAMBERT_WRAP\n";
actions[VS::SHADER_SPATIAL].render_mode_defines["diffuse_toon"] = "#define DIFFUSE_TOON\n";
- actions[VS::SHADER_SPATIAL].render_mode_defines["specular_schlick_ggx"] = "#define SPECULAR_SCHLICK_GGX\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["specular_ggx"] = "#define SPECULAR_GGX\n";
actions[VS::SHADER_SPATIAL].render_mode_defines["specular_blinn"] = "#define SPECULAR_BLINN\n";
actions[VS::SHADER_SPATIAL].render_mode_defines["specular_phong"] = "#define SPECULAR_PHONG\n";
actions[VS::SHADER_SPATIAL].render_mode_defines["specular_toon"] = "#define SPECULAR_TOON\n";
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 0b5b9d1d24..9619dadbdd 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1065,7 +1065,7 @@ LIGHT_SHADER_CODE
#elif defined(SPECULAR_DISABLED)
//none..
-#elif defined(SPECULAR_SCHLICK_GGX)
+#elif defined(SPECULAR_GGX)
// shlick+ggx as default
vec3 H = normalize(V + L);
@@ -1102,10 +1102,10 @@ LIGHT_SHADER_CODE
#if defined(LIGHT_USE_CLEARCOAT)
if (clearcoat_gloss > 0.0) {
-# if !defined(SPECULAR_SCHLICK_GGX) && !defined(SPECULAR_BLINN)
+# if !defined(SPECULAR_GGX) && !defined(SPECULAR_BLINN)
vec3 H = normalize(V + L);
# endif
-# if !defined(SPECULAR_SCHLICK_GGX)
+# if !defined(SPECULAR_GGX)
float cNdotH = max(dot(N,H), 0.0);
float cLdotH = max(dot(L,H), 0.0);
float cLdotH5 = SchlickFresnel(cLdotH);