Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove white ripples reflection #72

Open
archimedo opened this issue Sep 17, 2020 · 2 comments
Open

remove white ripples reflection #72

archimedo opened this issue Sep 17, 2020 · 2 comments

Comments

@archimedo
Copy link

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!

@sirxemic
Copy link
Owner

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;',

@archimedo
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants