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
Expose custom shader modifications of the splat shader #5809
Conversation
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.
AWESOME
@@ -32,11 +32,12 @@ class SplatInstance { | |||
|
|||
lastCameraDirection = new Vec3(); | |||
|
|||
constructor(splat, cameraEntity, debugRender = false) { | |||
constructor(splat, options) { |
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.
Might be worth documenting these options.
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.
Yep. At the moment none of the splat code has jsdocs, so that's all for a separate PR.
this.splat = splat; | ||
|
||
// material | ||
this.material = splat.createMaterial(debugRender); | ||
const debugRender = options.debugRender; | ||
this.material = splat.createMaterial(options); |
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 would be good if we also supported user passing in material.
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.
separate PR. But not sure how that would work with a compute shader implementation on WebGPU, so I would not do that yet.
@@ -63,8 +63,8 @@ class Splat { | |||
this.centerTexture.destroy(); | |||
} | |||
|
|||
createMaterial(debugRender = false) { | |||
const material = createSplatMaterial(this.device, debugRender); | |||
createMaterial(options) { |
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.
Think we should document options.
dancing.guitar.mov