pmndrs / pmndrs/postprocessing
Add support for velocity rendering
Open
@vanruesc is already working on this.
Since Feb 18, 2024.
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 251
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Description
Description
Implement velocity rendering by extending ShaderLib with MRT shader code based on three's VelocityShader.
References:
- https://github.com/mrdoob/three.js/blob/74d7dc8a5fb92e40758ec6b8fd08502c5ca019b3/examples/jsm/shaders/VelocityShader.js
- https://github.com/mrdoob/three.js/blob/74d7dc8a5fb92e40758ec6b8fd08502c5ca019b3/examples/webgl_materials_channels.html
- https://john-chapman-graphics.blogspot.com/2013/01/per-object-motion-blur.html
- https://github.com/mrdoob/three.js/pull/29058/files
Tasks
- Create and register the required
pp_gbuffer_velocity_*shader chunks. - Update
ShaderChunkExtensionsto assign the shader chunks to three's materials. - Add
GBuffer.VELOCITYandGData.VELOCITY. - Update
GeometryPassto define a velocity texture config. - Update
GBufferConfig,ClearFlagsandClearValues. - Update
gbufferdemo to render velocity.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.