shader 0 "null" [ attribute vec4 vvertex; void main(void) { gl_Position = vvertex; } ] [ fragdata(0) vec4 fragcolor; void main(void) { fragcolor = vec4(1.0, 0.0, 1.0, 1.0); } ] ////////////////////////////////////////////////////////////////////// // // for filling the z-buffer only (i.e. multi-pass rendering, OQ) // ////////////////////////////////////////////////////////////////////// shader 0 "nocolor" [ attribute vec4 vvertex; uniform mat4 camprojmatrix; void main() { gl_Position = camprojmatrix * vvertex; } ] [ void main() {} ] shader 0 "bbquery" [ attribute vec4 vvertex; uniform mat4 camprojmatrix; uniform vec3 bborigin, bbsize; void main() { gl_Position = camprojmatrix * vec4(bborigin + vvertex.xyz*bbsize, vvertex.w); } ] [ void main() {} ] shader 0 "depth" [ attribute vec4 vvertex; uniform mat4 camprojmatrix; @(ginterpdepth) void main() { gl_Position = camprojmatrix * vvertex; @(gdepthpackvert) } ] [ @(? $gdepthformat [ fragdata(0) vec4 gdepth; ]) @(ginterpdepth) void main() { @(if (= $gdepthformat 1) [result [ @(gpackdepth packdepth lineardepth) gdepth.rgb = packdepth; gdepth.a = 0.0; ]] [? (> $gdepthformat 1) [ gdepth.r = lineardepth; ]]) } ] ////////////////////////////////////////////////////////////////////// // // LDR variants of default shaders // ////////////////////////////////////////////////////////////////////// shader 0 "ldr" [ attribute vec4 vvertex, vcolor; attribute vec2 vtexcoord0; uniform mat4 camprojmatrix; uniform float ldrscale; varying vec2 texcoord0; varying vec4 colorscale; void main(void) { gl_Position = camprojmatrix * vvertex; texcoord0 = vtexcoord0; colorscale = vec4(ldrscale * vcolor.rgb, vcolor.a); } ] [ uniform sampler2D tex0; varying vec2 texcoord0; varying vec4 colorscale; fragdata(0) vec4 fragcolor; void main(void) { vec4 color = texture2D(tex0, texcoord0); fragcolor = colorscale * color; } ] shader 0 "ldrnotexture" [ attribute vec4 vvertex, vcolor; uniform mat4 camprojmatrix; uniform float ldrscale; varying vec4 color; void main(void) { gl_Position = camprojmatrix * vvertex; color = vec4(ldrscale * vcolor.rgb, vcolor.a); } ] [ varying vec4 color; fragdata(0) vec4 fragcolor; void main(void) { fragcolor = color; } ] ////////////////////////////////////////////////////////////////////// // // fogged variants of default shaders // ////////////////////////////////////////////////////////////////////// shader 0 "fogged" [ //:fog attribute vec4 vvertex, vcolor; attribute vec2 vtexcoord0; uniform mat4 camprojmatrix; varying vec2 texcoord0; varying vec4 colorscale; void main(void) { gl_Position = camprojmatrix * vvertex; texcoord0 = vtexcoord0; colorscale = vcolor; } ] [ uniform sampler2D tex0; varying vec2 texcoord0; varying vec4 colorscale; fragdata(0) vec4 fragcolor; void main(void) { vec4 color = texture2D(tex0, texcoord0); fragcolor = colorscale * color; } ] shader 0 "foggednotexture" [ //:fog attribute vec4 vvertex, vcolor; uniform mat4 camprojmatrix; varying vec4 color; void main(void) { gl_Position = camprojmatrix * vvertex; color = vcolor; } ] [ varying vec4 color; fragdata(0) vec4 fragcolor; void main(void) { fragcolor = color; } ] shader 0 "fogoverlay" [ attribute vec4 vvertex, vcolor; varying vec4 color; void main(void) { gl_Position = vvertex; color = vcolor; } ] [ varying vec4 color; fragdata(0) vec4 fragcolor; void main(void) { fragcolor = color; } ]