Everything posted by jawaka
Hello. I want to transition between two textures on a sprite. My approach so far is this: The sprite has "texture1". When the sprite is clicked I apply a filter to it. This filter takes "texture2" as uniform and performs the transition between the two textures. When the transition is completed, I remove the filter and switch the texture of the sprite to "texture2". When the switch happens, the new texture has a small offset compared to the image drawed from the filter. I have created a simple example: https://www.pixiplayground.com/#/edit/KozVneSNjCuVZKi_fgNJa Maybe I should apply the filter always and add a uniform to make it perform the transition or just draw the texture? Thanks in advance!!!
Nevermind. I forgot to normalize the coordinates of the texture sent as uniform (vTextureCoord * inputPixel.xy / outputFrame.zw). Everything is peachy now
Hello. I'm trying to make a filter to transition between the current texture of a Sprite and a new one. I've put together a barebones example here: https://www.pixiplayground.com/#/edit/KozVneSNjCuVZKi_fgNJa When you click on the blue sprite, a filter is applied. Currently, this filter takes a new texture as uniform and uses it to sample the fragment color (I have removed all the blending code to make it clearer). And it seems as this texture is being upscaled? Both textures have the same size. As a reference, I have added a second sprite with the new texture being applied. Thanx in advance!!!