Skip to content

MRT issue for multiple gsplat color buffers #8462

@d0rianb

Description

@d0rianb

When trying to use MRT rendering to multiples color buffers:

const splatTarget = new RenderTarget({ colorBuffers: [ colorBuffer1, colorBuffer2 ], depthBuffer, })

I have a WebGl error : GL_INVALID_OPERATION: glDrawElementsInstanced: Active draw buffers with missing fragment shader output

With only one buffer, the error is gone.

It seems to come from the gsplat fragment shader not supporting MRT for regular pass.

gl_FragColor = vec4(gaussianColor.xyz * alpha, alpha);

If my understanding is correct, SuperSplat has patch this in its custom splat shader :
https://github.com/playcanvas/supersplat/blob/main/src/shaders/splat-shader.ts#L211-L212

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions