modules/graphics/src/main/java/com/sun/javafx/tk/quantum/ViewPainter.java
Print this page
@@ -173,10 +173,13 @@
// This "g" variable might represent the back buffer graphics, or it
// might be reassigned to the sceneBuffer graphics.
Graphics g = backBufferGraphics;
// Take into account the pixel scale factor for retina displays
final float pixelScale = getPixelScaleFactor();
+ // Cache pixelScale in Graphics for use in 3D shaders such as camera and light positions.
+ g.setPixelScaleFactor(pixelScale);
+
// Initialize renderEverything based on various conditions that will cause us to render
// the entire scene every time.
boolean renderEverything = overlayRoot != null ||
freshBackBuffer ||
sceneState.getScene().isEntireSceneDirty() ||