-
-
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
Multiple types of materials to support WebGL Geometries #3806
Comments
Hi @sanketsingh24 and @aferriss, after finishing the summer project, what are your thoughts on this issue? Thanks! |
@stalgiag @sanketsingh24 I still think this would be a good feature to add, but it's probably not a simple PR. This touches a lot of the webGL rendering pipeline and untangling and sorting things out is probably going to be a bit of an effort. I don't think I'll have much time anytime soon to work on this and I'm pretty certain Sanket is also busy in the coming months, so I'm going to slap on the help wanted tag. |
Thanks for the thoughts @aferriss ! I agree that this seems a bit rough, and definitely feels like it would need to be part of a larger restructuring. I am looking into these kinds of changes as part of #3794. I am happy to do the work if there is a sound high-level plan for a restructure or redesign, but without this I am reluctant to start messing with this many parts of the code before the 1.0 release. It would be nice to start gathering design opinions from gl experts, but that might require first making a very clear map of the rendering pipeline as it stands now. I also don't know if the effort-to-reward ratio is ideal with a large GL restructure currently. The stability, functionality, and performance trend of the GL Renderer has been strongly upward for the past few years, but the portion of users that work with it may still be relatively low. Of course, this is difficult to know for sure since we don't capture data about these kinds of things. |
Nature of issue?
Most appropriate sub-area of p5.js?
Details
Currently, in p5, only one of the
specularMaterial()
orambientMaterial()
can be applied to a geometry. But many objects in the real world can exhibit both behaviour. Take a look at this sketch from processing-(Code)
In short, the left sphere has just ambient (red) properties whereas the right sphere has both ambient (red) and specular (white) properties.
As I am implementing
emissiveMaterial()
also, we (me and @aferriss ) just got this thought and this would be a good feature. One of the things which we noticed was bothspecularMaterial()
andambientMaterial()
use the same uniform and same variable, which causes the later one to render.The text was updated successfully, but these errors were encountered: