# Aliasing issue Processing 4

**URL:** <https://discourse.processing.org/t/aliasing-issue-processing-4/47785>\
**Category:** Processing\
**Created:** [January 22, 2026, 5:25pm UTC](https://discourse.processing.org/t/aliasing-issue-processing-4/47785 "2026-01-22T17:25:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chriz96](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chriz96/32/18189_2.png) [@Chriz96](https://discourse.processing.org/u/Chriz96)\
**Post date:** [January 22, 2026, 5:25pm UTC](https://discourse.processing.org/t/aliasing-issue-processing-4/47785/1 "2026-01-22T17:25:27Z")

</div>

Hi, ever since Procesing 4 was launched I’ve been having this aliasing issue. Everything from the splashscreen, the UI and the sketch window looks jaggy. Is there a way to make everything look sharper? I’m working on a Windows computer.

 ![Captura de pantalla 2026-01-22 112334](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/2/7/27ecab69063cedc60d32edcc2be48ae930b62b37.jpeg)  
 ![Captura de pantalla 2026-01-22 112210](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/a/b/ab01c0baf515796e4eed6fac483e23ae5f968e26.jpeg)  
 ![Captura de pantalla 2026-01-22 112502](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/3/b/3b2b824e1299bcf0d8c396669715a8fee3c4180f.jpeg)

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 22, 2026, 6:05pm UTC](https://discourse.processing.org/t/aliasing-issue-processing-4/47785/2 "2026-01-22T18:05:06Z")

</div>

I tried your code on my iMac and it worked fine so maybe its just when using Processing with Windows.

 ![any3](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/4/542b33d1c111017c24996e70b987dbb500cdd3d8.png)

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 22, 2026, 7:27pm UTC](https://discourse.processing.org/t/aliasing-issue-processing-4/47785/3 "2026-01-22T19:27:42Z")

</div>

Another option is to use JavaFx in the default Processing window:

```auto
import javafx.scene.canvas.Canvas;
import javafx.scene.layout.StackPane;

Canvas canvas;
StackPane root;

void setup(){
 size(760,760,FX2D);  
 surface.setTitle("JavaFX in Default Wnd");
 canvas = (Canvas)surface.getNative();
 root = (StackPane)canvas.getParent();
 rectMode(CENTER);
 translate(width/2,height/2);
 rotate(40);
 rect(0,0,200,200);
}

void draw(){

}

```

**Output in Windows 11:**

 ![r](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/3/1/31e48c9ee59136bfb63819e66bc5ca4826737278.png)

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 23, 2026, 2:50am UTC](https://discourse.processing.org/t/aliasing-issue-processing-4/47785/4 "2026-01-23T02:50:21Z")

</div>

Hello @Chriz96 ,

This is with Processing 4.4.10 and W10 for the JAVA2D renderer (default).

Other versions may behave differently.

Give this a try:

```auto
float a;

//If using Windows scaling add this for 1:1 rendering on some versions:
static
  {
  // JAVA2D: 
  // Forces 1:1 pixel rendering by disabling OS-level DPI scaling
  System.setProperty("sun.java2d.uiScale", "1.0");
  }

void setup() {
  size(600, 600); // JAVA2D is the default
  //size(600, 600, P2D); //Try different renderers
 
  translate(width/2, height/2);
  rectMode(CENTER);
  
  //smooth(4); //See reference and try different values
  
  pixelDensity(1); //Try this if you have a high density display.
}

void draw() {
  // You must have this otherwise it keeps painting over window:
  background(255);   
  
  translate(width/2, height/2);
  rotate(radians(22.5));
  rect(0, 0, 200, 200);
  //a += 0.02;
}

//void mousePressed() {
// saveFrame("any3.png");
//}

```

You will have to experiment and comment \ uncomment lines of code and make changes.

Also look up the references for each.

Reference (this may depend on Processing version used):

> [@DPI Renderer Scaling Override for JAVA2D](https://discourse.processing.org/t/dpi-renderer-scaling-override-for-java2d/47439):
>
> Hello folks! Forcing 1:1 Pixel Rendering for Different Renderers in Processing This topic is for OS-level DPI scaling in Windows such as: This sketch demonstrates how to force 1:1 pixel rendering by overriding DPI scaling for JAVA2D in Processing. The solution was a challenging process that required iterating through multiple approaches with both ChatGPT and Google Gemini to finally arrive at a working solution and comments. The key piece of the solution is this static block at the…

Before (without static block):

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/a/ea2e0ef916d5f9fadb3cce80a66b91055fb01669.png)

After (with static block):

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/4/7/476342304f6f480af5ef190bfb17a94a548fe702.png)

Please report your results.

Additional reference:

- [Renderers (and Windows scaling)](https://discourse.processing.org/t/renderers-and-windows-scaling/47524)
- [Resolution of window scales poorly leading to bad render · Issue #1142 · processing/processing4 · GitHub](https://github.com/processing/processing4/issues/1142#event-18768808340)

_I do not have a solution to upscale it to the windows scaling without aliasing._

`:-)`

---

<div class="post-metadata">

**Author:** ![Chriz96](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chriz96/32/18189_2.png) [@Chriz96](https://discourse.processing.org/u/Chriz96)\
**Post date:** [January 26, 2026, 11:19pm UTC](https://discourse.processing.org/t/aliasing-issue-processing-4/47785/5 "2026-01-26T23:19:29Z")

</div>

Thanks for your answer. It worked for me.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 27, 2026, 1:29am UTC](https://discourse.processing.org/t/aliasing-issue-processing-4/47785/6 "2026-01-27T01:29:23Z")

</div>

Hi @Chriz96,

You can use your original code with only the FX2D renderer:

```processing
// Original:
// https://discourse.processing.org/t/aliasing-issue-processing-4/47785

import processing.javafx.*; // Added import. You must download library to use.

float a = 0;

void setup() {
  size(400, 400, FX2D); // Added FX2D
  rectMode(CENTER);
}

void draw() {
  background(255);
  translate(width/2, height/2);
  rotate(a);
  rect(0, 0, 200, 200);
  a += 0.02;
}

void mousePressed() {
  saveFrame("any3.png");
}

```

References:

- [Environment / Processing.org](https://processing.org/environment/#renderers)
- [size() / Reference / Processing.org](https://processing.org/reference/size_.html)
- [Launcher for Multi-Renderer PApplets](https://discourse.processing.org/t/launcher-for-multi-renderer-papplets/46764)

`:)`

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 27, 2026, 1:41am UTC](https://discourse.processing.org/t/aliasing-issue-processing-4/47785/7 "2026-01-27T01:41:21Z")

</div>

The canvas and root are necessary if the user wants to add any JavaFX controls. It’s not known what the rest of the project entails, but likely is more than a rectangle.

---

<div class="post-metadata">

**Author:** ![Chriz96](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chriz96/32/18189_2.png) [@Chriz96](https://discourse.processing.org/u/Chriz96)\
**Post date:** [January 27, 2026, 4:14pm UTC](https://discourse.processing.org/t/aliasing-issue-processing-4/47785/8 "2026-01-27T16:14:37Z")

</div>

Yes! it works nicely, Thank you!
