starseeker / osmesa

Library providing Mesa3d 7.0.4 swrast and osmesa capabilities.
Other
11 stars 4 forks source link

Any plan to integrate FXAA or SMAA into default rendering ? #1

Open zen253230 opened 4 months ago

zen253230 commented 4 months ago

Hello,

you did a tremendous job exposing the osmesa api into a portable version ! Thank you ! But problem is antialiasing in rendered images.

VTK is using FXAA to overcome this problem : https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/glsl/vtkFXAAFilterFS.glsl There is also SMAA : https://github.com/iryoku/smaa/blob/master/SMAA.hlsl

Would you consider applying any of these two solutions into your examples?

starseeker commented 4 months ago

Thank you - I'm glad others are finding it to be of interest!

If anyone wants to submit a pull request to update the examples to use an improved filter like that I certainly wouldn't be opposed. Unfortunately my use case - BRL-CAD - doesn't use shaders in its primary drawing path (our current code is based on OpenGL code so old it actually pre-dates the name OpenGL) so I'm afraid I don't have much experience with setting up or using shaders.

If we were to update the BRL-CAD drawing code to use more modern OpenGL (for some peculiar value of the word "modern", given osmesa tops out at v2.1) we could certainly look into using one of those solutions for improved results, but unfortunately it's not likely to be a priority in the near term.