You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your demo, it helped me. But I don't fully understand why.
I think as a demo, it's important to explain the thinking process of the key thing you demonstrate, for the learners who come to find technical detail instead of just "shader magic".
I understand that as third parm of mix, mixf have to clamp from 0.0 to 1.0, but what does float r = mixRatio * (1.0 + threshold * 2.0) - threshold; means?
And why we have to (transitionTexel.r - r)*(1.0/threshold)?
Is this your own invention or you see from somewhere?
I'm really enjoy shader programming, and really feel a door closed when I see magic uncommented shader code like this.
The text was updated successfully, but these errors were encountered:
Thank you for your demo, it helped me. But I don't fully understand why.
I think as a demo, it's important to explain the thinking process of the key thing you demonstrate, for the learners who come to find technical detail instead of just "shader magic".
Would you please comment this 2 lines?
three.js-demos/crossfade/js/transition.js
Lines 73 to 74 in 40a8ec1
I understand that as third parm of mix,
mixf
have to clamp from 0.0 to 1.0, but what doesfloat r = mixRatio * (1.0 + threshold * 2.0) - threshold;
means?And why we have to
(transitionTexel.r - r)*(1.0/threshold)
?Is this your own invention or you see from somewhere?
I'm really enjoy shader programming, and really feel a door closed when I see magic uncommented shader code like this.
The text was updated successfully, but these errors were encountered: