minetest / irrlicht

Minetest's fork of Irrlicht
Other
115 stars 87 forks source link

Add support for multi-sample textures #286

Open lhofhansl opened 4 months ago

lhofhansl commented 4 months ago

This is important to make use multi-sample anti-aliasing (MSAA) - also full-screen anti-aliasing (FSAA).

See https://github.com/minetest/minetest/issues/14285 and https://github.com/minetest/minetest/pull/14338 for (lengthy) discussion and motivation.

Basically something like this:

In the case of MT it means allowing first stage of the render pipeline to be multi-sampled and then continuing with normal texture in subsequent steps in the pipeline.

@HybridDog @grorp FYI.

lhofhansl commented 4 months ago

There are actually multiple problems:

TODO: Check MacOS and Android

lhofhansl commented 4 months ago

I dug around in the code, and it is holy mess. :(

Nobody here who know a bit more about FSAA and GL + Irrlicht?

sfan5 commented 4 months ago

Well going by this:

The rest of it is shader and intergration work inside MT. Finally I'm not sure if multisample textures will still only work with the OpenGL3 driver due to Core vs. Legacy profile.

lhofhansl commented 4 months ago

You can see the difference here:

https://github.com/minetest/irrlicht/assets/446130/e02a4160-f310-4c5e-854b-b78040b683d0

https://github.com/minetest/irrlicht/assets/446130/6c161c40-9c31-4009-aa8b-fec310955016

FXAA is useless in this case. The moire effect is very noticeable when you move around.