[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53251] trunk/blender/source/blender/gpu/ shaders/gpu_shader_material.glsl: Additional fix in glsl shaders: "Darken" was using different formula as render.
Ton Roosendaal
ton at blender.org
Fri Dec 21 19:10:02 CET 2012
Revision: 53251
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53251
Author: ton
Date: 2012-12-21 18:10:01 +0000 (Fri, 21 Dec 2012)
Log Message:
-----------
Additional fix in glsl shaders: "Darken" was using different formula as render.
"Divide" still differs too for division by zero - cannot find this yet...
Modified Paths:
--------------
trunk/blender/source/blender/gpu/shaders/gpu_shader_material.glsl
Modified: trunk/blender/source/blender/gpu/shaders/gpu_shader_material.glsl
===================================================================
--- trunk/blender/source/blender/gpu/shaders/gpu_shader_material.glsl 2012-12-21 17:47:50 UTC (rev 53250)
+++ trunk/blender/source/blender/gpu/shaders/gpu_shader_material.glsl 2012-12-21 18:10:01 UTC (rev 53251)
@@ -888,11 +888,11 @@
fact *= facg;
facm = 1.0-fact;
- col = fact*texcol.r;
+ col= texcol.r + ((1.0 -texcol.r)*facm);
if(col < outcol.r) incol.r = col; else incol.r = outcol.r;
- col = fact*texcol.g;
+ col= texcol.g + ((1.0 -texcol.g)*facm);
if(col < outcol.g) incol.g = col; else incol.g = outcol.g;
- col = fact*texcol.b;
+ col= texcol.b + ((1.0 -texcol.b)*facm);
if(col < outcol.b) incol.b = col; else incol.b = outcol.b;
}
@@ -901,7 +901,6 @@
float facm, col;
fact *= facg;
- facm = 1.0-fact;
col = fact*texcol.r;
if(col > outcol.r) incol.r = col; else incol.r = outcol.r;
More information about the Bf-blender-cvs
mailing list