diff options
Diffstat (limited to 'data')
| -rw-r--r-- | data/glsl.cfg | 236 |
1 files changed, 118 insertions, 118 deletions
diff --git a/data/glsl.cfg b/data/glsl.cfg index e058ddd..38b19b5 100644 --- a/data/glsl.cfg +++ b/data/glsl.cfg @@ -11,12 +11,12 @@ lmcoordscale = (divf 1 32767) shader 0 "null" [ attribute vec4 vvertex; void main(void) - { + { gl_Position = vvertex; } ] [ void main(void) - { + { gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0); } ] @@ -41,7 +41,7 @@ shader 0 "hud" [ varying vec2 texcoord0; varying vec4 color; void main(void) - { + { gl_Position = hudmatrix * vvertex; texcoord0 = vtexcoord0; color = vcolor; @@ -51,7 +51,7 @@ shader 0 "hud" [ varying vec4 color; uniform sampler2D tex0; void main(void) - { + { gl_FragColor = color * texture2D(tex0, texcoord0); } ] @@ -61,14 +61,14 @@ shader 0 "hudnotexture" [ uniform mat4 hudmatrix; varying vec4 color; void main(void) - { + { gl_Position = hudmatrix * vvertex; color = vcolor; } ] [ varying vec4 color; void main(void) - { + { gl_FragColor = color; } ] @@ -80,7 +80,7 @@ shader 0 "hudrgb" [ varying vec2 texcoord0; varying vec4 color; void main(void) - { + { gl_Position = hudmatrix * vvertex; texcoord0 = vtexcoord0; color = vcolor; @@ -90,7 +90,7 @@ shader 0 "hudrgb" [ varying vec4 color; uniform sampler2D tex0; void main(void) - { + { gl_FragColor.rgb = color.rgb * texture2D(tex0, texcoord0).rgb; gl_FragColor.a = color.a; } @@ -109,7 +109,7 @@ shader 0 "texture" [ varying vec2 texcoord0; varying vec4 color; void main(void) - { + { gl_Position = camprojmatrix * vvertex; texcoord0 = vtexcoord0; color = vcolor; @@ -119,7 +119,7 @@ shader 0 "texture" [ varying vec4 color; uniform sampler2D tex0; void main(void) - { + { gl_FragColor = color * texture2D(tex0, texcoord0); } ] @@ -129,14 +129,14 @@ shader 0 "notexture" [ uniform mat4 camprojmatrix; varying vec4 color; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; } ] [ varying vec4 color; void main(void) - { + { gl_FragColor = color; } ] @@ -147,7 +147,7 @@ shader 0 "cubemap" [ varying vec3 texcoord0; varying vec4 color; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0; color = vcolor; @@ -157,7 +157,7 @@ shader 0 "cubemap" [ varying vec4 color; uniform samplerCube tex0; void main(void) - { + { gl_FragColor = color * textureCube(tex0, texcoord0); } ] @@ -176,7 +176,7 @@ shader 0 "fogged" [ varying vec2 texcoord0; varying vec4 color; void main(void) - { + { gl_Position = camprojmatrix * vvertex; texcoord0 = vtexcoord0; color = vcolor; @@ -186,7 +186,7 @@ shader 0 "fogged" [ varying vec4 color; uniform sampler2D tex0; void main(void) - { + { gl_FragColor = color * texture2D(tex0, texcoord0); } ] @@ -197,14 +197,14 @@ shader 0 "foggednotexture" [ uniform mat4 camprojmatrix; varying vec4 color; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; } ] [ varying vec4 color; void main(void) - { + { gl_FragColor = color; } ] @@ -213,14 +213,14 @@ shader 0 "fogoverlay" [ attribute vec4 vvertex, vcolor; varying vec4 color; void main(void) - { + { gl_Position = vvertex; color = vcolor; } ] [ varying vec4 color; void main(void) - { + { gl_FragColor = color; } ] @@ -268,7 +268,7 @@ worldshader = [ uniform vec2 texgenscroll; varying vec2 texcoord0, texcoord1; void main(void) - { + { gl_Position = camprojmatrix * vvertex; texcoord0 = vtexcoord0 + texgenscroll; texcoord1 = vtexcoord1 * @lmcoordscale; @@ -285,7 +285,7 @@ worldshader = [ varying vec2 texcoord0, texcoord1; uniform sampler2D diffusemap, lightmap; void main(void) - { + { @(? (>= (strstr $arg1 "alpha") 0) [ vec4 diffuse = texture2D(diffusemap, texcoord0); diffuse.rgb *= diffuse.a; @@ -317,7 +317,7 @@ glareworldshader = [ uniform vec2 texgenscroll; varying vec2 texcoord0, texcoord1; void main(void) - { + { gl_Position = camprojmatrix * vvertex; texcoord0 = vtexcoord0 + texgenscroll; texcoord1 = vtexcoord1 * @lmcoordscale; @@ -330,7 +330,7 @@ glareworldshader = [ uniform vec4 colorparams; varying vec2 texcoord0, texcoord1; void main(void) - { + { @arg3 } ] @@ -418,13 +418,13 @@ shader 0 "fogworld" [ attribute vec4 vvertex; uniform mat4 camprojmatrix; void main(void) - { + { gl_Position = camprojmatrix * vvertex; } ] [ uniform vec3 fogcolor; void main(void) - { + { gl_FragColor = vec4(fogcolor, 1.0); } ] @@ -433,12 +433,12 @@ shader 0 "noglareworld" [ attribute vec4 vvertex; uniform mat4 camprojmatrix; void main(void) - { + { gl_Position = camprojmatrix * vvertex; } ] [ void main(void) - { + { gl_FragColor = vec4(0.0); } ] @@ -449,7 +449,7 @@ shader 0 "noglareblendworld" [ uniform mat4 camprojmatrix; varying vec2 texcoord0; void main(void) - { + { gl_Position = camprojmatrix * vvertex; texcoord0 = vtexcoord1 * @lmcoordscale; } @@ -457,7 +457,7 @@ shader 0 "noglareblendworld" [ varying vec2 texcoord0; uniform sampler2D lightmap; void main(void) - { + { gl_FragColor.rgb = vec3(0.0); gl_FragColor.a = texture2D(lightmap, texcoord0).a; } @@ -467,14 +467,14 @@ shader 0 "noglarealphaworld" [ attribute vec4 vvertex; uniform mat4 camprojmatrix; void main(void) - { + { gl_Position = camprojmatrix * vvertex; } ] [ uniform vec4 colorparams; uniform sampler2D lightmap; void main(void) - { + { gl_FragColor.rgb = vec3(0.0); gl_FragColor.a = colorparams.a; } @@ -519,14 +519,14 @@ shader 0 "depthfxworld" [ uniform vec4 depthscale, depthoffsets; varying vec4 depthranges; void main(void) - { + { gl_Position = camprojmatrix * vvertex; depthranges = depthoffsets + gl_Position.w*depthscale; } ] [ varying vec4 depthranges; void main(void) - { + { gl_FragColor = depthranges; } ] @@ -537,14 +537,14 @@ shader 0 depthfxsplitworld [ uniform vec4 depthscale, depthoffsets; varying vec4 depthranges; void main(void) - { + { gl_Position = camprojmatrix * vvertex; depthranges = depthoffsets + gl_Position.w*depthscale; } ] [ varying vec4 depthranges; void main(void) - { + { vec4 ranges = vec4(depthranges.x, fract(depthranges.yzw)); ranges.xy -= ranges.yz*vec2(0.00390625, 0.00390625); gl_FragColor = ranges; @@ -608,7 +608,7 @@ bumpvariantshader = [ @(if (btopt "G") [result [uniform float millis; varying float pulse;]]) @(if (btopt "r") [result [varying mat3 world;]]) void main(void) - { + { gl_Position = camprojmatrix * vvertex; texcoord0 = vtexcoord0 + texgenscroll; texcoord1 = vtexcoord1 * @lmcoordscale; @@ -652,7 +652,7 @@ bumpvariantshader = [ @(if (btopt "r") [result [uniform samplerCube envmap; varying mat3 world;]]) @(if (|| (! (btopt "i")) (btopt "s")) [result [uniform vec4 ambient;]]) void main(void) - { + { @(if (|| (! (btopt "i")) (btopt "s")) [result [ vec4 lmc = texture2D(lmcolor, texcoord1); gl_FragColor.a = colorparams.a * lmc.a; @@ -1011,7 +1011,7 @@ shadowmapcastervertexshader = [ uniform vec4 shadowintensity; varying vec4 shadowmapvals; void main(void) - { + { @(if (>= $numargs 2) [result $arg2] [result [ #define mpos vvertex ]]) @@ -1024,7 +1024,7 @@ shadowmapcastervertexshader = [ shader 0 shadowmapcaster (shadowmapcastervertexshader) [ varying vec4 shadowmapvals; void main(void) - { + { gl_FragColor = shadowmapvals; } ] @@ -1038,14 +1038,14 @@ shader 0 "shadowmapreceiver" [ uniform vec2 shadowmapbias; varying vec4 shadowmapvals; void main(void) - { + { gl_Position = shadowmatrix * vvertex; shadowmapvals = vec4(0.0, 0.0, shadowmapbias.y - gl_Position.z, 0.0); } ] [ varying vec4 shadowmapvals; void main(void) - { + { gl_FragColor = shadowmapvals; } ] @@ -1060,7 +1060,7 @@ notexturemodelvertexshader = [ @(if (>= $numargs 2) [result $arg1]) //:fog void main(void) - { + { @(if (>= $numargs 2) [result $arg2] [result [ #define mpos vvertex ]]) @@ -1073,7 +1073,7 @@ notexturemodelvertexshader = [ shader 0 notexturemodel (notexturemodelvertexshader) [ varying vec4 color; void main(void) - { + { gl_FragColor = color; } ] @@ -1130,7 +1130,7 @@ modelvertexshader = [ ]]) ]]) void main(void) - { + { @(if (mdlopt "b") [result [ @(skelanim $arg2 (mdlopt "q") (mdlopt "n")) ]] [result [ @@ -1223,7 +1223,7 @@ modelfragmentshader = [ @(if (mdlopt "n") [result [uniform sampler2D tex3;]]) @(? (mdlopt "a") [uniform float alphatest;]) void main(void) - { + { vec4 light = texture2D(tex0, texcoord0); @(? (mdlopt "a") [ @@ -1352,7 +1352,7 @@ blurshader = [ varying vec2 texcoordp@(+ $i 2), texcoordn@(+ $i 2); ]]) void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0; vec2 tcp = vtexcoord0, tcn = vtexcoord0; @@ -1376,7 +1376,7 @@ blurshader = [ ]]) uniform sampler2D tex0; void main(void) - { + { #define texval(coords) texture2D(tex0, (coords)) vec4 val = texval(texcoord0) * weights[0]; @(loopconcat i $arg2 [ @@ -1420,7 +1420,7 @@ fsvs = [result [ varying vec2 texcoord0; @arg2 void main(void) - { + { gl_Position = vvertex; // woohoo, no mvp :) texcoord0 = vtexcoord0; @arg1 @@ -1432,7 +1432,7 @@ fsps = [result [ varying vec2 texcoord0; @arg2 void main(void) - { + { vec4 color = texture2D(tex0, texcoord0); @arg1 } @@ -1485,7 +1485,7 @@ lazyshader 0 "rotoscope" [ uniform vec4 params; varying vec2 t11, t00, t12, t01, t20, t02, t21, t10, t22; void main(void) - { + { gl_Position = vvertex; t11 = vtexcoord0; vec2 scale = postfxscale*params.x; @@ -1502,7 +1502,7 @@ lazyshader 0 "rotoscope" [ uniform sampler2D tex0; varying vec2 t11, t00, t12, t01, t20, t02, t21, t10, t22; void main(void) - { + { vec4 c00 = texture2D(tex0, t00); vec4 c01 = texture2D(tex0, t01); vec4 c02 = texture2D(tex0, t02); @@ -1539,7 +1539,7 @@ blur3shader = [ uniform vec2 postfxscale; varying vec2 texcoord0, texcoord1; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0 + vec2(@(if $arg2 -0.5 0.0), @(if $arg3 -0.5 0.0))*postfxscale; texcoord1 = vtexcoord0 + vec2(@(if $arg2 0.5 0.0), @(if $arg3 0.5 0.0))*postfxscale; @@ -1548,7 +1548,7 @@ blur3shader = [ varying vec2 texcoord0, texcoord1; uniform sampler2D tex0; void main(void) - { + { gl_FragColor = 0.5*(texture2D(tex0, texcoord0) + texture2D(tex0, texcoord1)); } ] @@ -1563,7 +1563,7 @@ blur5shader = [ uniform vec2 postfxscale; varying vec2 texcoord0, texcoord1, texcoord2; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0; texcoord1 = vtexcoord0 + vec2(@(? $arg2 -1.333 0.0), @(? $arg3 -1.333 0.0))*postfxscale; @@ -1573,7 +1573,7 @@ blur5shader = [ uniform sampler2D tex0; varying vec2 texcoord0, texcoord1, texcoord2; void main(void) - { + { gl_FragColor = 0.4*texture2D(tex0, texcoord0) + 0.3*(texture2D(tex0, texcoord1) + texture2D(tex0, texcoord2)); } ] @@ -1596,7 +1596,7 @@ shader 0 "screenrect" [ varying vec2 texcoord0; varying vec4 color; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0; color = vcolor; @@ -1606,7 +1606,7 @@ shader 0 "screenrect" [ varying vec4 color; uniform sampler2D tex0; void main(void) - { + { gl_FragColor = color * texture2D(tex0, texcoord0); } ] @@ -1631,7 +1631,7 @@ bloomshader = [ @(screentexcoord 0) varying vec2 texcoord0; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0; } @@ -1640,7 +1640,7 @@ bloomshader = [ varying vec2 texcoord0; uniform sampler2D tex0 @@(loopconcat i $arg2 [result [, tex@(+ $i 1)]]); void main(void) - { + { vec4 sample = texture2D(tex0, texcoord0); @@(loopconcat i $arg2 [result [ @(? $i "bloom +=" "vec4 bloom =") texture2D(tex@(+ $i 1), texcoord0); @@ -1694,7 +1694,7 @@ explosionshader = [ varying vec2 texcoord0, texcoord1, texcoord2; @(if (>= (strstr $arg1 "soft") 0) [result [uniform vec4 depthfxparams; varying vec4 texcoord3; ]]) void main(void) - { + { vec4 wobble = vec4(vvertex.xyz*(1.0 + 0.5*abs(fract(dot(vvertex.xyz, center) + millis*2.0) - 0.5)), vvertex.w); @(if (>= (strstr $arg1 "soft") 0) [result [ gl_Position = explosionmatrix * wobble; @@ -1722,7 +1722,7 @@ explosionshader = [ @(if (>= (strstr $arg1 "soft") 0) [result [uniform vec4 depthfxparams; varying vec4 texcoord3; ]]) @(if (>= (strstr $arg1 "soft8") 0) [result [uniform vec4 depthfxselect;]]) void main(void) - { + { vec2 dtc = texcoord0 + texture2D(tex0, texcoord2).xy*0.1; // use color texture as noise to distort texcoords vec4 diffuse = texture2D(tex0, dtc); float blend = max(pow(clamp(1.0 - dot(texcoord1, texcoord1), 0.0, 1.0), blendparams.x), blendparams.y); @@ -1764,14 +1764,14 @@ shader 0 "particlenotexture" [ uniform vec4 colorscale; varying vec4 color; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor * colorscale; } ] [ varying vec4 color; void main(void) - { + { gl_FragColor = color; } ] @@ -1787,7 +1787,7 @@ particleshader = [ varying vec4 color; @(if (>= (strstr $arg1 "soft") 0) [result [uniform vec4 depthfxparams; varying vec3 texcoord1, surface; ]]) void main(void) - { + { gl_Position = camprojmatrix * vvertex; texcoord0 = vtexcoord0; color = vcolor * colorscale; @@ -1809,7 +1809,7 @@ particleshader = [ @(if (>= (strstr $arg1 "soft") 0) [result [uniform vec4 depthfxparams; varying vec3 texcoord1, surface;]]) @(if (>= (strstr $arg1 "soft8") 0) [result [uniform vec4 depthfxselect;]]) void main(void) - { + { vec4 diffuse = texture2D(tex0, texcoord0); @(if (>= (strstr $arg1 "soft") 0) [result [ @@ -1838,7 +1838,7 @@ shader 0 "blendbrush" [ varying vec4 color; varying vec2 texcoord0; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; texcoord0 = vec2(dot(texgenS, vvertex), dot(texgenT, vvertex)); @@ -1848,7 +1848,7 @@ shader 0 "blendbrush" [ varying vec2 texcoord0; uniform sampler2D tex0; void main(void) - { + { gl_FragColor = texture2D(tex0, texcoord0).r * color; } ] @@ -1861,7 +1861,7 @@ lazyshader 0 "prefab" [ varying vec4 color; void main(void) - { + { gl_Position = prefabmatrix * vvertex; color = vcolor; color.rgb *= dot(prefabworld * vnormal, vec3(0.0, -0.447213595, 0.894427191)); @@ -1869,7 +1869,7 @@ lazyshader 0 "prefab" [ ] [ varying vec4 color; void main(void) - { + { gl_FragColor = color; } ] @@ -1879,7 +1879,7 @@ lazyshader 0 "moviergb" [ @(screentexcoord 0) varying vec2 texcoord0; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0; } @@ -1887,7 +1887,7 @@ lazyshader 0 "moviergb" [ varying vec2 texcoord0; uniform sampler2D tex0; void main(void) - { + { gl_FragColor = texture2D(tex0, texcoord0); } ] @@ -1897,7 +1897,7 @@ lazyshader 0 "movieyuv" [ @(screentexcoord 0) varying vec2 texcoord0; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0; } @@ -1905,7 +1905,7 @@ lazyshader 0 "movieyuv" [ varying vec2 texcoord0; uniform sampler2D tex0; void main(void) - { + { vec3 sample = texture2D(tex0, texcoord0).rgb; gl_FragColor = vec4(dot(sample, vec3(0.439216, -0.367788, -0.071427)) + 0.501961, dot(sample, vec3(-0.148224, -0.290992, 0.439216)) + 0.501961, @@ -1920,7 +1920,7 @@ lazyshader 0 "moviey" [ uniform vec2 moviescale; varying vec2 texcoord0, texcoord1, texcoord2, texcoord3; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0 + vec2(-1.5, 0.0)*moviescale; texcoord1 = vtexcoord0 + vec2(-0.5, 0.0)*moviescale; @@ -1931,7 +1931,7 @@ lazyshader 0 "moviey" [ varying vec2 texcoord0, texcoord1, texcoord2, texcoord3; uniform sampler2D tex0; void main(void) - { + { vec3 sample1 = texture2D(tex0, texcoord0).rgb; vec3 sample2 = texture2D(tex0, texcoord1).rgb; vec3 sample3 = texture2D(tex0, texcoord2).rgb; @@ -1949,7 +1949,7 @@ lazyshader 0 "movieu" [ uniform vec2 moviescale; varying vec2 texcoord0, texcoord1, texcoord2, texcoord3; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0 + vec2(-3.0, 0.0)*moviescale; texcoord1 = vtexcoord0 + vec2(-1.0, 0.0)*moviescale; @@ -1960,7 +1960,7 @@ lazyshader 0 "movieu" [ varying vec2 texcoord0, texcoord1, texcoord2, texcoord3; uniform sampler2D tex0; void main(void) - { + { vec3 sample1 = texture2D(tex0, texcoord0).rgb; vec3 sample2 = texture2D(tex0, texcoord1).rgb; vec3 sample3 = texture2D(tex0, texcoord2).rgb; @@ -1978,7 +1978,7 @@ lazyshader 0 "moviev" [ uniform vec2 moviescale; varying vec2 texcoord0, texcoord1, texcoord2, texcoord3; void main(void) - { + { gl_Position = vvertex; texcoord0 = vtexcoord0 + vec2(-3.0, 0.0)*moviescale; texcoord1 = vtexcoord0 + vec2(-1.0, 0.0)*moviescale; @@ -1989,7 +1989,7 @@ lazyshader 0 "moviev" [ varying vec2 texcoord0, texcoord1, texcoord2, texcoord3; uniform sampler2D tex0; void main(void) - { + { vec3 sample1 = texture2D(tex0, texcoord0).rgb; vec3 sample2 = texture2D(tex0, texcoord1).rgb; vec3 sample3 = texture2D(tex0, texcoord2).rgb; @@ -2025,7 +2025,7 @@ watershader = [ varying vec4 texcoord0; varying vec2 texcoord1, texcoord2; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; texcoord0 = watermatrix * vvertex; @@ -2060,7 +2060,7 @@ watershader = [ ]]) uniform sampler2D tex1, tex2, tex3; void main(void) - { + { vec3 camvec = normalize(camdir); @(if $specular [result [ vec3 lightvec = normalize(lightdir); @@ -2091,12 +2091,12 @@ lazyshader 0 "waterglarefast" [ attribute vec4 vvertex; uniform mat4 camprojmatrix; void main(void) - { + { gl_Position = camprojmatrix * vvertex; } ] [ void main(void) - { + { gl_FragColor = vec4(0.0); } ] @@ -2109,7 +2109,7 @@ lazyshader 0 "underwater" [ uniform mat4 camprojmatrix; varying vec3 color; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; } @@ -2118,7 +2118,7 @@ lazyshader 0 "underwater" [ uniform vec2 depth; varying vec3 color; void main(void) - { + { gl_FragColor.rgb = 0.8*depth.x*color; gl_FragColor.a = 0.5*depth.y; } @@ -2313,7 +2313,7 @@ causticshader = [ uniform vec3 texgenS, texgenT; varying vec2 texcoord0; void main(void) - { + { gl_Position = camprojmatrix * vvertex; texcoord0 = vec2(dot(texgenS, vvertex.xyz), dot(texgenT, vvertex.xyz)); } @@ -2323,7 +2323,7 @@ causticshader = [ varying vec2 texcoord0; uniform sampler2D tex0, tex1; void main(void) - { + { @arg2 } ] @@ -2341,7 +2341,7 @@ lazyshader 0 "lava" [ uniform vec4 lavatexgen; varying vec2 texcoord0; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; vec2 tc = mix(vvertex.xz, vvertex.yy, abs(vnormal.xz)); @@ -2352,7 +2352,7 @@ lazyshader 0 "lava" [ varying vec4 color; varying vec2 texcoord0; void main(void) - { + { gl_FragColor = color * texture2D(tex0, texcoord0) * 2.0; } ] @@ -2366,7 +2366,7 @@ lazyshader 0 "lavaglare" [ uniform vec4 lavatexgen; varying vec2 texcoord0; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vec4(vcolor.rgb*2.0 - 1.0, vcolor.a); vec2 tc = mix(vvertex.xz, vvertex.yy, abs(vnormal.xz)); @@ -2377,7 +2377,7 @@ lazyshader 0 "lavaglare" [ varying vec4 color; varying vec2 texcoord0; void main(void) - { + { vec4 glow = texture2D(tex0, texcoord0) * color; float k = max(glow.r, max(glow.g, glow.b)); gl_FragColor = glow*k*k*32.0; @@ -2393,7 +2393,7 @@ lazyshader 0 "waterfall" [ uniform vec4 waterfalltexgen; varying vec2 texcoord0; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; vec2 tc = mix(vvertex.xz, vvertex.yy, abs(vnormal.xz)); @@ -2404,7 +2404,7 @@ lazyshader 0 "waterfall" [ varying vec4 color; varying vec2 texcoord0; void main(void) - { + { gl_FragColor = color * texture2D(tex0, texcoord0); } ] @@ -2420,7 +2420,7 @@ lazyshader 0 "waterfallrefract" [ varying vec2 texcoord0; varying vec4 texcoord1; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; vec2 tc = mix(vvertex.xz, vvertex.yy, abs(vnormal.xz)); @@ -2434,7 +2434,7 @@ lazyshader 0 "waterfallrefract" [ varying vec2 texcoord0; varying vec4 texcoord1; void main(void) - { + { vec4 diffuse = texture2D(tex0, texcoord0); vec2 dudv = texture2D(tex2, texcoord0 + 0.2*diffuse.xy + dudvoffset).xy; vec4 refract = texture2DProj(tex4, texcoord1 + vec4(4.0*dudv, 0.0, 0.0)); @@ -2456,7 +2456,7 @@ lazyshader 0 "waterfallenvrefract" [ varying vec3 camdir; varying mat3 world; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; camdir = camera - vvertex.xyz; @@ -2476,7 +2476,7 @@ lazyshader 0 "waterfallenvrefract" [ varying vec3 camdir; varying mat3 world; void main(void) - { + { vec4 diffuse = texture2D(tex0, texcoord0); vec2 dudv = texture2D(tex2, texcoord0 + 0.2*diffuse.xy + dudvoffset).xy; vec3 normal = world * (texture2D(tex1, texcoord0 + 0.1*dudv).rgb*2.0 - 1.0); @@ -2500,7 +2500,7 @@ lazyshader 0 "waterfallenv" [ varying vec3 color, camdir; varying mat3 world; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; camdir = camera - vvertex.xyz; @@ -2517,7 +2517,7 @@ lazyshader 0 "waterfallenv" [ varying vec3 color, camdir; varying mat3 world; void main(void) - { + { vec4 diffuse = texture2D(tex0, texcoord0); vec2 dudv = texture2D(tex2, texcoord0 + 0.2*diffuse.xy + dudvoffset).xy; vec3 normal = world * (texture2D(tex1, texcoord0 + 0.1*dudv).rgb*2.0 - 1.0); @@ -2535,7 +2535,7 @@ lazyshader 0 "glass" [ uniform vec3 camera; varying vec3 color, rvec, camdir, normal; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; normal = vnormal; @@ -2547,7 +2547,7 @@ lazyshader 0 "glass" [ uniform samplerCube tex0; varying vec3 color, rvec, camdir, normal; void main(void) - { + { vec3 camvec = normalize(camdir); vec3 reflect = textureCube(tex0, rvec).rgb; @@ -2563,7 +2563,7 @@ lazyshader 0 "glassfast" [ uniform vec3 camera; varying vec3 color, rvec; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; vec3 camdir = camera - vvertex.xyz; @@ -2574,7 +2574,7 @@ lazyshader 0 "glassfast" [ uniform samplerCube tex0; varying vec3 color, rvec; void main(void) - { + { vec3 reflect = textureCube(tex0, rvec).rgb; const float invfresnel = 0.75; gl_FragColor.rgb = mix(reflect, color*0.05, invfresnel); @@ -2595,7 +2595,7 @@ lazyshader 0 "grass" [ varying vec2 texcoord0, texcoord1; varying vec2 bounds; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; texcoord0 = vtexcoord0; @@ -2610,7 +2610,7 @@ lazyshader 0 "grass" [ varying vec2 bounds; uniform sampler2D tex0, tex1; void main(void) - { + { vec4 diffuse = texture2D(tex0, texcoord0); diffuse.rgb *= 2.0; vec4 lm = texture2D(tex1, texcoord1) * color; @@ -2627,7 +2627,7 @@ shader 0 "overbrightdecal" [ varying vec4 color; varying vec2 texcoord0; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; texcoord0 = vtexcoord0; @@ -2638,7 +2638,7 @@ shader 0 "overbrightdecal" [ varying vec2 texcoord0; uniform sampler2D tex0; void main(void) - { + { vec4 diffuse = texture2D(tex0, texcoord0); gl_FragColor = mix(color, diffuse, color.a); } @@ -2652,7 +2652,7 @@ shader 0 "saturatedecal" [ varying vec4 color; varying vec2 texcoord0; void main(void) - { + { gl_Position = camprojmatrix * vvertex; color = vcolor; texcoord0 = vtexcoord0; @@ -2662,7 +2662,7 @@ shader 0 "saturatedecal" [ varying vec2 texcoord0; uniform sampler2D tex0; void main(void) - { + { vec4 diffuse = texture2D(tex0, texcoord0); diffuse.rgb *= 2.0; gl_FragColor = diffuse * color; @@ -2676,7 +2676,7 @@ shader 0 "skybox" [ varying vec2 texcoord0; varying vec4 color; void main(void) - { + { gl_Position = skymatrix * vvertex; texcoord0 = vtexcoord0; color = vcolor; @@ -2686,7 +2686,7 @@ shader 0 "skybox" [ varying vec4 color; uniform sampler2D tex0; void main(void) - { + { gl_FragColor = color * texture2D(tex0, texcoord0); } ] @@ -2698,7 +2698,7 @@ shader 0 "skyboxglare" [ varying vec4 color; varying vec2 texcoord0; void main(void) - { + { gl_Position = skymatrix * vvertex; color = vcolor; texcoord0 = vtexcoord0; @@ -2708,7 +2708,7 @@ shader 0 "skyboxglare" [ varying vec2 texcoord0; uniform sampler2D tex0; void main(void) - { + { vec4 glare = texture2D(tex0, texcoord0) * color; gl_FragColor.rgb = vec3(dot(glare.rgb, vec3(10.56, 10.88, 10.56)) - 30.4); gl_FragColor.a = glare.a; @@ -2720,14 +2720,14 @@ shader 0 "skyfog" [ uniform mat4 skymatrix; varying vec4 color; void main(void) - { + { gl_Position = skymatrix * vvertex; color = vcolor; } ] [ varying vec4 color; void main(void) - { + { gl_FragColor = color; } ] @@ -2738,7 +2738,7 @@ loop i 2 [ uniform mat4 skymatrix; varying vec3 camvec; void main(void) - { + { gl_Position = skymatrix * vvertex; camvec = vvertex.xyz; @@ -2755,7 +2755,7 @@ loop i 2 [ varying vec3 camvec; void main(void) - { + { vec3 camdir = normalize(camvec); float costheta = dot(camdir, sundir); |
