patriciogonzalezvivo / thebookofshaders

Step-by-step guide through the abstract and complex universe of Fragment Shaders.
http://TheBookOfShaders.com
Other
6.06k stars 689 forks source link

the maximum distance barely goes over 0.5. > sqrt(2.0) / 2? #25

Open kynd opened 8 years ago

kynd commented 8 years ago

Chapter 07 Shapes

Notice that the values don't get too high because from the center ( vec2(0.5, 0.5) ) the maximum distance barely goes over 0.5.

Isn't the maximum distance half the square root of two? (The brightest points are at the corners of the canvas, so the distance from the center would be the length of diagonal of 0.5x0.5 square).

Similarly:

The horizontal distance to the edge of the cone is 0.5.

Shouldn't this be 1.0 if the edge of the cone is the point where the brightness gets 1.0?

nicoptere commented 8 years ago

also true for chapter 6 under the "HSB in polar coordinates" section :)

Howld commented 6 months ago

I have the same question, although after 8 years.