sirxemic/jquery.ripples

remove white ripples reflection

Opened this issue · 2 comments

Hi Sirxemic,

First of all thank you for making such a cool plugin. I wanted to ask you if it's possibile to remove the white reflections from the ripples and just leave the wavy movement.

Thank you!

I've been thinking of making that part more customizable. But for now I can tell you that the white reflections are caused by the specular variable. Just removing it from the following code should fix it for you:

jquery.ripples/src/main.js

Lines 700 to 701 in b60368e

'float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);',
'gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;',

Thank you so much for your answer, it was very helpful! I could remove the white highlight