ikaruga Posted May 29, 2022 Share Posted May 29, 2022 I'm porting over this shadertoy shader: https://www.shadertoy.com/view/XslGRr As you can see in `iChannel0`, in order to work correctly, the texture must have "VFlip" enabled. However, I do not see this option in PixiJS, nor can I find what it does. Quote Link to comment Share on other sites More sharing options...
ikaruga Posted May 29, 2022 Author Share Posted May 29, 2022 Looks like in webgl 1.0, it's equivalent to this: https://github.com/stevensona/shader-toy/issues/126 However, I'm using webgl 2.0... don't see that function. As per this:https://forums.raspberrypi.com/viewtopic.php?t=62077, it's just 1.0 - p.y (where p is the loaded texture). This *seems* to do the trick... (although, still not able to repo the same effect) Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 30, 2022 Share Posted May 30, 2022 pixi doesnt have VFlip, but there's a way to directly upload textures in pixi through texture resources, like here: https://pixijs.io/examples/#/textures/gradient-resource.js you can extend ImageResource or CanvasResource class , then in `upload` swap VFlag of webgl, call parent upload, then swap it back. Quote Link to comment Share on other sites More sharing options...
ikaruga Posted June 2, 2022 Author Share Posted June 2, 2022 On 5/30/2022 at 1:05 AM, ivan.popelyshev said: pixi doesnt have VFlip, but there's a way to directly upload textures in pixi through texture resources, like here: https://pixijs.io/examples/#/textures/gradient-resource.js you can extend ImageResource or CanvasResource class , then in `upload` swap VFlag of webgl, call parent upload, then swap it back. Sorry what? Do you mind sharing a snippet, even pseudo code? Thanks! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 3, 2022 Share Posted June 3, 2022 Maybe if I have time this week, its 10-15 minutes challange. Quote Link to comment Share on other sites More sharing options...
ikaruga Posted June 18, 2022 Author Share Posted June 18, 2022 On 6/3/2022 at 3:31 AM, ivan.popelyshev said: Maybe if I have time this week, its 10-15 minutes challange. Any progress? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 21, 2022 Share Posted June 21, 2022 Nope, still very busy. You can try getting help at pixijs discord 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.