Skip to content

Commit faeaa74

Browse files
committed
Fix: Example: Blur using Framebuffer Depth.
Bug: Example "Blur using Framebuffer Depth" cannot run. https://p5js.org/examples/3d-blur-using-framebuffer-depth.html
1 parent b51e5f8 commit faeaa74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/data/examples/en/20_3D/12_framebuffer_blur.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function draw() {
3939
shader(blur);
4040
blur.setUniform('img', layer.color);
4141
blur.setUniform('depth', layer.depth);
42-
rect(width, height);
42+
rect(0, 0, width, height);
4343
}
4444

4545
function windowResized() {
@@ -54,7 +54,7 @@ varying vec2 vTexCoord;
5454
void main() {
5555
vec4 positionVec4 = vec4(aPosition, 1.0);
5656
positionVec4.xy = positionVec4.xy * 2.0 - 1.0;
57-
positionVec4.y *= -1;
57+
positionVec4.y *= -1.0;
5858
gl_Position = positionVec4;
5959
vTexCoord = aTexCoord;
6060
}`;

0 commit comments

Comments
 (0)