mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
[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:
parent
ea3ff47cc5
commit
a07eccd5c7
3 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue