Skip to content

Commit fe98b09

Browse files
committed
now accounting for displayDensity when defining shader uniform
1 parent ca31777 commit fe98b09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/data/examples/en/20_3D/10_passing_shader_uniforms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// lets send the resolution, mouse, and time to our shader
2929
// the mouse x position will change the number of sides
3030
// before sending mouse + time we modify the data so it's more easily usable by the shader
31-
theShader.setUniform('resolution', [width, height]);
31+
theShader.setUniform('resolution', [width * displayDensity(), height * displayDensity()]);
3232
theShader.setUniform('mouse', map(mouseX, 0, width, 0, 7));
3333
theShader.setUniform('time', frameCount * 0.01);
3434

0 commit comments

Comments
 (0)