I am stuck with a fragment shader. I managed to display a linear gradient from top to bottom (cp. left image). The goal is to overlay a radial white gradient to this linear gradient (illustrated as the black dotted line in the left image => the right image illustrates the goal).
I know that I have to combine the x and y coordinates somehow, but all trials so far failed - I am just too bad in math I think :-/ I also didn't figured out how to mix the blue color in order to achieve white shades.
Could somebody help me out with a hint ?
This is the current shader that gives the left image as a result (depending on the color uniforms):
// Precision
precision highp float;
// Uniforms
uniform vec2 uResolution;
// Colors
uniform vec3 uColor1;
uniform vec3 uColor2;
void main(void) {
vec2 position = gl_FragCoord.xy/uResolution;
vec3 color = vec3(uColor2.x+(uColor1.x-uColor2.x)*position.y, uColor2.y+(uColor1.y-uColor2.y)*position.y, uColor2.z+(uColor1.z-uColor2.z)*position.y);
gl_FragColor = vec4(color.x, color.y, color.z, 1.);
}