Tweak the code in the fragment shader to get the Mesa GLSL compiler to emit
MAD's instead of MUL + ADD. svn path=/trunk/KDE/kdebase/workspace/; revision=1136438
This commit is contained in:
parent
bf1b0738d3
commit
b13174e785
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ void GLSLBlurShader::init()
|
|||
stream2 << "{\n";
|
||||
stream2 << " vec4 sum = texture2D(texUnit, samplePos0) * kernel0;\n";
|
||||
for (int i = 1; i < size; i++)
|
||||
stream2 << " sum += texture2D(texUnit, samplePos" << i << ") * kernel"
|
||||
stream2 << " sum = sum + texture2D(texUnit, samplePos" << i << ") * kernel"
|
||||
<< (i > center ? size - i - 1 : i) << ";\n";
|
||||
stream2 << " gl_FragColor = sum;\n";
|
||||
stream2 << "}\n";
|
||||
|
|
Loading…
Reference in a new issue