Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit 225c9b1

Browse files
annxingyuanpyu10055
authored andcommitted
fix (#1858)
1 parent 8361f6a commit 225c9b1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/backends/webgl/encode_matrix_gpu.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export class EncodeMatrixProgram implements GPGPUProgram {
4545
int flatIndex = getFlatIndex(coords);
4646
int offset = imod(flatIndex, 4);
4747
48-
flatIndex /= 4;
48+
flatIndex = idiv(flatIndex, 4, 1.);
49+
4950
int r = flatIndex / ${width};
5051
int c = imod(flatIndex, ${width});
5152
vec2 uv = (vec2(c, r) + halfCR) / vec2(${width}.0, ${height}.0);

‎src/backends/webgl/encode_matrix_packed_gpu.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ export class EncodeMatrixPackedProgram implements GPGPUProgram {
6767
flatIndex = getFlatIndex(localCoords);
6868
offset = imod(flatIndex, 4);
6969
70-
flatIndex /= 4;
70+
flatIndex = idiv(flatIndex, 4, 1.);
71+
7172
r = flatIndex / ${width};
7273
c = imod(flatIndex, ${width});
7374
uv = (vec2(c, r) + halfCR) / vec2(${width}.0, ${height}.0);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /