mirror of
https://github.com/PavelDoGreat/WebGL-Fluid-Simulation.git
synced 2025-10-03 17:31:53 +02:00
fix excessive initialization because of pixel ratio multiplication
This commit is contained in:
@@ -11,7 +11,7 @@ let config = {
|
||||
PRESSURE: 0.8,
|
||||
PRESSURE_ITERATIONS: 20,
|
||||
CURL: 30,
|
||||
SPLAT_RADIUS: 0.4,
|
||||
SPLAT_RADIUS: 0.25,
|
||||
SPLAT_FORCE: 6000,
|
||||
SHADING: true,
|
||||
COLORFUL: true,
|
||||
@@ -1348,5 +1348,5 @@ function getTextureScale (texture, width, height) {
|
||||
|
||||
function scaleByPixelRatio (input) {
|
||||
let pixelRatio = window.devicePixelRatio || 1;
|
||||
return input * pixelRatio;
|
||||
return Math.floor(input * pixelRatio);
|
||||
}
|
Reference in New Issue
Block a user