-
-
Notifications
You must be signed in to change notification settings - Fork 474
Misc WebGL Example Fixes #1282
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
Misc WebGL Example Fixes #1282
Conversation
… sketch. also added describe() and a small amount of text.
kjhollen
left a comment
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.
Looks good to me! I'm going to build this locally, just to make sure everything runs, then I'll merge.
kjhollen
left a comment
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.
Just one question from running code—see below.
| void main() { | ||
|
|
||
| vec2 center = resolution * 1.0; // draw the shape at the center of the screen | ||
| vec2 center = resolution * 0.5; // draw the shape at the center of the screen |
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.
@aceslowman hmm, this doesn't appear in the center of the sketch for me. it's in the lower left quadrant. using just resolution (or the * 1.0) works. is that expected?
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.
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.
Also, just caught some issue with line-endings, it wasn't loading for me until I changed the updated example files from CRLF to LF, otherwise I was getting 404s and the files weren't being properly assembled. I thought that the .gitattributes PR resolved this, not sure what is going on.
|
Thanks @aceslowman and @kjhollen for working on this. Please let us know if you need any help to get this PR merged. |
|
@aceslowman I think I figured out what's happening with the center item in the shader uniforms example. I must have been looking at the example on my laptop, which has a 2x retina display. I was able to get the object to center by changing the code to: If you make this change, I think we'll be ready to merge from there. |
|
@kjhollen Just committed the fix you described and it seems to work well on my end. Quick question, I merged 'main' before making this commit, should I have held off on that? |
|
@aceslowman should be fine, I'll build this on my end before I merge it just to be sure! |
davepagurek
left a comment
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.
The density fix looks good!
Changes:
Additionally I added describe() in each of these example sketches.
For GSOC 2022
mentor: @kjhollen