godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.3k stars 21.05k forks source link

PanoramaSky automatically applies filter to texture after reloading the scene or changing radiance size #31372

Closed grusad closed 3 years ago

grusad commented 5 years ago

Godot version:

Godot 3.1 -stable

OS/device including version:

Linux Mint 19.something

Issue description:

I import a texture without the filter flag enabled and its all fine. Once applied to the Worldenviroments panoramaSky the texture gets filtered anyway. At first glance it looks like it is working because in the editor it gets filtered. But once I close the scene in the editor and reopen OR just start the game the texture is filtered.

So apparently the WorldEnviroment or the PanoramaSky automatically enables the filter flag anyways.

Steps to reproduce:

  1. Import a texture with filter flag off.
  2. Create a scene with a worldEnviroment and give it a PanoramaSky resource.
  3. Give the PanoramaSky the imported texture.
  4. Close and reopen the scene OR play the game.
  5. A filtered skybox, not pixelated as I wanted it to be :(

Minimal reproduction project:

EzraT commented 4 years ago

Can confirm, this issue is still present in 3.2.1.

image

This effectively makes PanoramaSky useless for 3D Pixel art games.

clayjohn commented 4 years ago

@Ezrat GLES2 or GLES3?

EzraT commented 4 years ago

@clayjohn Both, the screenshot was taken with GLES2 enabled.

clayjohn commented 4 years ago

@Calinou Were you able to reproduce? I just tested it out and both GLES2 and GLES3 are working fine.

Zoom in to see the difference. Screenshot (160)

Screenshot (161)

EzraT commented 4 years ago

@clayjohn Either re-open or run your scene to reproduce the issue. Changing radiance size also works.

clayjohn commented 4 years ago

@EzraT Oh! That's very helpful then. I bet the filter just isnt getting reset after creating radiance maps.

clayjohn commented 4 years ago

@EzraT Thanks for the extra info. It turned out to be an easy fix. I have submitted a PR :)

EzraT commented 4 years ago

@clayjohn Many thanks for the fix! Happy to help. :]

akien-mga commented 4 years ago

Fixed by #37815.

EzraT commented 3 years ago

@clayjohn @Calinou Could this issue be re-opened? I think this problem has re-surfaced in one of the later versions, I'm getting this same incorrect behavior again in 3.2.3.

Same thing as before, changing the sky's radiance size reverts the texture from unfiltered to filtered, as does running the game or re-opening the scene in the editor.

clayjohn commented 3 years ago

I can reproduce. Fortunately, this issue only affects GLES3 right now which should make the issue easier to track down.

clayjohn commented 3 years ago

@EzraT PR made :)

EzraT commented 3 years ago

Thanks! @clayjohn

akien-mga commented 3 years ago

Further fixed by #43264.