@luma.gl/shadertools
Version:
Shader module system for luma.gl
37 lines • 1.6 kB
TypeScript
type ShaderBindingAssignment = {
moduleName: string;
name: string;
group: number;
location: number;
};
/** One debug row describing a WGSL binding in the assembled shader source. */
export type ShaderBindingDebugRow = {
/** Binding name as declared in WGSL. */
name: string;
/** Bind-group index. */
group: number;
/** Binding slot within the bind group. */
binding: number;
/** Resource kind inferred from the WGSL declaration. */
kind: 'uniform' | 'storage' | 'read-only-storage' | 'texture' | 'sampler' | 'storage-texture' | 'unknown';
/** Whether the binding came from application WGSL or a shader module. */
owner: 'application' | 'module';
/** Shader module name when the binding was contributed by a module. */
moduleName?: string;
/** Full WGSL resource type text from the declaration. */
resourceType?: string;
/** WGSL access mode when cheaply available. */
access?: string;
/** Texture view dimension when cheaply available. */
viewDimension?: string;
/** Texture sample type when cheaply available. */
sampleType?: string;
/** Sampler kind when cheaply available. */
samplerKind?: string;
/** Whether the texture is multisampled when cheaply available. */
multisampled?: boolean;
};
/** Builds a stable, table-friendly binding summary from assembled WGSL source. */
export declare function getShaderBindingDebugRowsFromWGSL(source: string, bindingAssignments?: ShaderBindingAssignment[]): ShaderBindingDebugRow[];
export {};
//# sourceMappingURL=wgsl-binding-debug.d.ts.map