Skip to content
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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

matthewturk
Copy link
Member

This starts the process of adding compute shader support. Compute shaders will run once beforehand, and will have special invocations.

Comment on lines 15 to 18
data = traitlets.Instance(BlockCollection)
bins = traitlets.CInt(64)
min_val = traitlets.CFloat(0.0)
max_val = traitlets.CFloat(1.0)
Copy link
Contributor

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).

Copy link
Member Author

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.

Copy link
Member Author

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.

@matthewturk
Copy link
Member Author

I think the right structures are there, and next I'll add the actual compute shader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants