-
Notifications
You must be signed in to change notification settings - Fork 5
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
Start adding compute shader support #143
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
…nto matthewturk/issue142
data = traitlets.Instance(BlockCollection) | ||
bins = traitlets.CInt(64) | ||
min_val = traitlets.CFloat(0.0) | ||
max_val = traitlets.CFloat(1.0) |
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.
More of a note for the future -- the data attribute here has a data.min_val
and data.max_val
, which are the raw min/max across all blocks. Since the compute shader will operate on normalized data, makes sense to keep these min_val, max_val values at 0,1. but when drawing the result (however that happens), but when it comes time to draw the result, if there are labels for the binning axis, it'd be nice to be able to re-scale those to the actual data range (which will be easy since data.min_val
and data.max_val
exist already).
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.
Oh, awesome! Thank you. I forgot that the data was already normalized.
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.
So in principle we could do some fancy work to make these in the normalized coordinates too.
I think the right structures are there, and next I'll add the actual compute shader. |
…nto matthewturk/issue142
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
I've also, I think, addressed #160 in the change in a back-compat way. |
Still doesn't quite work yet, but that's because I don't have my image bindings all set up properly. |
In the current state, the histogram successfully executes. I'm working on comparing the results and adding in a display widget. |
I guess where I'm not 100% sure is if I need to have separate programs for the compute shader and the other. I'm starting to think maybe in fact |
This starts the process of adding compute shader support. Compute shaders will run once beforehand, and will have special invocations.