-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
WebGPURenderer: PostProcessing + GaussianBlurNode + QuadMesh #27369
Conversation
This is just awesome and shows the potential of the node material system! The new approach will make FX so much more flexible! Really love it! |
const material = new MeshBasicNodeMaterial();
// portal
material.colorNode = pass( scenePortal, camera ).context( { getUV: () => viewportTopLeft } );
// opacity effect
material.opacityNode = uv().distance( .5 ).remapClamp( .3, .5 ).oneMinus(); |
Sorry for the problems with flipY this last month, backends + framebuffers are sometimes confusing in this sense, but with |
…27369) * WebGPURenderer: PostProcessing + GaussianBlurNode * update example * revision * revision * Fix RTT & Framebuffer flipY * Fix multi-scene backgroundNode * fixes * new webgpu_portal example * fix title * cleanup * cleanup * adjustments * Added QuadMesh * PostProcessing just for WebGPUBackend for now * portal update * error message * cleanup * using quad texture * Fix flip RTT & DepthNode after QuadMesh * update to QuadMesh * Update webgpu_depth_texture.jpg * update `webgpu_instance_uniform` example
|
||
const _geometry = new QuadGeometry(); | ||
|
||
class QuadMesh { |
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.
Don't we already have FullscreenQuad
class? /ping @sunag
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.
It was inspired by this class, but has a few modifications simplifying it to WebGPURenderer
.
Description
Simple Depth of Field
Example
Simple Depth of Field Example
The scene consists of a
RenderPass
that will store theColor
andDepth
in that can be used as Nodes for the composition.The use of
remapClamp()
is to adjust theDepthNode
range as the strength of blur used inscenePassColorBlurred.directionNode
.We could easily connect any other node, or other
RenderPass
, for example to the grayscale effect, we don't need to add anotherPass
, we can just add the node in the same flow, try for example:I adapted
GaussianBlur
fromUnrealBloomPass
to create aGaussianBlurNode
, so we can use it for various purposes.Backends