Skip to content

Commit ebb4208

Browse files
authored
Merge pull request #1392 from shibomb/fix/example-3d-FramebufferDepth
Fix/example 3d framebuffer depth
2 parents b51e5f8 + 279b761 commit ebb4208

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
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
}`;

src/data/examples/es/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
}`;

src/data/examples/hi/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
}`;

src/data/examples/ko/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
}`;

src/data/examples/zh-Hans/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)