-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
webgl: Per pixel lighting #2449
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
Conversation
…-pixel-lighting
|
Cool! A few thoughts as I am testing everything and preparing to merge your various awesome pull requests over the next few days - Can you make sure to label something if it is a work-in-progress? |
|
awesome! yes, all these PRs are ready to commit (aside from all the bugs i missed, of course ;-) if you merge those three PRs first (they're all independent), this one should be much simpler. i'll try to fix any conflicts that come up if i catch them in time. |
…-pixel-lighting
…h 'master' of https://github.com/processing/p5.js into per-pixel-lighting
…-pixel-lighting
|
😻 😻 😻 wow these results look awesome! @mlarghydracept do you want to review this one? |
|
Yeah I agree. That shader has fantastic results! I would say it might be a good idea to write a manual test for this one. Something that switches in and out of the phong specular. Just to have something to test with down the line. Otherwise I would say this looks good to merge but I would like to merge #2446 first. I don't feel qualified to evaluate that one so I pinged @lmccart for a review of it. Will merge this as soon as that is merged. |
|
@mlarghydracept #2446 has been merged |
|
Okay cool just tested a bunch and this is fantastic! Ready for a merge except two really small requests: 1: Could you put a short instruction in the perPixelLighting manual test? Just for future contributors to know that they should click to test. You can put it in the HTML if that is easier. Thanks again! |
|
This is a great addition - thank you! |
|
@Spongman I just wanted to know your logic behind using 500 in line 89 of phong.frag. I am implementing a |
|
oh you can ignore my code there... it's not correct because it's not scale-invariant. just replace it with whatever you have. i had a PR a while back that included an implementation of Processing's |
setAttributes('perPixelLighting', true)enables use of a Phong specular lighting model.before & after:

this PR includes and relies on some other PRs:
this PR should simplify significantly if those are merged first.