Adding uniform buffers

But still resolution problem
This commit is contained in:
lobo committed 2026-02-20 17:25:42 +01:00
1 parent 0d2e7c97ec
commit f499b78fd5
3 files changed
+31 -41

No files matched your search

@@ -8,6 +8,7 @@ export interface RenderConfig {
vertexShader: string;
fragmentShader: string;
uniformNames: string[];
uniformBufferNames?: string[];
}
export type RenderCallback = (material: ShaderMaterial, camera: Camera, canvas: HTMLCanvasElement, scene: Scene) => void;
@@ -142,6 +143,7 @@ export class BabylonCanvas implements AfterViewInit, OnDestroy {
{
attributes: ["position", "uv"],
uniforms: ["resolution", "cameraPosition", ...this.config.uniformNames],
uniformBuffers: this.config.uniformBufferNames ?? [],
shaderLanguage: this.config.shaderLanguage ?? ShaderLanguage.GLSL
}
);