First of all, I'm using this library for post-processing in LibGDX: https://github.com/manuelbua/libgdx-contribs
I added a new custom Effect to it by extending Filter and PostProcessorEffect.
It's a ripple shader, I used this one: https://github.com/julienvillegas/libgdx.info-Shader-Shockwave/blob/master/android/assets/shaders/fragment.glsl
My game is a quite simple board game consisting of one little board and some UI elements around it, consisting of nothing but Stage and Actors.
I use ExtendViewport as the Viewport for the Stage, and set its world size to the size of the board and some extra for the UI elements that are around it, this has worked perfectly so far.
Now for the actual issue, the ripple shader spawns a circular wave - but if my world width is larger than height, it becomes ellipse instead. Only if my world width & height are equal, the ripple is a perfect circle.
How can I fix this?
EDIT: So what I need is to take aspect ratio into account, but I don't know how to do that.
Here's my vertex shader (it's from the post-processing library):
#ifdef GL_ES
#define PRECISION mediump
precision PRECISION float;
#else
#define PRECISION
#endif
attribute vec4 a_position;
attribute vec2 a_texCoord0;
varying vec2 v_texCoords;
void main()
{
v_texCoords = a_texCoord0;
gl_Position = a_position;
}