stackgl / shader-school

:mortar_board: A workshopper for GLSL shaders and graphics programming
Other
4.27k stars 251 forks source link

Intro 3 example is confusing. #158

Open ambethia opened 8 years ago

ambethia commented 8 years ago

Perhaps it's because I don't understand the math fully, but I found an example given for Intro 3 to be confusing and it distracted me quite a bit from settling on a working solution.

As an example, if a = vec2(1,0) and b = vec2(0,1), then you should return the result vec2(sqrt(2)/2, sqrt(2)/2).

I was able to pass the exercise by just copying the bisector function in the hint and using it:

  vec3 bi = bisector(vec3(a, 0), vec3(b, 0));
  return vec2(bi.xy);

I understand if the vectors are parallel or zero that I can return whatever I want, but I don't need to, and the example says I "should" return the square root of two over two? I feel like that sentence could either be entirely removed or perhaps expanded with a bit more context. If it can be removed, I'm happy to submit that PR.

Thanks!

thomastraum commented 6 years ago

couldn't agree more was totally stuck on this! very weird explanation....