atsb / Doom64EX-Plus

An improved modern version of Doom64EX.
GNU General Public License v2.0
118 stars 18 forks source link

Anisotropy Needs Mip Maps to be generated. #248

Closed blackhand1001 closed 3 weeks ago

blackhand1001 commented 2 months ago

On NVIDIA cards the driver will automatically create mip maps if anisotropy is enabled and mip maps don't exist in the current texture object. This is actually non-standard behavior. On every other type of GPU it needs to be manually done by calling the function in OpenGL to create them.

It should be a relatively easy fix. This just needs to be added in the appropriate spot.

https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGenerateMipmap.xhtml

atsb commented 2 months ago

I'd rather just disable anisotropy in that case. I don't have NVidia cards and refuse to use them, so it doesn't bother me either way.

blackhand1001 commented 2 months ago

I think you misunderstood. It only works on NVIDIA cards. It however makes a huge difference in image quality. That difference can easily be possible on all gpus with a single line of code.

atsb commented 2 months ago

In that case I will add it, thanks

atsb commented 2 months ago

I think you misunderstood. It only works on NVIDIA cards. It however makes a huge difference in image quality. That difference can easily be possible on all gpus with a single line of code.

So what I've gathered is that you must add this to each part of the code that generates a texture. Therefore it isn't just 'one line of code' but rather a copy/paste in about 25 areas. I'll see if there is a nicer way to do this as I hate duplicating.

atsb commented 3 weeks ago

Decided won't do. It isn't a clean implementation of this, especially considering how the rendering is.