-
Notifications
You must be signed in to change notification settings - Fork 0
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
per-fragment phong shading for mesh visual #10
per-fragment phong shading for mesh visual #10
Conversation
API questions: LightHow does the user specify lights? Possibilities: 1 . create a
I'm undecided. I think I would prefer having Light in a separate class, just for neatness' sake. As for it being global, that would impact a lot of things, and I don't think that overhead is necessary for a plotting library like vispy. Material
Again, I'd prefer to separate out Material properties, so we can do really nice things like bump mapping and normal mapping if we want to later. However, I'm not sure how viable / required this is. Also, if we have a ping @rossant, @Eric89GXL, @campagnola |
Here is the plan so far: Lights:
Materials:
All this should be left for future PRs, though.. |
This is looking better. Try out
This is not needed for the current PR, but it would be another nice addition later on.
Unnecessary for now. This approach is only needed if a separate function needs to introduce a varying that was not in the original vertex/fragment code. |
What exactly looks "wrong" in the Also, what about texturing? What will be the API for specifying uv coordinates? |
That's it :) I haven't given the texturing API much thought yet; let's leave that for another PR. |
@campagnola Can you check it out now? I still think there's something fishy going on with the normals, but it is better now I guess. Also, what do I port next? |
Yeah, any of those would be great. AxisVisual has already been done, but Colorbar still has not. |
@campagnola do you have any idea as to why the shader isn't working properly? |
Screenshot:
Are these needed?
Varying
class directly to the fragment shader