Skip to content

Commit d1051eb

Browse files
committed
Slight perf updates, fix text
1 parent b6d4c56 commit d1051eb

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/webgl/shaders/lighting.glsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ precision highp float;
44
precision highp int;
55

66
uniform mat4 uViewMatrix;
7+
uniform mat3 uCameraNormalMatrix;
78

89
uniform bool uUseLighting;
910

src/webgpu/p5.RendererWebGPU.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ function rendererWebGPU(p5, fn) {
14611461
const bgEntries = entries.map(entry => {
14621462
// Check if this is a uniform buffer binding
14631463
const uniformBufferInfo = this._uniformBuffersForBinding.get(entry.binding);
1464-
if (uniformBufferInfo) {
1464+
if (uniformBufferInfo && entry.bufferGroup) {
14651465
return {
14661466
binding: entry.binding,
14671467
resource: entry.bufferGroup.dynamic
@@ -1494,7 +1494,7 @@ function rendererWebGPU(p5, fn) {
14941494
passEncoder.setBindGroup(
14951495
group,
14961496
bindGroup,
1497-
entries.map(e => this._uniformBuffersForBinding.get(e.binding))
1497+
entries.map(e => e.bufferGroup && this._uniformBuffersForBinding.get(e.binding))
14981498
.filter(b => b?.dynamic)
14991499
.map(b => b.lastOffset)
15001500
);

0 commit comments

Comments
 (0)