Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3981

Invert Y Axis in shader

$
0
0

Hi !

I've been playing with shaders and I wanted to know if there was a simple and efficient way to invert the y-axis (to make it similar to what I'm used to), it would greatly simplify the way I interact with the shader (via uniforms).

I've previously been using Filter and the conversion function below was doing it.

vTextureCoord * inputSize.xy + outputFrame.xy // screen pixel(css) coord

 

Maybe there is a way to replicate this in a Mesh + Shader ?

Here you will find a simple example of this with the mouse (which become inverted) https://www.pixiplayground.com/#/edit/Xpz6WneKhHV4mozWaKv_n

 

Thanks a lot !


Viewing all articles
Browse latest Browse all 3981

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>