From e9e1a8261dc8f460fea0773fe9163f2ad5b1bc85 Mon Sep 17 00:00:00 2001 From: vamshi567bh Date: Sat, 20 Jun 2026 19:40:18 +0000 Subject: [PATCH] update framebuffer blur vertex shader to use separate uModelMatrix + uViewMatrix for p5 2.x --- src/content/examples/en/11_3D/06_Framebuffer_Blur/code.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content/examples/en/11_3D/06_Framebuffer_Blur/code.js b/src/content/examples/en/11_3D/06_Framebuffer_Blur/code.js index 271bfe352a..4328d2841d 100644 --- a/src/content/examples/en/11_3D/06_Framebuffer_Blur/code.js +++ b/src/content/examples/en/11_3D/06_Framebuffer_Blur/code.js @@ -1,6 +1,7 @@ // Vertex shader code let vertexShader = ` -uniform mat4 uModelViewMatrix; +uniform mat4 uModelMatrix; +uniform mat4 uViewMatrix; uniform mat4 uProjectionMatrix; attribute vec3 aPosition; @@ -16,7 +17,7 @@ void main() { // copy position with a fourth coordinate for projection (1.0 is normal) vec4 positionVec4 = vec4(aPosition, 1.0); - gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4; + gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * positionVec4; }`; // Fragment shader code