Closed scarletsky closed 2 years ago
I fixed it.
Oh, I didn't notice these codes are in this repository. 🥲
Would you mind I update the DEMO page and submit here ? Changes are here: https://github.com/scarletsky/EffekseerForWebGL/commit/73f1f76475e62f718f1530576aef3bba780e771f
Would you mind I update the DEMO page and submit here ? Changes are here: scarletsky@73f1f76
- Add orbit control
- Add scale input
- Add a texture to simulate flipY
It seems you don't need these changes, I should close this issue now.
Introduction
I create a simple demo, please open the page below, and then play the
MagicArea
effecthttps://scarletsky.github.io/EffekseerForWebGL/Sample/index.html?flipy=1 https://scarletsky.github.io/EffekseerForWebGL/Sample/index.html?flipy=0
Here are the screenshots: flipy=1:
flipy=0:
Reason
Because we draw the main scene first, and it called
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true)
. And in effekseer context, it callgl.texImage2D
for the rest textures, so the textures in effect are flipped y unexpectly.Solution
Make sure to set
gl.UNPACK_FLIP_Y_WEBGL
tofalse
before callinggl.texImage2D
.It seems these codes are generated from the main cpp repository by emcc, you may need to update the main cpp repository ?