P3D renders edges blurryly

P2D and the default renderer give me the same crisp not blurry results as each other. But both suffer severe frame loss when pipes are displayed on screen.

P3D, (which I was at the time calling as fullscreen(OPENGL)) never drops a frame below 60 even on Android
Because of this I have been using P3D for a 2D sketch, not changing anything other than the declaration of the renderer used.

A side effect of using P3D, is that it makes the edges of lines blurry.

What I am trying to do is get rid of the blur introduced by P3D.

with This is the rendering with P3D enabled
without This is the rendering with the default renderer

The Screenshots dull the effect somehow, it’s much worse in real life
(tested on multiple monitors)

1 Like

Could you post screenshots of the differences between the two for comparison?

I am recreating Flappy Bird, so the lines are supposed to be very hard.
While I know openGL is for 3D applications, it handles drawing images so much better than P2D it doubles my framerate when many images are visible.

with This is the rendering with openGL
without This is the rendering without openGL enabled.

The Screenshots dull the effect somehow, it’s much worse in real life
(tested on multiple monitors)

1 Like

Possibly try initializing the sketch with

hint(DISABLE_TEXTURE_MIPMAPS);
 ((PGraphicsOpenGL)g).textureSampling(2);

Alternatively, you might try increasing/decreasing the size of whatever surface you’re rendering on by some small amount.

2 Likes

What does that mean? What renderer are you using? P2D is not the default, it’s a 2D OpenGL renderer. P3D is the 3D OpenGL renderer.

I have been using P3D for a 2D sketch, not changing anything other than the declaration of the renderer used.

P2D and the default renderer give me the same crisp not blurry results as each other. But both suffer severe frame loss when pipes are displayed on screen.

P3D, (which I was at the time calling as fullscreen(OPENGL)) never drops a frame below 60 even on Android, but as a side effect, makes the edges of lines blurry.

What I am trying to do is get rid of the blur introduced by P3D.

err, did you try noSmooth(); ?

Chrisir

Yes, I forgot to write that down

Did you try FX2D ?

Interesting, I just did and it gives me the same frames as OPENGL, with the same issue with blurry lines.

I will look into the provided solution in your link.

1 Like

SOLUTION:
a. if you are just switching to OPENGL/P3D for FPS, use this solution from rufsketch 1 in your main to get back your hard lines

b. if you need to have edges not blurry in FX2D,

1 Like

wait a minute?
YOUR / this / solution was given to you above here by @rufsketch1

and you not even say THANK YOU? or LIKE? or Solution?
to him.

1 Like

Haha. No big deal. At least his additional solution also includes info for FX2D.

1 Like

I’m sorry, completely forgot to credit you.

1 Like