Add createShaderMaterial
to GPUComputationRenderer
#142
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.
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 toGPUComputationRenderer
.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