We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 540d299 commit 77fe360Copy full SHA for 77fe360
core/src/processing/opengl/PShader.java
@@ -1210,8 +1210,8 @@ protected void setCommonUniforms() {
1210
}
1211
1212
if (-1 < resolutionLoc) {
1213
- float w = currentPG.viewport.get(2);
1214
- float h = currentPG.viewport.get(3);
+ float w = currentPG.viewport.get(2) * currentPG.pixelDensity;
+ float h = currentPG.viewport.get(3) * currentPG.pixelDensity;
1215
setUniformValue(resolutionLoc, w, h);
1216
1217
0 commit comments