-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Updated documentation for shaders. #6497
Conversation
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far! I left some minor comments, and then after that I think this will be good to go!
Co-authored-by: Dave Pagurek <[email protected]>
Co-authored-by: Dave Pagurek <[email protected]>
Co-authored-by: Dave Pagurek <[email protected]>
Co-authored-by: Dave Pagurek <[email protected]>
I have made these changes, please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more change I think! Before, the createShader
example was relying on the vertex shader to do the positioning, and was basically ignoring the position from p5, so the example uses quad(-1, -1, 1, -1, 1, 1, -1, 1);
. Now, it actually ends up drawing a very tiny quad.
Maybe we can replace the quad()
call with plane(width, height)
to make a full-canvas shader? If you run grunt yui:dev
after making the changes, it opens a local version of the docs so you can test how it looks.
Sure! Is it this example that you're talking about? (under createShader). |
Right, that's the one! |
does this look fine? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried running the example by running grunt yui:dev
and going to the createShader
documentation in the local docs server, and it looks like it's hitting some errors. I left some comments where I think they can be fixed!
hi, please have a look and let me know if other changes are required! |
Removed the trailing spaces! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
Resolves #4714
Changes:
Updated the createShader with vertex shader. To recommend users make use of this shader to avoid inconsistency in their code as shaders can change the positioning of shapes drawn with them.
Also updated related docs in loadShader and shader.
PR Checklist
npm run lint
passes