This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.5a
in repository iortcw.

commit 3b8aa51b4e5dccb936f035874aa61c514f04abff
Author: MAN-AT-ARMS <m4n4t4...@gmail.com>
Date:   Fri Mar 18 07:02:24 2016 -0400

    All: Rend2: Fix horribly broken metallic shader
---
 MP/code/rend2/glsl/lightall_fp.glsl | 5 +++--
 SP/code/rend2/glsl/lightall_fp.glsl | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/MP/code/rend2/glsl/lightall_fp.glsl 
b/MP/code/rend2/glsl/lightall_fp.glsl
index f16298a..64cae3f 100644
--- a/MP/code/rend2/glsl/lightall_fp.glsl
+++ b/MP/code/rend2/glsl/lightall_fp.glsl
@@ -333,8 +333,9 @@ void main()
        // specular red is gloss
        // specular green is metallicness
        float gloss = specular.r;
-       specular.rgb = specular.g * diffuse.rgb + vec3(0.04 - 0.04 * 
specular.g);
-       diffuse.rgb *= 1.0 - specular.g;
+       float metal = specular.g;
+       specular.rgb = metal * diffuse.rgb + vec3(0.04 - 0.04 * metal);
+       diffuse.rgb *= 1.0 - metal;
   #else
        // diffuse rgb is diffuse
        // specular rgb is specular reflectance at normal incidence
diff --git a/SP/code/rend2/glsl/lightall_fp.glsl 
b/SP/code/rend2/glsl/lightall_fp.glsl
index f16298a..64cae3f 100644
--- a/SP/code/rend2/glsl/lightall_fp.glsl
+++ b/SP/code/rend2/glsl/lightall_fp.glsl
@@ -333,8 +333,9 @@ void main()
        // specular red is gloss
        // specular green is metallicness
        float gloss = specular.r;
-       specular.rgb = specular.g * diffuse.rgb + vec3(0.04 - 0.04 * 
specular.g);
-       diffuse.rgb *= 1.0 - specular.g;
+       float metal = specular.g;
+       specular.rgb = metal * diffuse.rgb + vec3(0.04 - 0.04 * metal);
+       diffuse.rgb *= 1.0 - metal;
   #else
        // diffuse rgb is diffuse
        // specular rgb is specular reflectance at normal incidence

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to