Hi members!
I have a CircleGeometry
with ShaderMaterial
. And I’m passing two colors to uniforms for creating a gradient color using a simple fragment shader code like this:
uniform vec3 color1;
uniform vec3 color2;
varying vec2 vUv;
void main(){
gl_FragColor=vec4(mix(color1,color2,vUv.y),1.);
}
Note: I’m setting the vUv
value inside my vertex shader.
And this is the result (online demo):
Now, I want when the user hovers on these objects, shows the background image for these objects with a zoom-in effect for example. How can I achieve that?