[glsl] Fix some GLSL conformance issues

I'm not sure when things broke on my laptop (I thought I got warp and
fisheye working on my laptop), but it turns out things weren't quite
right, thus warp (and presumably fisheye) weren't working properly due
to GLSL errors that I only just noticed. This fixes water warp (and
probably fisheye).
This commit is contained in:
Bill Currie 2022-11-03 16:42:49 +09:00
parent ea3ff47cc5
commit a07eccd5c7
3 changed files with 9 additions and 3 deletions

View file

@ -53,12 +53,14 @@
static const char *fisheye_vert_effects[] =
{
"QuakeForge.version.130",
"QuakeForge.Vertex.fstri",
0
};
static const char *fisheye_frag_effects[] =
{
"QuakeForge.version.130",
"QuakeForge.Math.const",
"QuakeForge.Fragment.screen.fisheye",
0

View file

@ -53,12 +53,14 @@
static const char *warp_vert_effects[] =
{
"QuakeForge.version.130",
"QuakeForge.Vertex.fstri",
0
};
static const char *warp_frag_effects[] =
{
"QuakeForge.version.130",
"QuakeForge.Math.const",
"QuakeForge.Fragment.screen.warp",
0

View file

@ -552,8 +552,9 @@ main (void)
gl_FragColor = fogBlend (col);
}
-- Vertex.fstri
-- version.130
#version 130
-- Vertex.fstri
out vec2 uv;
@ -582,8 +583,9 @@ const vec2 B = vec2 (1, 1);
void
main ()
{
uv = uv * (1.0 - 2.0*A) + A * (B + sin ((time * S + F * uv.yx) * 2.0*PI));
vec4 c = texture2D (screenTex, uv);
vec2 st;
st = uv * (1.0 - 2.0*A) + A * (B + sin ((time * S + F * uv.yx) * 2.0*PI));
vec4 c = texture2D (screenTex, st);
gl_FragColor = c;//vec4(uv, c.x, 1);
}