alecjacobson / computer-graphics-shader-pipeline

Computer Graphics Assignment about the Shader Pipeline
14 stars 22 forks source link

Typo in smooth_heaviside? #19

Closed Yanksi closed 5 years ago

Yanksi commented 5 years ago

In smooth_heaviside.glsl, $t$ is described as:

//   t  control steepness of step function: --> 0 more linear, --> inf more like
//     Heaviside function (piecewise constant function x<0--> -1 , x>0 --> 1)

However, when I was trying to plot the function, it seems that the boundary point should be 0.5 instead of 0. img1

alecjacobson commented 5 years ago

ack. This is frustrating. Thanks for point it out. For now, I've simply fixed the comment to correctly describe what it's doing (despite being wrong). This way existing programs will not be broken.