Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/platform/graphics/shader.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Shader {
* useTransformFeedback or compute shader is specified.
* @param {string} [definition.cshader] - Compute shader source (WGSL code). Only supported on
* WebGPU platform.
* @param {string} [definition.computeEntryPoint] - The entry point function name for the compute
* shader. Defaults to 'main'.
* @param {Map<string, string>} [definition.vincludes] - A map containing key-value pairs of
* include names and their content. These are used for resolving #include directives in the
* vertex shader source.
Expand Down
3 changes: 3 additions & 0 deletions src/platform/graphics/webgpu/webgpu-shader.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class WebgpuShader {
this._computeCode = definition.cshader ?? null;
this.computeUniformBufferFormats = definition.computeUniformBufferFormats;
this.computeBindGroupFormat = definition.computeBindGroupFormat;
if (definition.computeEntryPoint) {
this.computeEntryPoint = definition.computeEntryPoint;
}

} else {

Expand Down