Open gandhars opened 4 years ago
Hello Donovan, thank you for informing me. Is possible to view to patch before it will be officially released ? Radek Hart
st 13. 5. 2020 v 12:22 odesílatel Donovan Hutchence < notifications@github.com> napsal:
1983 https://github.com/playcanvas/engine/issues/1983! :)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/playcanvas/engine/issues/1983#issuecomment-627892975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVT6YEDC7IEY2XEVG3GOY3RRJYHRANCNFSM4MGBQEKA .
Sorry @gandhars... I am busy working on cubemaps and while going through the tickets confused ticket 1983 with 1984 (the book :) ). I'll let you know when the fix is ready (though it probably won't be very soon).
Reopening because #2108 broke the After The Flood project, so I backed it out. @slimbuck - please have another go at a fix. 😄
There seems to still be an issue with this. I observe that both BASIS textures and legacy compressed textures break a cubemap used for skybox.
Here is how it should look:
And here is how it looks after I compress the source files:
If I delete the prefiltered data, and try to prefilter again while the faces are compressed then It results in a black cubemap:
Hi @leonidaspir,
tldr: we flip textures upside-down during compression, this is why cubemaps are wrong.
This is related to the engine's treatment of texture origin. The PC engine follows the OpenGL convention of bottom left texture origin, whereas WebGL chose texture origin to be top left.
This means that we actually flip all (non-cubemap) textures upside-down:
This system works most of the time, but fails for cubemaps (since these faces can't be flipped).
We are planning to address this by adopting the WebGL convention and not flipping assets. Not a small job though since we must also keep support for the existing flipped compressed textures.
In the meantime, you can get compressed cubemaps to work by using your own (non-flipped!) cubemap faces.
Thanks!
When creating a CUBEMAP asset from BASIS compressed textures, the cubemap not created. If I use JPG files, everything works fine. I don't need create prefiltered cubemap, I need use cubemap with custom shader as 'samplerCube' uniform on posteffect.
https://forum.playcanvas.com/t/basis-texture-for-cubemap/12505