Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 05 #24

Closed
redraw opened this issue Dec 23, 2015 · 0 comments
Closed

Chapter 05 #24

redraw opened this issue Dec 23, 2015 · 0 comments

Comments

@redraw
Copy link

redraw commented Dec 23, 2015

hey Patricio! this is a great book. I has started reading this book many times to refresh shader's concepts, but always got stucked on Chapter 05, until today that I've decided to understand it.
I've noticed you've already added this on TODO, but this is just to share my opinion.
The hard part is the color sums. Maybe splitting them, suggesting to preview the result of each one i.e.

//color = (1.0-pct)*color;

//color = pct*vec3(0.0,1.0,0.0);

color = (1.0-pct)*color + pct*vec3(0.0,1.0,0.0);

The same with smoothstep() function, although you've already offered a help tip

// the original tip
float y = smoothstep(0.2,0.5,st.x) - smoothstep(0.5,0.8,st.x);

// making the values similar to the plot() function
float y = smoothstep(0.48,0.5,st.x) - smoothstep(0.5,0.52,st.x);

great work...

@redraw redraw closed this as completed Dec 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant