Jump to content

enable texture VFlip?


ikaruga
 Share

Recommended Posts

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 3 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...