Xrysnow / LuaSTG-x

LuaSTG-x is a multi-platform game engine.
MIT License
86 stars 17 forks source link

[RENDERING BUG] Additional texture uniforms getting the wrong texture #5

Open zinoLath opened 2 years ago

zinoLath commented 2 years ago

The additional texture uniforms (those added by res:setTexture) are notably reading the wrong texture. When I tried to add a secondary texture to a render mode or ResFX (PostEffect included), it appeared to read the last texture used instead of the sent one. I also tried to send a texture uniform through ccb.ProgramState:setTexture, and it behaved the exact same way, even when changing the slot. Here we can see the shader is using the player's option's image: (the option is on LAYER_PLAYER, while the images using the shader are on LAYER_ENEMY_BULLET) LuaSTG-x_1Tpnrf2Hk1 And when an item appears (such as when the player dies), it changes the texture that's being rendered: (it's on LAYER_ITEM) ApplicationFrameHost_0iGu1ZXrJr

Demonese commented 2 years ago

10

Xrysnow commented 2 years ago

10 is merged, you can build the engine to see if this problem is solved.