by cvoss · 3y ago · 0 comments
By the way, there's more going on in the shader algorithm than you might expect. Here's an explanation of the worksheet:
u, v are coordinates relative to the center of the image
h is radius from center, squared
Section B generates the ball:
B3-8 generates the reflected color on the ball.
B9-11 applies the diffuse illumination to the ball.
B12 adds the illumination highlight.
Section C creates the ground:
C5 puts a shadow directly under the ball.
C13 is the cast shadow of the ball.
Section D creates the sky with a simple gradient
Section E converts the image from two-color to three-color