jojoba Posted November 7, 2022 Share Posted November 7, 2022 Greetings! I've been porting this shadertoy shader to pixi js. It's compiling and running well. However, there seems to be a weird artifact in the rendered background and I'm guessing it's related to my poor knowledge of how pixi passes texture coordinates to the shader. In my codepen here you can see my latest attempt. The background image as seen here, renders as vertical strips in the pixi filter. It appears as if the top row of pixels of the image is repeated vertically?? I feel like it's something simple that I'm overlooking but wonder if anyone might have any insight as to why the striping is happening? Thank you to all the pixi / shader wizards here who might be able to please shed light on this. Cheers! ps -> i'm running pixi 6.5.8 Quote Link to comment Share on other sites More sharing options...
Exca Posted November 9, 2022 Share Posted November 9, 2022 In line 56 you are flipping the y-coordinate which causes the texture to read from negative y-value and I'd assume your basetexture has wrapMode set to clamp so it reads the pixels from the edge. Remove the - sign from that line and it should work. jojoba 1 Quote Link to comment Share on other sites More sharing options...
jojoba Posted November 9, 2022 Author Share Posted November 9, 2022 Exca, you are my new hero, that was exactly it. Wow, absolutely incredible. Thank you so much!!! I've gone ahead and updated the codepen to reflect this change, so that future viewers will see a functional version. You just made my day!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.