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

Add createShaderMaterial to GPUComputationRenderer #142

Merged
merged 4 commits into from
Nov 7, 2021

Conversation

mattrossman
Copy link
Contributor

Why

See the JS definition here: https://github.com/mrdoob/three.js/blob/r133/examples/jsm/misc/GPUComputationRenderer.js#L302-L318

This function's usage is also mentioned in the comments at the top of the file: https://github.com/mrdoob/three.js/blob/r133/examples/jsm/misc/GPUComputationRenderer.js#L84-L85

What

Adds the missing createShaderMaterial function definition to GPUComputationRenderer.

I didn't see an existing GPGPU test and I'm reluctant to write my own since there's a lot of moving parts and shader fluff in the three.js examples for those, seems like it'd be a lot of work to properly cover all the parts of GPUComputationRenderer. If you have a suggestion for a simple test case then I can add it though.

Checklist

  • Ready to be merged

@joshuaellis
Copy link
Member

I've added a test and removed what I believe to be a weakness in our type system regards to RenderTarget a generic empty object. The test highlighted this for me which is nice.

@joshuaellis joshuaellis merged commit de50f10 into three-types:master Nov 7, 2021
@mattrossman mattrossman deleted the three-gpgpu branch November 7, 2021 19:43
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