-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat: support lighting and shadows for scatter and mesh #342
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Basically my approach was to take the threejs shaders (vertex and fragment) and merge them into 1 shader, where the defines ( |
maartenbreddels
force-pushed
the
master
branch
2 times, most recently
from
April 13, 2021 12:20
e861e87
to
6dead3f
Compare
maartenbreddels
force-pushed
the
feat_lighting_scatter_mesh
branch
2 times, most recently
from
May 17, 2021 09:39
63aea8e
to
e0689f2
Compare
maartenbreddels
force-pushed
the
feat_lighting_scatter_mesh
branch
2 times, most recently
from
May 17, 2021 10:29
8ef8989
to
c51328f
Compare
maartenbreddels
force-pushed
the
feat_lighting_scatter_mesh
branch
from
June 29, 2021 19:32
0a935c3
to
e2eafc4
Compare
…cached Example program: import ipyvolume as ipv import numpy as np def scene(): f = ipv.figure(debug=True) ipv.xyzlim(-1, 1) x = np.array([0.1, 0.5], dtype=np.float32) ipv.material_lambert() s = ipv.scatter(x, x, x, marker="sphere", size=10); ipv.material_clear() k = ipv.examples.klein_bottle(show=False) ipv.xyzlim(2) ipv.material_phong() ipv.material_clear() m = ipv.plot_plane('bottom') ipv.show() return f f = scene() ipv.light_ambient(intensity=0.4) ipv.light_directional(position=[-3, 10, 3]); The klein_bottle would not cast a shadown, unless we modify alphaTest
This appears black if alphaTest for mesh is changed to != 0.5
maartenbreddels
force-pushed
the
feat_lighting_scatter_mesh
branch
from
August 24, 2021 13:23
84601a5
to
7a09767
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This supersedes 80% of #341, supporing shadows with instances. I've left out the GUI parts, to avoid getting stuck on that, so we can merge this hopefully quickly:
This gives me:
TODO: