OpenGL 3D viewport renderer

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

milek7
Engineer
Engineer
Posts: 8
Joined: 18 Jul 2016 08:04

Re: OpenGL 3D viewport renderer

Post by milek7 » 04 Dec 2019 17:03

Assert wrote:
03 Dec 2019 23:56
No, this is just because the land generator do not invalidate all of the tiles, just save and load. I will fix this soon.
That fixes missing tiles, but I meant that UI graphics are pixelated: https://i.imgur.com/4yPs6wE.png I tracked it to be caused by sampling atlases at wrong mipmap level, removing that from code fixed it for me:

Code: Select all

glTexParameterf(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_LOD_BIAS, 0.5);

Assert
Engineer
Engineer
Posts: 10
Joined: 24 Nov 2019 22:19

Re: OpenGL 3D viewport renderer

Post by Assert » 04 Dec 2019 20:28

milek7 wrote:
04 Dec 2019 17:03
Assert wrote:
03 Dec 2019 23:56
No, this is just because the land generator do not invalidate all of the tiles, just save and load. I will fix this soon.
That fixes missing tiles, but I meant that UI graphics are pixelated: https://i.imgur.com/4yPs6wE.png I tracked it to be caused by sampling atlases at wrong mipmap level, removing that from code fixed it for me:

Code: Select all

glTexParameterf(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_LOD_BIAS, 0.5);
Ah, i see. Thisng not so simple. Without this bias too hi level is selected on my hardware. Probably this is something dependent to the drivers or hints. I will make an explicit mip level selection in the shader.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests