[reicast]: Got size: 640 x 480. ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (shader_in ) vec2 TexCoord) (declare (shader_in ) vec2 VertexCoord) (declare (shader_in ) vec4 Color) (declare (uniform ) mat4 MVPMatrix) (declare (shader_out ) vec2 tex_coord) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (zw) (var_ref vec_ctor) (constant vec2 (0.000000 1.000000)) ) (assign (xy) (var_ref vec_ctor) (var_ref VertexCoord) ) (assign (xyzw) (var_ref gl_Position) (expression vec4 * (var_ref MVPMatrix) (var_ref vec_ctor) ) ) (assign (xy) (var_ref tex_coord) (var_ref TexCoord) ) )) ) ) ( (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) sampler2D Texture) (declare (shader_in ) vec2 tex_coord) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (xyz) (var_ref vec_ctor) (swiz xyz (tex vec4 (var_ref Texture) (var_ref tex_coord) 0 1 () ))) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked vertex program 1: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec2 packed:tex_coord) (declare (location=31 ) vec2 tex_coord) (declare (location=16 shader_in ) vec2 TexCoord) (declare (location=17 shader_in ) vec2 VertexCoord) (declare (location=0 uniform ) mat4 MVPMatrix) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (zw) (var_ref vec_ctor) (constant vec2 (0.000000 1.000000)) ) (assign (xy) (var_ref vec_ctor) (var_ref VertexCoord) ) (declare (temporary ) vec4 flattening_tmp) (assign (xyzw) (var_ref flattening_tmp) (expression vec4 + (expression vec4 + (expression vec4 + (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (0)) ) (swiz x (var_ref vec_ctor) )) (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (1)) ) (swiz y (var_ref vec_ctor) )) ) (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (2)) ) (swiz z (var_ref vec_ctor) )) ) (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (3)) ) (swiz w (var_ref vec_ctor) )) ) ) (assign (xyzw) (var_ref gl_Position) (var_ref flattening_tmp) ) (assign (xy) (var_ref tex_coord) (var_ref TexCoord) ) (assign (xy) (var_ref packed:tex_coord) (var_ref tex_coord) ) )) ) ) GLSL IR for linked fragment program 1: ( (declare (location=31 shader_in ) vec2 packed:tex_coord) (declare (location=31 ) vec2 tex_coord) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) sampler2D Texture) ( function main (signature void (parameters ) ( (assign (xy) (var_ref tex_coord) (var_ref packed:tex_coord) ) (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (xyz) (var_ref vec_ctor) (swiz xyz (tex vec4 (var_ref Texture) (var_ref tex_coord) 0 1 () ))) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL vertex shader 0 source for linked program 1: #define VERTEX #define PARAMETER_UNIFORM attribute vec2 TexCoord; attribute vec2 VertexCoord; attribute vec4 Color; uniform mat4 MVPMatrix; varying vec2 tex_coord; void main() { gl_Position = MVPMatrix * vec4(VertexCoord, 0.0, 1.0); tex_coord = TexCoord; } GLSL fragment shader 1 source for linked program 1: #define FRAGMENT #define PARAMETER_UNIFORM uniform sampler2D Texture; varying vec2 tex_coord; void main() { gl_FragColor = vec4(texture2D(Texture, tex_coord).rgb, 1.0); } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (shader_in ) vec2 TexCoord) (declare (shader_in ) vec2 VertexCoord) (declare (shader_in ) vec4 Color) (declare (uniform ) mat4 MVPMatrix) (declare (shader_out ) vec2 tex_coord) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (zw) (var_ref vec_ctor) (constant vec2 (0.000000 1.000000)) ) (assign (xy) (var_ref vec_ctor) (var_ref VertexCoord) ) (assign (xyzw) (var_ref gl_Position) (expression vec4 * (var_ref MVPMatrix) (var_ref vec_ctor) ) ) (assign (xy) (var_ref tex_coord) (var_ref TexCoord) ) )) ) ) ( (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) sampler2D Texture) (declare (shader_in ) vec2 tex_coord) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (xyz) (var_ref vec_ctor) (swiz xyz (tex vec4 (var_ref Texture) (var_ref tex_coord) 0 1 () ))) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked vertex program 4: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec2 packed:tex_coord) (declare (location=31 ) vec2 tex_coord) (declare (location=16 shader_in ) vec2 TexCoord) (declare (location=17 shader_in ) vec2 VertexCoord) (declare (location=0 uniform ) mat4 MVPMatrix) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (zw) (var_ref vec_ctor) (constant vec2 (0.000000 1.000000)) ) (assign (xy) (var_ref vec_ctor) (var_ref VertexCoord) ) (declare (temporary ) vec4 flattening_tmp) (assign (xyzw) (var_ref flattening_tmp) (expression vec4 + (expression vec4 + (expression vec4 + (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (0)) ) (swiz x (var_ref vec_ctor) )) (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (1)) ) (swiz y (var_ref vec_ctor) )) ) (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (2)) ) (swiz z (var_ref vec_ctor) )) ) (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (3)) ) (swiz w (var_ref vec_ctor) )) ) ) (assign (xyzw) (var_ref gl_Position) (var_ref flattening_tmp) ) (assign (xy) (var_ref tex_coord) (var_ref TexCoord) ) (assign (xy) (var_ref packed:tex_coord) (var_ref tex_coord) ) )) ) ) GLSL IR for linked fragment program 4: ( (declare (location=31 shader_in ) vec2 packed:tex_coord) (declare (location=31 ) vec2 tex_coord) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) sampler2D Texture) ( function main (signature void (parameters ) ( (assign (xy) (var_ref tex_coord) (var_ref packed:tex_coord) ) (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (xyz) (var_ref vec_ctor) (swiz xyz (tex vec4 (var_ref Texture) (var_ref tex_coord) 0 1 () ))) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL vertex shader 0 source for linked program 4: #define VERTEX #define PARAMETER_UNIFORM attribute vec2 TexCoord; attribute vec2 VertexCoord; attribute vec4 Color; uniform mat4 MVPMatrix; varying vec2 tex_coord; void main() { gl_Position = MVPMatrix * vec4(VertexCoord, 0.0, 1.0); tex_coord = TexCoord; } GLSL fragment shader 1 source for linked program 4: #define FRAGMENT #define PARAMETER_UNIFORM uniform sampler2D Texture; varying vec2 tex_coord; void main() { gl_FragColor = vec4(texture2D(Texture, tex_coord).rgb, 1.0); } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (shader_in ) vec2 TexCoord) (declare (shader_in ) vec2 VertexCoord) (declare (shader_in ) vec4 Color) (declare (uniform ) mat4 MVPMatrix) (declare (shader_out ) vec2 tex_coord) (declare (shader_out ) vec4 color) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (zw) (var_ref vec_ctor) (constant vec2 (0.000000 1.000000)) ) (assign (xy) (var_ref vec_ctor) (var_ref VertexCoord) ) (assign (xyzw) (var_ref gl_Position) (expression vec4 * (var_ref MVPMatrix) (var_ref vec_ctor) ) ) (assign (xy) (var_ref tex_coord) (var_ref TexCoord) ) (assign (xyzw) (var_ref color) (var_ref Color) ) )) ) ) ( (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) sampler2D Texture) (declare (uniform ) vec4 bgcolor) (declare (shader_in ) vec2 tex_coord) (declare (shader_in ) vec4 color) ( function main (signature void (parameters ) ( (if (expression bool < (constant float (0.000000)) (swiz w (var_ref bgcolor) )) ( (assign (xyzw) (var_ref gl_FragColor) (var_ref bgcolor) ) ) ( (assign (xyzw) (var_ref gl_FragColor) (expression vec4 * (var_ref color) (tex vec4 (var_ref Texture) (var_ref tex_coord) 0 1 () )) ) )) )) ) ) GLSL IR for linked vertex program 7: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 color) (declare (location=32 shader_out ) vec2 packed:tex_coord) (declare (location=32 ) vec2 tex_coord) (declare (location=16 shader_in ) vec2 TexCoord) (declare (location=17 shader_in ) vec2 VertexCoord) (declare (location=18 shader_in ) vec4 Color) (declare (location=0 uniform ) mat4 MVPMatrix) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (zw) (var_ref vec_ctor) (constant vec2 (0.000000 1.000000)) ) (assign (xy) (var_ref vec_ctor) (var_ref VertexCoord) ) (declare (temporary ) vec4 flattening_tmp) (assign (xyzw) (var_ref flattening_tmp) (expression vec4 + (expression vec4 + (expression vec4 + (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (0)) ) (swiz x (var_ref vec_ctor) )) (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (1)) ) (swiz y (var_ref vec_ctor) )) ) (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (2)) ) (swiz z (var_ref vec_ctor) )) ) (expression vec4 * (array_ref (var_ref MVPMatrix) (constant int (3)) ) (swiz w (var_ref vec_ctor) )) ) ) (assign (xyzw) (var_ref gl_Position) (var_ref flattening_tmp) ) (assign (xy) (var_ref tex_coord) (var_ref TexCoord) ) (assign (xyzw) (var_ref color) (var_ref Color) ) (assign (xy) (var_ref packed:tex_coord) (var_ref tex_coord) ) )) ) ) GLSL IR for linked fragment program 7: ( (declare (location=31 shader_in ) vec4 color) (declare (location=32 shader_in ) vec2 packed:tex_coord) (declare (location=32 ) vec2 tex_coord) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) sampler2D Texture) (declare (location=2 uniform ) vec4 bgcolor) ( function main (signature void (parameters ) ( (assign (xy) (var_ref tex_coord) (var_ref packed:tex_coord) ) (if (expression bool < (constant float (0.000000)) (swiz w (var_ref bgcolor) )) ( (assign (xyzw) (var_ref gl_FragColor) (var_ref bgcolor) ) ) ( (assign (xyzw) (var_ref gl_FragColor) (expression vec4 * (var_ref color) (tex vec4 (var_ref Texture) (var_ref tex_coord) 0 1 () )) ) )) )) ) ) GLSL vertex shader 0 source for linked program 7: #define VERTEX #define PARAMETER_UNIFORM attribute vec2 TexCoord; attribute vec2 VertexCoord; attribute vec4 Color; uniform mat4 MVPMatrix; varying vec2 tex_coord; varying vec4 color; void main() { gl_Position = MVPMatrix * vec4(VertexCoord, 0.0, 1.0); tex_coord = TexCoord; color = Color; } GLSL fragment shader 1 source for linked program 7: #define FRAGMENT #define PARAMETER_UNIFORM uniform sampler2D Texture; uniform vec4 bgcolor; varying vec2 tex_coord; varying vec4 color; void main() { if (bgcolor.a > 0.0) gl_FragColor = bgcolor; else gl_FragColor = color * texture2D(Texture, tex_coord); } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (shader_in ) vec3 VertexCoord) (declare (uniform ) float time) (declare (shader_out ) vec3 fragVertexEc) ( function iqhash (signature float (parameters (declare (in ) float n) ) ( (declare (temporary ) float fract_retval) (assign (x) (var_ref fract_retval) (expression float fract (expression float * (expression float sin (var_ref n) ) (constant float (43758.546875)) ) ) ) (return (var_ref fract_retval) ) )) ) ( function noise (signature float (parameters (declare (in ) vec3 x) ) ( (declare () float n) (declare () vec3 f) (declare (temporary ) vec3 floor_retval) (assign (xyz) (var_ref floor_retval) (expression vec3 floor (var_ref x) ) ) (declare (temporary ) vec3 fract_retval) (assign (xyz) (var_ref fract_retval) (expression vec3 fract (var_ref x) ) ) (assign (xyz) (var_ref f) (expression vec3 * (expression vec3 * (var_ref fract_retval) (var_ref fract_retval) ) (expression vec3 + (constant float (3.000000)) (expression vec3 neg (expression vec3 * (constant float (2.000000)) (var_ref fract_retval) ) ) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float + (swiz x (var_ref floor_retval) )(expression float * (swiz y (var_ref floor_retval) )(constant float (57.000000)) ) ) (expression float * (constant float (113.000000)) (swiz z (var_ref floor_retval) )) ) ) (assign (x) (var_ref n) (var_ref assignment_tmp) ) (declare (temporary ) float iqhash_retval) (call iqhash (var_ref iqhash_retval) ((var_ref assignment_tmp) )) (declare (temporary ) float iqhash_retval@2) (call iqhash (var_ref iqhash_retval@2) ((expression float + (var_ref n) (constant float (1.000000)) ) )) (declare (temporary ) float mix_retval) (assign (x) (var_ref mix_retval) (expression float lrp (var_ref iqhash_retval) (var_ref iqhash_retval@2) (swiz x (var_ref f) )) ) (declare (temporary ) float iqhash_retval@3) (call iqhash (var_ref iqhash_retval@3) ((expression float + (var_ref n) (constant float (57.000000)) ) )) (declare (temporary ) float iqhash_retval@4) (call iqhash (var_ref iqhash_retval@4) ((expression float + (var_ref n) (constant float (58.000000)) ) )) (declare (temporary ) float mix_retval@5) (assign (x) (var_ref mix_retval@5) (expression float lrp (var_ref mix_retval) (expression float lrp (var_ref iqhash_retval@3) (var_ref iqhash_retval@4) (swiz x (var_ref f) )) (swiz y (var_ref f) )) ) (declare (temporary ) float iqhash_retval@6) (call iqhash (var_ref iqhash_retval@6) ((expression float + (var_ref n) (constant float (113.000000)) ) )) (declare (temporary ) float iqhash_retval@7) (call iqhash (var_ref iqhash_retval@7) ((expression float + (var_ref n) (constant float (114.000000)) ) )) (declare (temporary ) float mix_retval@8) (assign (x) (var_ref mix_retval@8) (expression float lrp (var_ref iqhash_retval@6) (var_ref iqhash_retval@7) (swiz x (var_ref f) )) ) (declare (temporary ) float iqhash_retval@9) (call iqhash (var_ref iqhash_retval@9) ((expression float + (var_ref n) (constant float (170.000000)) ) )) (declare (temporary ) float iqhash_retval@10) (call iqhash (var_ref iqhash_retval@10) ((expression float + (var_ref n) (constant float (171.000000)) ) )) (declare (temporary ) float mix_retval@11) (assign (x) (var_ref mix_retval@11) (expression float lrp (var_ref mix_retval@5) (expression float lrp (var_ref mix_retval@8) (expression float lrp (var_ref iqhash_retval@9) (var_ref iqhash_retval@10) (swiz x (var_ref f) )) (swiz y (var_ref f) )) (swiz z (var_ref f) )) ) (return (var_ref mix_retval@11) ) )) ) ( function xmb_noise2 (signature float (parameters (declare (in ) vec3 x) ) ( (return (expression float * (expression float cos (expression float * (swiz z (var_ref x) )(constant float (4.000000)) ) ) (expression float cos (expression float + (expression float + (swiz z (var_ref x) )(expression float / (var_ref time) (constant float (10.000000)) ) ) (swiz x (var_ref x) )) ) ) ) )) ) ( function main (signature void (parameters ) ( (declare () vec3 v3) (declare () vec3 v) (declare (temporary ) vec3 vec_ctor) (assign (y) (var_ref vec_ctor) (constant float (0.000000)) ) (assign (x) (var_ref vec_ctor) (swiz x (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyz) (var_ref v) (var_ref vec_ctor) ) (assign (xyz) (var_ref v3) (var_ref vec_ctor) ) (declare (temporary ) float xmb_noise2_retval) (call xmb_noise2 (var_ref xmb_noise2_retval) ((var_ref vec_ctor) )) (assign (y) (var_ref v) (expression float / (var_ref xmb_noise2_retval) (constant float (8.000000)) ) ) (assign (x) (var_ref v3) (expression float + (swiz x (var_ref v3) )(expression float / (var_ref time) (constant float (5.000000)) ) ) ) (assign (x) (var_ref v3) (expression float / (swiz x (var_ref v3) )(constant float (4.000000)) ) ) (assign (z) (var_ref v3) (expression float + (swiz z (var_ref v3) )(expression float / (var_ref time) (constant float (10.000000)) ) ) ) (assign (y) (var_ref v3) (expression float + (swiz y (var_ref v3) )(expression float / (var_ref time) (constant float (100.000000)) ) ) ) (declare (temporary ) float noise_retval) (call noise (var_ref noise_retval) ((expression vec3 * (var_ref v3) (constant float (7.000000)) ) )) (assign (z) (var_ref v) (expression float + (swiz z (var_ref v) )(expression float / (var_ref noise_retval) (constant float (15.000000)) ) ) ) (declare (temporary ) float noise_retval@12) (call noise (var_ref noise_retval@12) ((expression vec3 * (var_ref v3) (constant float (7.000000)) ) )) (assign (y) (var_ref v) (expression float + (expression float + (expression float + (swiz y (var_ref v) )(expression float / (var_ref noise_retval@12) (constant float (15.000000)) ) ) (expression float / (expression float cos (expression float + (expression float * (swiz x (var_ref v) )(constant float (2.000000)) ) (expression float neg (expression float / (var_ref time) (constant float (2.000000)) ) ) ) ) (constant float (5.000000)) ) ) (constant float (-0.300000)) ) ) (declare (temporary ) vec4 vec_ctor@13) (assign (w) (var_ref vec_ctor@13) (constant float (1.000000)) ) (assign (xyz) (var_ref vec_ctor@13) (var_ref v) ) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor@13) ) (assign (xyz) (var_ref fragVertexEc) (swiz xyz (var_ref vec_ctor@13) )) )) ) ) ( (declare (temporary ) vec3 assignment_tmp) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float time) (declare (shader_in ) vec3 fragVertexEc) (declare () vec3 up) (assign (xyz) (var_ref up) (constant vec3 (0.000000 0.000000 1.000000)) ) ( function main (signature void (parameters ) ( (declare () float c) (declare (temporary ) vec3 dFdx_retval) (assign (xyz) (var_ref dFdx_retval) (expression vec3 dFdx (var_ref fragVertexEc) ) ) (declare (temporary ) vec3 dFdy_retval) (assign (xyz) (var_ref dFdy_retval) (expression vec3 dFdy (var_ref fragVertexEc) ) ) (declare (temporary ) vec3 cross_retval) (assign (xyz) (var_ref cross_retval) (expression vec3 + (expression vec3 * (swiz yzx (var_ref dFdx_retval) )(swiz zxy (var_ref dFdy_retval) )) (expression vec3 neg (expression vec3 * (swiz zxy (var_ref dFdx_retval) )(swiz yzx (var_ref dFdy_retval) )) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (constant float (1.000000)) (expression float neg (expression float dot (expression vec3 * (var_ref cross_retval) (expression float rsq (expression float dot (var_ref cross_retval) (var_ref cross_retval) ) ) ) (var_ref up) ) ) ) ) (assign (x) (var_ref c) (expression float / (expression float + (constant float (1.000000)) (expression float neg (expression float cos (expression float * (var_ref assignment_tmp) (var_ref assignment_tmp) ) ) ) ) (constant float (3.000000)) ) ) (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor) (var_ref c) ) (assign (y) (var_ref vec_ctor) (var_ref c) ) (assign (z) (var_ref vec_ctor) (var_ref c) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked vertex program 10: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec3 packed:fragVertexEc) (declare (location=31 ) vec3 fragVertexEc) (declare (location=16 shader_in ) vec3 VertexCoord) (declare (location=0 uniform ) float time) ( function main (signature void (parameters ) ( (declare () vec3 v3) (declare () vec3 v) (declare (temporary ) vec3 vec_ctor) (assign (y) (var_ref vec_ctor) (constant float (0.000000)) ) (assign (x) (var_ref vec_ctor) (swiz x (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (x) (var_ref v) (swiz x (var_ref vec_ctor) )) (assign (yz) (var_ref v3) (swiz yz (var_ref vec_ctor) )) (assign (y) (var_ref v) (expression float * (expression float * (expression float cos (expression float * (swiz y (var_ref VertexCoord) )(constant float (4.000000)) ) ) (expression float cos (expression float + (expression float + (swiz y (var_ref VertexCoord) )(expression float * (var_ref time) (expression float rcp (constant float (10.000000)) ) ) ) (swiz x (var_ref VertexCoord) )) ) ) (expression float rcp (constant float (8.000000)) ) ) ) (assign (x) (var_ref v3) (expression float + (swiz x (var_ref VertexCoord) )(expression float * (var_ref time) (expression float rcp (constant float (5.000000)) ) ) ) ) (assign (x) (var_ref v3) (expression float * (swiz x (var_ref v3) )(expression float rcp (constant float (4.000000)) ) ) ) (assign (z) (var_ref v3) (expression float + (swiz y (var_ref VertexCoord) )(expression float * (var_ref time) (expression float rcp (constant float (10.000000)) ) ) ) ) (assign (y) (var_ref v3) (expression float * (var_ref time) (expression float rcp (constant float (100.000000)) ) ) ) (declare (temporary ) vec3 x) (assign (xyz) (var_ref x) (expression vec3 * (var_ref v3) (constant float (7.000000)) ) ) (declare () vec3 f) (declare (temporary ) vec3 floor_retval) (assign (xyz) (var_ref floor_retval) (expression vec3 floor (var_ref x) ) ) (declare (temporary ) vec3 fract_retval) (assign (xyz) (var_ref fract_retval) (expression vec3 fract (var_ref x) ) ) (assign (xyz) (var_ref f) (expression vec3 * (expression vec3 * (var_ref fract_retval) (var_ref fract_retval) ) (expression vec3 + (constant float (3.000000)) (expression vec3 neg (expression vec3 * (constant float (2.000000)) (var_ref fract_retval) ) ) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float + (swiz x (var_ref floor_retval) )(expression float * (swiz y (var_ref floor_retval) )(constant float (57.000000)) ) ) (expression float * (constant float (113.000000)) (swiz z (var_ref floor_retval) )) ) ) (assign (z) (var_ref v) (expression float + (swiz y (var_ref VertexCoord) )(expression float * (expression float lrp (expression float lrp (expression float lrp (expression float fract (expression float * (expression float sin (var_ref assignment_tmp) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (1.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f) )) (expression float lrp (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (57.000000)) ) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (58.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f) )) (swiz y (var_ref f) )) (expression float lrp (expression float lrp (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (113.000000)) ) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (114.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f) )) (expression float lrp (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (170.000000)) ) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (171.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f) )) (swiz y (var_ref f) )) (swiz z (var_ref f) )) (expression float rcp (constant float (15.000000)) ) ) ) ) (declare (temporary ) vec3 x@14) (assign (xyz) (var_ref x@14) (expression vec3 * (var_ref v3) (constant float (7.000000)) ) ) (declare () vec3 f@15) (declare (temporary ) vec3 floor_retval@16) (assign (xyz) (var_ref floor_retval@16) (expression vec3 floor (var_ref x@14) ) ) (declare (temporary ) vec3 fract_retval@17) (assign (xyz) (var_ref fract_retval@17) (expression vec3 fract (var_ref x@14) ) ) (assign (xyz) (var_ref f@15) (expression vec3 * (expression vec3 * (var_ref fract_retval@17) (var_ref fract_retval@17) ) (expression vec3 + (constant float (3.000000)) (expression vec3 neg (expression vec3 * (constant float (2.000000)) (var_ref fract_retval@17) ) ) ) ) ) (declare (temporary ) float assignment_tmp@18) (assign (x) (var_ref assignment_tmp@18) (expression float + (expression float + (swiz x (var_ref floor_retval@16) )(expression float * (swiz y (var_ref floor_retval@16) )(constant float (57.000000)) ) ) (expression float * (constant float (113.000000)) (swiz z (var_ref floor_retval@16) )) ) ) (assign (y) (var_ref v) (expression float + (expression float + (expression float + (swiz y (var_ref v) )(expression float * (expression float lrp (expression float lrp (expression float lrp (expression float fract (expression float * (expression float sin (var_ref assignment_tmp@18) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp@18) (constant float (1.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f@15) )) (expression float lrp (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp@18) (constant float (57.000000)) ) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp@18) (constant float (58.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f@15) )) (swiz y (var_ref f@15) )) (expression float lrp (expression float lrp (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp@18) (constant float (113.000000)) ) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp@18) (constant float (114.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f@15) )) (expression float lrp (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp@18) (constant float (170.000000)) ) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp@18) (constant float (171.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f@15) )) (swiz y (var_ref f@15) )) (swiz z (var_ref f@15) )) (expression float rcp (constant float (15.000000)) ) ) ) (expression float * (expression float cos (expression float + (expression float * (swiz x (var_ref VertexCoord) )(constant float (2.000000)) ) (expression float neg (expression float * (var_ref time) (expression float rcp (constant float (2.000000)) ) ) ) ) ) (expression float rcp (constant float (5.000000)) ) ) ) (constant float (-0.300000)) ) ) (declare (temporary ) vec4 vec_ctor@19) (assign (w) (var_ref vec_ctor@19) (constant float (1.000000)) ) (assign (xyz) (var_ref vec_ctor@19) (var_ref v) ) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor@19) ) (assign (xyz) (var_ref fragVertexEc) (swiz xyz (var_ref vec_ctor@19) )) (assign (xyz) (var_ref packed:fragVertexEc) (var_ref fragVertexEc) ) )) ) ) GLSL IR for linked fragment program 10: ( (declare (location=31 shader_in ) vec3 packed:fragVertexEc) (declare (location=31 ) vec3 fragVertexEc) (declare (location=2 shader_out ) vec4 gl_FragColor) ( function main (signature void (parameters ) ( (assign (xyz) (var_ref fragVertexEc) (var_ref packed:fragVertexEc) ) (declare () float c) (declare (temporary ) vec3 dFdx_retval) (assign (xyz) (var_ref dFdx_retval) (expression vec3 dFdx (var_ref fragVertexEc) ) ) (declare (temporary ) vec3 dFdy_retval) (assign (xyz) (var_ref dFdy_retval) (expression vec3 dFdy (var_ref fragVertexEc) ) ) (declare (temporary ) vec3 cross_retval) (assign (xyz) (var_ref cross_retval) (expression vec3 + (expression vec3 * (swiz yzx (var_ref dFdx_retval) )(swiz zxy (var_ref dFdy_retval) )) (expression vec3 neg (expression vec3 * (swiz zxy (var_ref dFdx_retval) )(swiz yzx (var_ref dFdy_retval) )) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (constant float (1.000000)) (expression float neg (expression float dot (expression vec3 * (var_ref cross_retval) (expression float rsq (expression float dot (var_ref cross_retval) (var_ref cross_retval) ) ) ) (constant vec3 (0.000000 0.000000 1.000000)) ) ) ) ) (assign (x) (var_ref c) (expression float * (expression float + (constant float (1.000000)) (expression float neg (expression float cos (expression float * (var_ref assignment_tmp) (var_ref assignment_tmp) ) ) ) ) (expression float rcp (constant float (3.000000)) ) ) ) (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor) (var_ref c) ) (assign (y) (var_ref vec_ctor) (var_ref c) ) (assign (z) (var_ref vec_ctor) (var_ref c) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL vertex shader 0 source for linked program 10: #define VERTEX #define PARAMETER_UNIFORM attribute vec3 VertexCoord; uniform float time; varying vec3 fragVertexEc; float iqhash( float n ) { return fract(sin(n)*43758.5453); } float noise( vec3 x ) { vec3 p = floor(x); vec3 f = fract(x); f = f*f*(3.0-2.0*f); float n = p.x + p.y*57.0 + 113.0*p.z; return mix(mix(mix( iqhash(n+0.0 ), iqhash(n+1.0 ),f.x), mix( iqhash(n+57.0 ), iqhash(n+58.0 ),f.x),f.y), mix(mix( iqhash(n+113.0), iqhash(n+114.0),f.x), mix( iqhash(n+170.0), iqhash(n+171.0),f.x),f.y),f.z); } float xmb_noise2( vec3 x ) { return cos(x.z*4.0)*cos(x.z+time/10.0+x.x); } void main() { vec3 v = vec3(VertexCoord.x, 0.0, VertexCoord.y); vec3 v2 = v; vec3 v3 = v; v.y = xmb_noise2(v2)/8.0; v3.x = v3.x + time/5.0; v3.x = v3.x / 4.0; v3.z = v3.z + time/10.0; v3.y = v3.y + time/100.0; v.z = v.z + noise(v3*7.0)/15.0; v.y = v.y + noise(v3*7.0)/15.0 + cos(v.x*2.0-time/2.0)/5.0 - 0.3; gl_Position = vec4(v, 1.0); fragVertexEc = gl_Position.xyz; } GLSL fragment shader 1 source for linked program 10: #define FRAGMENT #define PARAMETER_UNIFORM uniform float time; varying vec3 fragVertexEc; vec3 up = vec3(0, 0, 1); void main() { vec3 X = dFdx(fragVertexEc); vec3 Y = dFdy(fragVertexEc); vec3 normal=normalize(cross(X,Y)); float c = (1.0 - dot(normal, up)); c = (1.0 - cos(c*c))/3.0; gl_FragColor = vec4(c, c, c, 1.0); } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (shader_in ) vec3 VertexCoord) (declare (uniform ) float time) ( function iqhash (signature float (parameters (declare (in ) float n) ) ( (declare (temporary ) float fract_retval) (assign (x) (var_ref fract_retval) (expression float fract (expression float * (expression float sin (var_ref n) ) (constant float (43758.546875)) ) ) ) (return (var_ref fract_retval) ) )) ) ( function noise (signature float (parameters (declare (in ) vec3 x) ) ( (declare () float n) (declare () vec3 f) (declare (temporary ) vec3 floor_retval) (assign (xyz) (var_ref floor_retval) (expression vec3 floor (var_ref x) ) ) (declare (temporary ) vec3 fract_retval) (assign (xyz) (var_ref fract_retval) (expression vec3 fract (var_ref x) ) ) (assign (xyz) (var_ref f) (expression vec3 * (expression vec3 * (var_ref fract_retval) (var_ref fract_retval) ) (expression vec3 + (constant float (3.000000)) (expression vec3 neg (expression vec3 * (constant float (2.000000)) (var_ref fract_retval) ) ) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float + (swiz x (var_ref floor_retval) )(expression float * (swiz y (var_ref floor_retval) )(constant float (57.000000)) ) ) (expression float * (constant float (113.000000)) (swiz z (var_ref floor_retval) )) ) ) (assign (x) (var_ref n) (var_ref assignment_tmp) ) (declare (temporary ) float iqhash_retval) (call iqhash (var_ref iqhash_retval) ((var_ref assignment_tmp) )) (declare (temporary ) float iqhash_retval@20) (call iqhash (var_ref iqhash_retval@20) ((expression float + (var_ref n) (constant float (1.000000)) ) )) (declare (temporary ) float mix_retval) (assign (x) (var_ref mix_retval) (expression float lrp (var_ref iqhash_retval) (var_ref iqhash_retval@20) (swiz x (var_ref f) )) ) (declare (temporary ) float iqhash_retval@21) (call iqhash (var_ref iqhash_retval@21) ((expression float + (var_ref n) (constant float (57.000000)) ) )) (declare (temporary ) float iqhash_retval@22) (call iqhash (var_ref iqhash_retval@22) ((expression float + (var_ref n) (constant float (58.000000)) ) )) (declare (temporary ) float mix_retval@23) (assign (x) (var_ref mix_retval@23) (expression float lrp (var_ref mix_retval) (expression float lrp (var_ref iqhash_retval@21) (var_ref iqhash_retval@22) (swiz x (var_ref f) )) (swiz y (var_ref f) )) ) (declare (temporary ) float iqhash_retval@24) (call iqhash (var_ref iqhash_retval@24) ((expression float + (var_ref n) (constant float (113.000000)) ) )) (declare (temporary ) float iqhash_retval@25) (call iqhash (var_ref iqhash_retval@25) ((expression float + (var_ref n) (constant float (114.000000)) ) )) (declare (temporary ) float mix_retval@26) (assign (x) (var_ref mix_retval@26) (expression float lrp (var_ref iqhash_retval@24) (var_ref iqhash_retval@25) (swiz x (var_ref f) )) ) (declare (temporary ) float iqhash_retval@27) (call iqhash (var_ref iqhash_retval@27) ((expression float + (var_ref n) (constant float (170.000000)) ) )) (declare (temporary ) float iqhash_retval@28) (call iqhash (var_ref iqhash_retval@28) ((expression float + (var_ref n) (constant float (171.000000)) ) )) (declare (temporary ) float mix_retval@29) (assign (x) (var_ref mix_retval@29) (expression float lrp (var_ref mix_retval@23) (expression float lrp (var_ref mix_retval@26) (expression float lrp (var_ref iqhash_retval@27) (var_ref iqhash_retval@28) (swiz x (var_ref f) )) (swiz y (var_ref f) )) (swiz z (var_ref f) )) ) (return (var_ref mix_retval@29) ) )) ) ( function main (signature void (parameters ) ( (declare () vec3 v2) (declare () vec3 v) (declare (temporary ) vec3 vec_ctor) (assign (y) (var_ref vec_ctor) (constant float (0.000000)) ) (assign (x) (var_ref vec_ctor) (swiz x (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyz) (var_ref v) (var_ref vec_ctor) ) (assign (y) (var_ref v2) (swiz y (var_ref vec_ctor) )) (assign (x) (var_ref v2) (expression float + (swiz x (var_ref VertexCoord) )(expression float / (var_ref time) (constant float (2.000000)) ) ) ) (assign (z) (var_ref v2) (expression float * (swiz y (var_ref VertexCoord) )(constant float (3.000000)) ) ) (declare (temporary ) float cos_retval) (assign (x) (var_ref cos_retval) (expression float cos (expression float * (expression float + (expression float + (swiz x (var_ref VertexCoord) )(expression float / (swiz y (var_ref VertexCoord) )(constant float (3.000000)) ) ) (var_ref time) ) (constant float (2.000000)) ) ) ) (declare (temporary ) float noise_retval) (call noise (var_ref noise_retval) ((var_ref v2) )) (assign (y) (var_ref v) (expression float + (expression float / (expression float neg (var_ref cos_retval) ) (constant float (10.000000)) ) (expression float neg (expression float / (var_ref noise_retval) (constant float (4.000000)) ) ) ) ) (declare (temporary ) vec4 vec_ctor@30) (assign (w) (var_ref vec_ctor@30) (constant float (1.000000)) ) (assign (xyz) (var_ref vec_ctor@30) (var_ref v) ) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor@30) ) )) ) ) ( (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float time) ( function main (signature void (parameters ) ( (assign (xyzw) (var_ref gl_FragColor) (constant vec4 (0.050000 0.050000 0.050000 1.000000)) ) )) ) ) GLSL IR for linked vertex program 13: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=16 shader_in ) vec3 VertexCoord) (declare (location=0 uniform ) float time) ( function main (signature void (parameters ) ( (declare () vec3 v2) (declare () vec3 v) (declare (temporary ) vec3 vec_ctor) (assign (y) (var_ref vec_ctor) (constant float (0.000000)) ) (assign (x) (var_ref vec_ctor) (swiz x (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xz) (var_ref v) (swiz xz (var_ref vec_ctor) )) (assign (y) (var_ref v2) (swiz y (var_ref vec_ctor) )) (assign (x) (var_ref v2) (expression float + (swiz x (var_ref VertexCoord) )(expression float * (var_ref time) (expression float rcp (constant float (2.000000)) ) ) ) ) (assign (z) (var_ref v2) (expression float * (swiz y (var_ref VertexCoord) )(constant float (3.000000)) ) ) (declare () vec3 f) (declare (temporary ) vec3 floor_retval) (assign (xyz) (var_ref floor_retval) (expression vec3 floor (var_ref v2) ) ) (declare (temporary ) vec3 fract_retval) (assign (xyz) (var_ref fract_retval) (expression vec3 fract (var_ref v2) ) ) (assign (xyz) (var_ref f) (expression vec3 * (expression vec3 * (var_ref fract_retval) (var_ref fract_retval) ) (expression vec3 + (constant float (3.000000)) (expression vec3 neg (expression vec3 * (constant float (2.000000)) (var_ref fract_retval) ) ) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float + (swiz x (var_ref floor_retval) )(expression float * (swiz y (var_ref floor_retval) )(constant float (57.000000)) ) ) (expression float * (constant float (113.000000)) (swiz z (var_ref floor_retval) )) ) ) (assign (y) (var_ref v) (expression float + (expression float * (expression float neg (expression float cos (expression float * (expression float + (expression float + (swiz x (var_ref VertexCoord) )(expression float * (swiz y (var_ref VertexCoord) )(expression float rcp (constant float (3.000000)) ) ) ) (var_ref time) ) (constant float (2.000000)) ) ) ) (expression float rcp (constant float (10.000000)) ) ) (expression float neg (expression float * (expression float lrp (expression float lrp (expression float lrp (expression float fract (expression float * (expression float sin (var_ref assignment_tmp) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (1.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f) )) (expression float lrp (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (57.000000)) ) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (58.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f) )) (swiz y (var_ref f) )) (expression float lrp (expression float lrp (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (113.000000)) ) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (114.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f) )) (expression float lrp (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (170.000000)) ) ) (constant float (43758.546875)) ) ) (expression float fract (expression float * (expression float sin (expression float + (var_ref assignment_tmp) (constant float (171.000000)) ) ) (constant float (43758.546875)) ) ) (swiz x (var_ref f) )) (swiz y (var_ref f) )) (swiz z (var_ref f) )) (expression float rcp (constant float (4.000000)) ) ) ) ) ) (declare (temporary ) vec4 vec_ctor@31) (assign (w) (var_ref vec_ctor@31) (constant float (1.000000)) ) (assign (xyz) (var_ref vec_ctor@31) (var_ref v) ) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor@31) ) )) ) ) GLSL IR for linked fragment program 13: ( (declare (location=2 shader_out ) vec4 gl_FragColor) ( function main (signature void (parameters ) ( (assign (xyzw) (var_ref gl_FragColor) (constant vec4 (0.050000 0.050000 0.050000 1.000000)) ) )) ) ) GLSL vertex shader 0 source for linked program 13: #define VERTEX #define PARAMETER_UNIFORM attribute vec3 VertexCoord; uniform float time; float iqhash( float n ) { return fract(sin(n)*43758.5453); } float noise( vec3 x ) { vec3 p = floor(x); vec3 f = fract(x); f = f*f*(3.0-2.0*f); float n = p.x + p.y*57.0 + 113.0*p.z; return mix(mix(mix( iqhash(n+0.0 ), iqhash(n+1.0 ),f.x), mix( iqhash(n+57.0 ), iqhash(n+58.0 ),f.x),f.y), mix(mix( iqhash(n+113.0), iqhash(n+114.0),f.x), mix( iqhash(n+170.0), iqhash(n+171.0),f.x),f.y),f.z); } void main() { vec3 v = vec3(VertexCoord.x, 0.0, VertexCoord.y); vec3 v2 = v; v2.x = v2.x + time/2.0; v2.z = v.z * 3.0; v.y = -cos((v.x+v.z/3.0+time)*2.0)/10.0 - noise(v2.xyz)/4.0; gl_Position = vec4(v, 1.0); } GLSL fragment shader 1 source for linked program 13: #define FRAGMENT #define PARAMETER_UNIFORM uniform float time; void main() { gl_FragColor = vec4(0.05, 0.05, 0.05, 1.0); } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (shader_in ) vec3 VertexCoord) (declare (uniform ) float time) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor) (swiz x (var_ref VertexCoord) )) (assign (y) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) )) ) ) ( (declare (temporary ) float assignment_tmp) (declare (temporary ) float assignment_tmp) (declare (temporary ) float assignment_tmp) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float time) (declare (uniform ) vec2 OutputSize) (declare () float baseScale) (declare () float density) (declare () float speed) (assign (x) (var_ref baseScale) (constant float (1.250000)) ) (assign (x) (var_ref density) (constant float (0.500000)) ) (assign (x) (var_ref speed) (constant float (0.150000)) ) ( function rand (signature float (parameters (declare (in ) vec2 co) ) ( (declare (temporary ) float fract_retval) (assign (x) (var_ref fract_retval) (expression float fract (expression float * (expression float sin (expression float dot (var_ref co) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (return (var_ref fract_retval) ) )) ) ( function dist_func (signature float (parameters (declare (in ) vec2 distv) ) ( (return (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv) )(swiz x (var_ref distv) )) (expression float * (swiz y (var_ref distv) )(swiz y (var_ref distv) )) ) ) (expression float / (constant float (40.000000)) (var_ref baseScale) ) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) ) ( function random_dots (signature float (parameters (declare (in ) vec2 co) ) ( (declare (temporary ) float return_value) (declare (temporary ) float rand_retval) (call rand (var_ref rand_retval) ((expression vec2 floor (expression vec2 / (var_ref co) (constant float (0.050000)) ) ) )) (if (expression bool < (expression float * (var_ref density) (constant float (0.200000)) ) (var_ref rand_retval) ) ( (assign (x) (var_ref return_value) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float fract (expression float * (var_ref rand_retval) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor) (var_ref rand_retval) ) (declare (temporary ) float dist_func_retval) (call dist_func (var_ref dist_func_retval) ((expression vec2 + (expression vec2 fract (expression vec2 / (var_ref co) (constant float (0.050000)) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) )) (assign (x) (var_ref return_value) (var_ref dist_func_retval) ) )) (return (var_ref return_value) ) )) ) ( function snow (signature float (parameters (declare (in ) vec2 pos) (declare (in ) float time) (declare (in ) float scale) ) ( (assign (x) (var_ref pos) (expression float + (swiz x (var_ref pos) )(expression float * (expression float / (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref pos) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref time) ) ) (expression float rcp (var_ref scale) ) ) ) (expression float / (constant float (8.000000)) (var_ref scale) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos) (expression vec2 + (var_ref pos) (expression vec2 * (constant vec2 (-2.000000 4.000000)) (expression float * (var_ref time) (var_ref scale) ) ) ) ) (declare (temporary ) float random_dots_retval) (call random_dots (var_ref random_dots_retval) ((expression vec2 / (var_ref pos) (var_ref scale) ) )) (return (expression float * (var_ref random_dots_retval) (expression float + (expression float * (var_ref scale) (constant float (0.500000)) ) (constant float (0.500000)) ) ) ) )) ) ( function main (signature void (parameters ) ( (declare () float a) (declare () vec2 pos) (declare () float tim) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float * (expression float * (var_ref time) (constant float (0.400000)) ) (var_ref speed) ) ) (assign (x) (var_ref tim) (var_ref assignment_tmp) ) (declare (temporary ) vec2 assignment_tmp@32) (assign (xy) (var_ref assignment_tmp@32) (expression vec2 / (swiz xy (var_ref gl_FragCoord) )(swiz xx (var_ref OutputSize) )) ) (assign (xy) (var_ref pos) (var_ref assignment_tmp@32) ) (assign (x) (var_ref a) (constant float (0.000000)) ) (declare (temporary ) float snow_retval) (call snow (var_ref snow_retval) ((var_ref assignment_tmp@32) (var_ref assignment_tmp) (constant float (1.000000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval) ) ) (declare (temporary ) float snow_retval@33) (call snow (var_ref snow_retval@33) ((var_ref pos) (var_ref tim) (constant float (0.700000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@33) ) ) (declare (temporary ) float snow_retval@34) (call snow (var_ref snow_retval@34) ((var_ref pos) (var_ref tim) (constant float (0.600000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@34) ) ) (declare (temporary ) float snow_retval@35) (call snow (var_ref snow_retval@35) ((var_ref pos) (var_ref tim) (constant float (0.500000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@35) ) ) (declare (temporary ) float snow_retval@36) (call snow (var_ref snow_retval@36) ((var_ref pos) (var_ref tim) (constant float (0.400000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@36) ) ) (declare (temporary ) float snow_retval@37) (call snow (var_ref snow_retval@37) ((var_ref pos) (var_ref tim) (constant float (0.300000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@37) ) ) (declare (temporary ) float snow_retval@38) (call snow (var_ref snow_retval@38) ((var_ref pos) (var_ref tim) (constant float (0.250000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@38) ) ) (declare (temporary ) float snow_retval@39) (call snow (var_ref snow_retval@39) ((var_ref pos) (var_ref tim) (constant float (0.125000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@39) ) ) (assign (x) (var_ref a) (expression float * (var_ref a) (expression float min (expression float * (swiz y (var_ref pos) )(constant float (4.000000)) ) (constant float (1.000000)) ) ) ) (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (1.000000 1.000000 1.000000)) ) (assign (w) (var_ref vec_ctor) (var_ref a) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked vertex program 16: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=16 shader_in ) vec3 VertexCoord) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (xy) (var_ref vec_ctor) (swiz xy (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked fragment program 16: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=0 uniform ) float time) (declare (location=1 uniform ) vec2 OutputSize) ( function main (signature void (parameters ) ( (declare () float a) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float * (constant float (0.060000)) (var_ref time) ) ) (declare (temporary ) vec2 assignment_tmp@40) (assign (xy) (var_ref assignment_tmp@40) (expression vec2 * (swiz xy (var_ref gl_FragCoord) )(expression vec2 rcp (swiz xx (var_ref OutputSize) )) ) ) (assign (x) (var_ref a) (constant float (0.000000)) ) (declare (temporary ) vec2 pos) (assign (y) (var_ref pos) (swiz y (var_ref assignment_tmp@40) )) (assign (x) (var_ref pos) (expression float + (swiz x (var_ref assignment_tmp@40) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@40) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (1.000000)) ) ) (expression float rcp (constant float (8.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos) (expression vec2 + (var_ref pos) (expression vec2 * (constant vec2 (-2.000000 4.000000)) (var_ref assignment_tmp) ) ) ) (declare (temporary ) float return_value) (declare (temporary ) float fract_retval) (assign (x) (var_ref fract_retval) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref pos) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.100000)) (var_ref fract_retval) ) ( (assign (x) (var_ref return_value) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float fract (expression float * (var_ref fract_retval) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor) (var_ref fract_retval) ) (declare (temporary ) vec2 distv) (assign (xy) (var_ref distv) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref pos) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv) )(swiz x (var_ref distv) )) (expression float * (swiz y (var_ref distv) )(swiz y (var_ref distv) )) ) ) (constant float (32.000000)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (var_ref return_value) ) (declare (temporary ) vec2 pos@41) (assign (y) (var_ref pos@41) (swiz y (var_ref assignment_tmp@40) )) (assign (x) (var_ref pos@41) (expression float + (swiz x (var_ref assignment_tmp@40) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@40) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (1.428571)) ) ) (expression float rcp (constant float (11.428572)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@41) (expression vec2 + (var_ref pos@41) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-1.400000 2.800000)) ) ) ) (declare (temporary ) vec2 co) (assign (xy) (var_ref co) (expression vec2 * (var_ref pos@41) (expression float rcp (constant float (0.700000)) ) ) ) (declare (temporary ) float return_value@42) (declare (temporary ) float fract_retval@43) (assign (x) (var_ref fract_retval@43) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.100000)) (var_ref fract_retval@43) ) ( (assign (x) (var_ref return_value@42) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@44) (assign (x) (var_ref vec_ctor@44) (expression float fract (expression float * (var_ref fract_retval@43) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@44) (var_ref fract_retval@43) ) (declare (temporary ) vec2 distv@45) (assign (xy) (var_ref distv@45) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@44) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@42) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@45) )(swiz x (var_ref distv@45) )) (expression float * (swiz y (var_ref distv@45) )(swiz y (var_ref distv@45) )) ) ) (constant float (32.000000)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref return_value) (expression float * (var_ref return_value@42) (constant float (0.850000)) ) ) ) (declare (temporary ) vec2 pos@46) (assign (y) (var_ref pos@46) (swiz y (var_ref assignment_tmp@40) )) (assign (x) (var_ref pos@46) (expression float + (swiz x (var_ref assignment_tmp@40) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@40) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (1.666667)) ) ) (expression float rcp (constant float (13.333333)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@46) (expression vec2 + (var_ref pos@46) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-1.200000 2.400000)) ) ) ) (declare (temporary ) vec2 co@47) (assign (xy) (var_ref co@47) (expression vec2 * (var_ref pos@46) (expression float rcp (constant float (0.600000)) ) ) ) (declare (temporary ) float return_value@48) (declare (temporary ) float fract_retval@49) (assign (x) (var_ref fract_retval@49) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@47) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.100000)) (var_ref fract_retval@49) ) ( (assign (x) (var_ref return_value@48) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@50) (assign (x) (var_ref vec_ctor@50) (expression float fract (expression float * (var_ref fract_retval@49) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@50) (var_ref fract_retval@49) ) (declare (temporary ) vec2 distv@51) (assign (xy) (var_ref distv@51) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@47) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@50) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@48) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@51) )(swiz x (var_ref distv@51) )) (expression float * (swiz y (var_ref distv@51) )(swiz y (var_ref distv@51) )) ) ) (constant float (32.000000)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@48) (constant float (0.800000)) ) ) ) (declare (temporary ) vec2 pos@52) (assign (y) (var_ref pos@52) (swiz y (var_ref assignment_tmp@40) )) (assign (x) (var_ref pos@52) (expression float + (swiz x (var_ref assignment_tmp@40) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@40) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (2.000000)) ) ) (expression float rcp (constant float (16.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@52) (expression vec2 + (var_ref pos@52) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-1.000000 2.000000)) ) ) ) (declare (temporary ) vec2 co@53) (assign (xy) (var_ref co@53) (expression vec2 * (var_ref pos@52) (expression float rcp (constant float (0.500000)) ) ) ) (declare (temporary ) float return_value@54) (declare (temporary ) float fract_retval@55) (assign (x) (var_ref fract_retval@55) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@53) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.100000)) (var_ref fract_retval@55) ) ( (assign (x) (var_ref return_value@54) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@56) (assign (x) (var_ref vec_ctor@56) (expression float fract (expression float * (var_ref fract_retval@55) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@56) (var_ref fract_retval@55) ) (declare (temporary ) vec2 distv@57) (assign (xy) (var_ref distv@57) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@53) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@56) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@54) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@57) )(swiz x (var_ref distv@57) )) (expression float * (swiz y (var_ref distv@57) )(swiz y (var_ref distv@57) )) ) ) (constant float (32.000000)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@54) (constant float (0.750000)) ) ) ) (declare (temporary ) vec2 pos@58) (assign (y) (var_ref pos@58) (swiz y (var_ref assignment_tmp@40) )) (assign (x) (var_ref pos@58) (expression float + (swiz x (var_ref assignment_tmp@40) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@40) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (2.500000)) ) ) (expression float rcp (constant float (20.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@58) (expression vec2 + (var_ref pos@58) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-0.800000 1.600000)) ) ) ) (declare (temporary ) vec2 co@59) (assign (xy) (var_ref co@59) (expression vec2 * (var_ref pos@58) (expression float rcp (constant float (0.400000)) ) ) ) (declare (temporary ) float return_value@60) (declare (temporary ) float fract_retval@61) (assign (x) (var_ref fract_retval@61) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@59) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.100000)) (var_ref fract_retval@61) ) ( (assign (x) (var_ref return_value@60) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@62) (assign (x) (var_ref vec_ctor@62) (expression float fract (expression float * (var_ref fract_retval@61) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@62) (var_ref fract_retval@61) ) (declare (temporary ) vec2 distv@63) (assign (xy) (var_ref distv@63) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@59) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@62) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@60) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@63) )(swiz x (var_ref distv@63) )) (expression float * (swiz y (var_ref distv@63) )(swiz y (var_ref distv@63) )) ) ) (constant float (32.000000)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@60) (constant float (0.700000)) ) ) ) (declare (temporary ) vec2 pos@64) (assign (y) (var_ref pos@64) (swiz y (var_ref assignment_tmp@40) )) (assign (x) (var_ref pos@64) (expression float + (swiz x (var_ref assignment_tmp@40) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@40) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (3.333333)) ) ) (expression float rcp (constant float (26.666666)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@64) (expression vec2 + (var_ref pos@64) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-0.600000 1.200000)) ) ) ) (declare (temporary ) vec2 co@65) (assign (xy) (var_ref co@65) (expression vec2 * (var_ref pos@64) (expression float rcp (constant float (0.300000)) ) ) ) (declare (temporary ) float return_value@66) (declare (temporary ) float fract_retval@67) (assign (x) (var_ref fract_retval@67) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@65) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.100000)) (var_ref fract_retval@67) ) ( (assign (x) (var_ref return_value@66) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@68) (assign (x) (var_ref vec_ctor@68) (expression float fract (expression float * (var_ref fract_retval@67) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@68) (var_ref fract_retval@67) ) (declare (temporary ) vec2 distv@69) (assign (xy) (var_ref distv@69) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@65) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@68) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@66) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@69) )(swiz x (var_ref distv@69) )) (expression float * (swiz y (var_ref distv@69) )(swiz y (var_ref distv@69) )) ) ) (constant float (32.000000)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@66) (constant float (0.650000)) ) ) ) (declare (temporary ) vec2 pos@70) (assign (y) (var_ref pos@70) (swiz y (var_ref assignment_tmp@40) )) (assign (x) (var_ref pos@70) (expression float + (swiz x (var_ref assignment_tmp@40) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@40) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (4.000000)) ) ) (expression float rcp (constant float (32.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@70) (expression vec2 + (var_ref pos@70) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-0.500000 1.000000)) ) ) ) (declare (temporary ) vec2 co@71) (assign (xy) (var_ref co@71) (expression vec2 * (var_ref pos@70) (expression float rcp (constant float (0.250000)) ) ) ) (declare (temporary ) float return_value@72) (declare (temporary ) float fract_retval@73) (assign (x) (var_ref fract_retval@73) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@71) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.100000)) (var_ref fract_retval@73) ) ( (assign (x) (var_ref return_value@72) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@74) (assign (x) (var_ref vec_ctor@74) (expression float fract (expression float * (var_ref fract_retval@73) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@74) (var_ref fract_retval@73) ) (declare (temporary ) vec2 distv@75) (assign (xy) (var_ref distv@75) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@71) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@74) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@72) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@75) )(swiz x (var_ref distv@75) )) (expression float * (swiz y (var_ref distv@75) )(swiz y (var_ref distv@75) )) ) ) (constant float (32.000000)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@72) (constant float (0.625000)) ) ) ) (declare (temporary ) vec2 pos@76) (assign (y) (var_ref pos@76) (swiz y (var_ref assignment_tmp@40) )) (assign (x) (var_ref pos@76) (expression float + (swiz x (var_ref assignment_tmp@40) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@40) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (8.000000)) ) ) (expression float rcp (constant float (64.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@76) (expression vec2 + (var_ref pos@76) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-0.250000 0.500000)) ) ) ) (declare (temporary ) vec2 co@77) (assign (xy) (var_ref co@77) (expression vec2 * (var_ref pos@76) (expression float rcp (constant float (0.125000)) ) ) ) (declare (temporary ) float return_value@78) (declare (temporary ) float fract_retval@79) (assign (x) (var_ref fract_retval@79) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@77) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.100000)) (var_ref fract_retval@79) ) ( (assign (x) (var_ref return_value@78) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@80) (assign (x) (var_ref vec_ctor@80) (expression float fract (expression float * (var_ref fract_retval@79) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@80) (var_ref fract_retval@79) ) (declare (temporary ) vec2 distv@81) (assign (xy) (var_ref distv@81) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@77) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@80) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@78) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@81) )(swiz x (var_ref distv@81) )) (expression float * (swiz y (var_ref distv@81) )(swiz y (var_ref distv@81) )) ) ) (constant float (32.000000)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@78) (constant float (0.562500)) ) ) ) (assign (x) (var_ref a) (expression float * (var_ref a) (expression float min (expression float * (swiz y (var_ref assignment_tmp@40) )(constant float (4.000000)) ) (constant float (1.000000)) ) ) ) (declare (temporary ) vec4 vec_ctor@82) (assign (xyz) (var_ref vec_ctor@82) (constant vec3 (1.000000 1.000000 1.000000)) ) (assign (w) (var_ref vec_ctor@82) (var_ref a) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor@82) ) )) ) ) GLSL vertex shader 0 source for linked program 16: #define VERTEX #define PARAMETER_UNIFORM attribute vec3 VertexCoord; uniform float time; void main() { vec3 v = vec3(VertexCoord.x, 0.0, VertexCoord.y); vec3 v2 = v; v.y = v.z; gl_Position = vec4(VertexCoord.x, VertexCoord.y, VertexCoord.y, 1.0); } GLSL fragment shader 1 source for linked program 16: #define FRAGMENT #define PARAMETER_UNIFORM uniform float time; uniform vec2 OutputSize; float baseScale = 1.25; float density = 0.5; float speed = 0.15; float rand(vec2 co) { return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); } float dist_func(vec2 distv) { float dist = sqrt((distv.x * distv.x) + (distv.y * distv.y)) * (40.0 / baseScale); dist = clamp(dist, 0.0, 1.0); return cos(dist * (3.14159265358 * 0.5)) * 0.5; } float random_dots(vec2 co) { float part = 1.0 / 20.0; vec2 cd = floor(co / part); float p = rand(cd); if (p > 0.005 * (density * 40.0)) return 0.0; vec2 dpos = (vec2(fract(p * 2.0) , p) + vec2(2.0, 2.0)) * 0.25; vec2 cellpos = fract(co / part); vec2 distv = (cellpos - dpos); return dist_func(distv); } float snow(vec2 pos, float time, float scale) { pos.x += cos(pos.y * 1.2 + time * 3.14159 * 2.0 + 1.0 / scale) / (8.0 / scale) * 4.0; pos += time * scale * vec2(-0.5, 1.0) * 4.0; return random_dots(pos / scale) * (scale * 0.5 + 0.5); } void main(void) { float tim = time * 0.4 * speed; vec2 pos = gl_FragCoord.xy / OutputSize.xx; float a = 0.0; a += snow(pos, tim, 1.0); a += snow(pos, tim, 0.7); a += snow(pos, tim, 0.6); a += snow(pos, tim, 0.5); a += snow(pos, tim, 0.4); a += snow(pos, tim, 0.3); a += snow(pos, tim, 0.25); a += snow(pos, tim, 0.125); a = a * min(pos.y * 4.0, 1.0); gl_FragColor = vec4(1.0, 1.0, 1.0, a); } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (shader_in ) vec3 VertexCoord) (declare (uniform ) float time) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor) (swiz x (var_ref VertexCoord) )) (assign (y) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) )) ) ) ( (declare (temporary ) float assignment_tmp) (declare (temporary ) float assignment_tmp) (declare (temporary ) float assignment_tmp) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float time) (declare (uniform ) vec2 OutputSize) (declare () float baseScale) (declare () float density) (declare () float speed) (assign (x) (var_ref baseScale) (constant float (3.500000)) ) (assign (x) (var_ref density) (constant float (0.700000)) ) (assign (x) (var_ref speed) (constant float (0.250000)) ) ( function rand (signature float (parameters (declare (in ) vec2 co) ) ( (declare (temporary ) float fract_retval) (assign (x) (var_ref fract_retval) (expression float fract (expression float * (expression float sin (expression float dot (var_ref co) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (return (var_ref fract_retval) ) )) ) ( function dist_func (signature float (parameters (declare (in ) vec2 distv) ) ( (return (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv) )(swiz x (var_ref distv) )) (expression float * (swiz y (var_ref distv) )(swiz y (var_ref distv) )) ) ) (expression float / (constant float (40.000000)) (var_ref baseScale) ) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) ) ( function random_dots (signature float (parameters (declare (in ) vec2 co) ) ( (declare (temporary ) float return_value) (declare (temporary ) float rand_retval) (call rand (var_ref rand_retval) ((expression vec2 floor (expression vec2 / (var_ref co) (constant float (0.050000)) ) ) )) (if (expression bool < (expression float * (var_ref density) (constant float (0.200000)) ) (var_ref rand_retval) ) ( (assign (x) (var_ref return_value) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float fract (expression float * (var_ref rand_retval) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor) (var_ref rand_retval) ) (declare (temporary ) float dist_func_retval) (call dist_func (var_ref dist_func_retval) ((expression vec2 + (expression vec2 fract (expression vec2 / (var_ref co) (constant float (0.050000)) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) )) (assign (x) (var_ref return_value) (var_ref dist_func_retval) ) )) (return (var_ref return_value) ) )) ) ( function snow (signature float (parameters (declare (in ) vec2 pos) (declare (in ) float time) (declare (in ) float scale) ) ( (assign (x) (var_ref pos) (expression float + (swiz x (var_ref pos) )(expression float * (expression float / (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref pos) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref time) ) ) (expression float rcp (var_ref scale) ) ) ) (expression float / (constant float (8.000000)) (var_ref scale) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos) (expression vec2 + (var_ref pos) (expression vec2 * (constant vec2 (-2.000000 4.000000)) (expression float * (var_ref time) (var_ref scale) ) ) ) ) (declare (temporary ) float random_dots_retval) (call random_dots (var_ref random_dots_retval) ((expression vec2 / (var_ref pos) (var_ref scale) ) )) (return (expression float * (var_ref random_dots_retval) (expression float + (expression float * (var_ref scale) (constant float (0.500000)) ) (constant float (0.500000)) ) ) ) )) ) ( function main (signature void (parameters ) ( (declare () float a) (declare () vec2 pos) (declare () float tim) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float * (expression float * (var_ref time) (constant float (0.400000)) ) (var_ref speed) ) ) (assign (x) (var_ref tim) (var_ref assignment_tmp) ) (declare (temporary ) vec2 assignment_tmp@83) (assign (xy) (var_ref assignment_tmp@83) (expression vec2 / (swiz xy (var_ref gl_FragCoord) )(swiz xx (var_ref OutputSize) )) ) (assign (xy) (var_ref pos) (var_ref assignment_tmp@83) ) (assign (x) (var_ref a) (constant float (0.000000)) ) (declare (temporary ) float snow_retval) (call snow (var_ref snow_retval) ((var_ref assignment_tmp@83) (var_ref assignment_tmp) (constant float (1.000000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval) ) ) (declare (temporary ) float snow_retval@84) (call snow (var_ref snow_retval@84) ((var_ref pos) (var_ref tim) (constant float (0.700000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@84) ) ) (declare (temporary ) float snow_retval@85) (call snow (var_ref snow_retval@85) ((var_ref pos) (var_ref tim) (constant float (0.600000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@85) ) ) (declare (temporary ) float snow_retval@86) (call snow (var_ref snow_retval@86) ((var_ref pos) (var_ref tim) (constant float (0.500000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@86) ) ) (declare (temporary ) float snow_retval@87) (call snow (var_ref snow_retval@87) ((var_ref pos) (var_ref tim) (constant float (0.400000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@87) ) ) (declare (temporary ) float snow_retval@88) (call snow (var_ref snow_retval@88) ((var_ref pos) (var_ref tim) (constant float (0.300000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@88) ) ) (declare (temporary ) float snow_retval@89) (call snow (var_ref snow_retval@89) ((var_ref pos) (var_ref tim) (constant float (0.250000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@89) ) ) (declare (temporary ) float snow_retval@90) (call snow (var_ref snow_retval@90) ((var_ref pos) (var_ref tim) (constant float (0.125000)) )) (assign (x) (var_ref a) (expression float + (var_ref a) (var_ref snow_retval@90) ) ) (assign (x) (var_ref a) (expression float * (var_ref a) (expression float min (expression float * (swiz y (var_ref pos) )(constant float (4.000000)) ) (constant float (1.000000)) ) ) ) (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (1.000000 1.000000 1.000000)) ) (assign (w) (var_ref vec_ctor) (var_ref a) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked vertex program 19: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=16 shader_in ) vec3 VertexCoord) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (xy) (var_ref vec_ctor) (swiz xy (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked fragment program 19: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=0 uniform ) float time) (declare (location=1 uniform ) vec2 OutputSize) ( function main (signature void (parameters ) ( (declare () float a) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float * (constant float (0.100000)) (var_ref time) ) ) (declare (temporary ) vec2 assignment_tmp@91) (assign (xy) (var_ref assignment_tmp@91) (expression vec2 * (swiz xy (var_ref gl_FragCoord) )(expression vec2 rcp (swiz xx (var_ref OutputSize) )) ) ) (assign (x) (var_ref a) (constant float (0.000000)) ) (declare (temporary ) vec2 pos) (assign (y) (var_ref pos) (swiz y (var_ref assignment_tmp@91) )) (assign (x) (var_ref pos) (expression float + (swiz x (var_ref assignment_tmp@91) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@91) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (1.000000)) ) ) (expression float rcp (constant float (8.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos) (expression vec2 + (var_ref pos) (expression vec2 * (constant vec2 (-2.000000 4.000000)) (var_ref assignment_tmp) ) ) ) (declare (temporary ) float return_value) (declare (temporary ) float fract_retval) (assign (x) (var_ref fract_retval) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref pos) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.140000)) (var_ref fract_retval) ) ( (assign (x) (var_ref return_value) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float fract (expression float * (var_ref fract_retval) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor) (var_ref fract_retval) ) (declare (temporary ) vec2 distv) (assign (xy) (var_ref distv) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref pos) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv) )(swiz x (var_ref distv) )) (expression float * (swiz y (var_ref distv) )(swiz y (var_ref distv) )) ) ) (constant float (11.428572)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (var_ref return_value) ) (declare (temporary ) vec2 pos@92) (assign (y) (var_ref pos@92) (swiz y (var_ref assignment_tmp@91) )) (assign (x) (var_ref pos@92) (expression float + (swiz x (var_ref assignment_tmp@91) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@91) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (1.428571)) ) ) (expression float rcp (constant float (11.428572)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@92) (expression vec2 + (var_ref pos@92) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-1.400000 2.800000)) ) ) ) (declare (temporary ) vec2 co) (assign (xy) (var_ref co) (expression vec2 * (var_ref pos@92) (expression float rcp (constant float (0.700000)) ) ) ) (declare (temporary ) float return_value@93) (declare (temporary ) float fract_retval@94) (assign (x) (var_ref fract_retval@94) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.140000)) (var_ref fract_retval@94) ) ( (assign (x) (var_ref return_value@93) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@95) (assign (x) (var_ref vec_ctor@95) (expression float fract (expression float * (var_ref fract_retval@94) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@95) (var_ref fract_retval@94) ) (declare (temporary ) vec2 distv@96) (assign (xy) (var_ref distv@96) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@95) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@93) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@96) )(swiz x (var_ref distv@96) )) (expression float * (swiz y (var_ref distv@96) )(swiz y (var_ref distv@96) )) ) ) (constant float (11.428572)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref return_value) (expression float * (var_ref return_value@93) (constant float (0.850000)) ) ) ) (declare (temporary ) vec2 pos@97) (assign (y) (var_ref pos@97) (swiz y (var_ref assignment_tmp@91) )) (assign (x) (var_ref pos@97) (expression float + (swiz x (var_ref assignment_tmp@91) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@91) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (1.666667)) ) ) (expression float rcp (constant float (13.333333)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@97) (expression vec2 + (var_ref pos@97) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-1.200000 2.400000)) ) ) ) (declare (temporary ) vec2 co@98) (assign (xy) (var_ref co@98) (expression vec2 * (var_ref pos@97) (expression float rcp (constant float (0.600000)) ) ) ) (declare (temporary ) float return_value@99) (declare (temporary ) float fract_retval@100) (assign (x) (var_ref fract_retval@100) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@98) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.140000)) (var_ref fract_retval@100) ) ( (assign (x) (var_ref return_value@99) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@101) (assign (x) (var_ref vec_ctor@101) (expression float fract (expression float * (var_ref fract_retval@100) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@101) (var_ref fract_retval@100) ) (declare (temporary ) vec2 distv@102) (assign (xy) (var_ref distv@102) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@98) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@101) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@99) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@102) )(swiz x (var_ref distv@102) )) (expression float * (swiz y (var_ref distv@102) )(swiz y (var_ref distv@102) )) ) ) (constant float (11.428572)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@99) (constant float (0.800000)) ) ) ) (declare (temporary ) vec2 pos@103) (assign (y) (var_ref pos@103) (swiz y (var_ref assignment_tmp@91) )) (assign (x) (var_ref pos@103) (expression float + (swiz x (var_ref assignment_tmp@91) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@91) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (2.000000)) ) ) (expression float rcp (constant float (16.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@103) (expression vec2 + (var_ref pos@103) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-1.000000 2.000000)) ) ) ) (declare (temporary ) vec2 co@104) (assign (xy) (var_ref co@104) (expression vec2 * (var_ref pos@103) (expression float rcp (constant float (0.500000)) ) ) ) (declare (temporary ) float return_value@105) (declare (temporary ) float fract_retval@106) (assign (x) (var_ref fract_retval@106) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@104) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.140000)) (var_ref fract_retval@106) ) ( (assign (x) (var_ref return_value@105) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@107) (assign (x) (var_ref vec_ctor@107) (expression float fract (expression float * (var_ref fract_retval@106) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@107) (var_ref fract_retval@106) ) (declare (temporary ) vec2 distv@108) (assign (xy) (var_ref distv@108) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@104) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@107) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@105) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@108) )(swiz x (var_ref distv@108) )) (expression float * (swiz y (var_ref distv@108) )(swiz y (var_ref distv@108) )) ) ) (constant float (11.428572)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@105) (constant float (0.750000)) ) ) ) (declare (temporary ) vec2 pos@109) (assign (y) (var_ref pos@109) (swiz y (var_ref assignment_tmp@91) )) (assign (x) (var_ref pos@109) (expression float + (swiz x (var_ref assignment_tmp@91) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@91) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (2.500000)) ) ) (expression float rcp (constant float (20.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@109) (expression vec2 + (var_ref pos@109) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-0.800000 1.600000)) ) ) ) (declare (temporary ) vec2 co@110) (assign (xy) (var_ref co@110) (expression vec2 * (var_ref pos@109) (expression float rcp (constant float (0.400000)) ) ) ) (declare (temporary ) float return_value@111) (declare (temporary ) float fract_retval@112) (assign (x) (var_ref fract_retval@112) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@110) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.140000)) (var_ref fract_retval@112) ) ( (assign (x) (var_ref return_value@111) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@113) (assign (x) (var_ref vec_ctor@113) (expression float fract (expression float * (var_ref fract_retval@112) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@113) (var_ref fract_retval@112) ) (declare (temporary ) vec2 distv@114) (assign (xy) (var_ref distv@114) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@110) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@113) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@111) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@114) )(swiz x (var_ref distv@114) )) (expression float * (swiz y (var_ref distv@114) )(swiz y (var_ref distv@114) )) ) ) (constant float (11.428572)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@111) (constant float (0.700000)) ) ) ) (declare (temporary ) vec2 pos@115) (assign (y) (var_ref pos@115) (swiz y (var_ref assignment_tmp@91) )) (assign (x) (var_ref pos@115) (expression float + (swiz x (var_ref assignment_tmp@91) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@91) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (3.333333)) ) ) (expression float rcp (constant float (26.666666)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@115) (expression vec2 + (var_ref pos@115) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-0.600000 1.200000)) ) ) ) (declare (temporary ) vec2 co@116) (assign (xy) (var_ref co@116) (expression vec2 * (var_ref pos@115) (expression float rcp (constant float (0.300000)) ) ) ) (declare (temporary ) float return_value@117) (declare (temporary ) float fract_retval@118) (assign (x) (var_ref fract_retval@118) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@116) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.140000)) (var_ref fract_retval@118) ) ( (assign (x) (var_ref return_value@117) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@119) (assign (x) (var_ref vec_ctor@119) (expression float fract (expression float * (var_ref fract_retval@118) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@119) (var_ref fract_retval@118) ) (declare (temporary ) vec2 distv@120) (assign (xy) (var_ref distv@120) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@116) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@119) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@117) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@120) )(swiz x (var_ref distv@120) )) (expression float * (swiz y (var_ref distv@120) )(swiz y (var_ref distv@120) )) ) ) (constant float (11.428572)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@117) (constant float (0.650000)) ) ) ) (declare (temporary ) vec2 pos@121) (assign (y) (var_ref pos@121) (swiz y (var_ref assignment_tmp@91) )) (assign (x) (var_ref pos@121) (expression float + (swiz x (var_ref assignment_tmp@91) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@91) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (4.000000)) ) ) (expression float rcp (constant float (32.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@121) (expression vec2 + (var_ref pos@121) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-0.500000 1.000000)) ) ) ) (declare (temporary ) vec2 co@122) (assign (xy) (var_ref co@122) (expression vec2 * (var_ref pos@121) (expression float rcp (constant float (0.250000)) ) ) ) (declare (temporary ) float return_value@123) (declare (temporary ) float fract_retval@124) (assign (x) (var_ref fract_retval@124) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@122) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.140000)) (var_ref fract_retval@124) ) ( (assign (x) (var_ref return_value@123) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@125) (assign (x) (var_ref vec_ctor@125) (expression float fract (expression float * (var_ref fract_retval@124) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@125) (var_ref fract_retval@124) ) (declare (temporary ) vec2 distv@126) (assign (xy) (var_ref distv@126) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@122) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@125) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@123) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@126) )(swiz x (var_ref distv@126) )) (expression float * (swiz y (var_ref distv@126) )(swiz y (var_ref distv@126) )) ) ) (constant float (11.428572)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@123) (constant float (0.625000)) ) ) ) (declare (temporary ) vec2 pos@127) (assign (y) (var_ref pos@127) (swiz y (var_ref assignment_tmp@91) )) (assign (x) (var_ref pos@127) (expression float + (swiz x (var_ref assignment_tmp@91) )(expression float * (expression float * (expression float cos (expression float + (expression float + (expression float * (swiz y (var_ref assignment_tmp@91) )(constant float (1.200000)) ) (expression float * (constant float (6.283180)) (var_ref assignment_tmp) ) ) (constant float (8.000000)) ) ) (expression float rcp (constant float (64.000000)) ) ) (constant float (4.000000)) ) ) ) (assign (xy) (var_ref pos@127) (expression vec2 + (var_ref pos@127) (expression vec2 * (var_ref assignment_tmp) (constant vec2 (-0.250000 0.500000)) ) ) ) (declare (temporary ) vec2 co@128) (assign (xy) (var_ref co@128) (expression vec2 * (var_ref pos@127) (expression float rcp (constant float (0.125000)) ) ) ) (declare (temporary ) float return_value@129) (declare (temporary ) float fract_retval@130) (assign (x) (var_ref fract_retval@130) (expression float fract (expression float * (expression float sin (expression float dot (expression vec2 floor (expression vec2 * (var_ref co@128) (expression float rcp (constant float (0.050000)) ) ) ) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (if (expression bool < (constant float (0.140000)) (var_ref fract_retval@130) ) ( (assign (x) (var_ref return_value@129) (constant float (0.000000)) ) ) ( (declare (temporary ) vec2 vec_ctor@131) (assign (x) (var_ref vec_ctor@131) (expression float fract (expression float * (var_ref fract_retval@130) (constant float (2.000000)) ) ) ) (assign (y) (var_ref vec_ctor@131) (var_ref fract_retval@130) ) (declare (temporary ) vec2 distv@132) (assign (xy) (var_ref distv@132) (expression vec2 + (expression vec2 fract (expression vec2 * (var_ref co@128) (expression float rcp (constant float (0.050000)) ) ) ) (expression vec2 neg (expression vec2 * (expression vec2 + (var_ref vec_ctor@131) (constant vec2 (2.000000 2.000000)) ) (constant float (0.250000)) ) ) ) ) (assign (x) (var_ref return_value@129) (expression float * (expression float cos (expression float * (expression float sat (expression float * (expression float sqrt (expression float + (expression float * (swiz x (var_ref distv@132) )(swiz x (var_ref distv@132) )) (expression float * (swiz y (var_ref distv@132) )(swiz y (var_ref distv@132) )) ) ) (constant float (11.428572)) ) ) (constant float (1.570796)) ) ) (constant float (0.500000)) ) ) )) (assign (x) (var_ref a) (expression float + (var_ref a) (expression float * (var_ref return_value@129) (constant float (0.562500)) ) ) ) (assign (x) (var_ref a) (expression float * (var_ref a) (expression float min (expression float * (swiz y (var_ref assignment_tmp@91) )(constant float (4.000000)) ) (constant float (1.000000)) ) ) ) (declare (temporary ) vec4 vec_ctor@133) (assign (xyz) (var_ref vec_ctor@133) (constant vec3 (1.000000 1.000000 1.000000)) ) (assign (w) (var_ref vec_ctor@133) (var_ref a) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor@133) ) )) ) ) GLSL vertex shader 0 source for linked program 19: #define VERTEX #define PARAMETER_UNIFORM attribute vec3 VertexCoord; uniform float time; void main() { vec3 v = vec3(VertexCoord.x, 0.0, VertexCoord.y); vec3 v2 = v; v.y = v.z; gl_Position = vec4(VertexCoord.x, VertexCoord.y, VertexCoord.y, 1.0); } GLSL fragment shader 1 source for linked program 19: #define FRAGMENT #define PARAMETER_UNIFORM uniform float time; uniform vec2 OutputSize; float baseScale = 3.5; float density = 0.7; float speed = 0.25; float rand(vec2 co) { return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); } float dist_func(vec2 distv) { float dist = sqrt((distv.x * distv.x) + (distv.y * distv.y)) * (40.0 / baseScale); dist = clamp(dist, 0.0, 1.0); return cos(dist * (3.14159265358 * 0.5)) * 0.5; } float random_dots(vec2 co) { float part = 1.0 / 20.0; vec2 cd = floor(co / part); float p = rand(cd); if (p > 0.005 * (density * 40.0)) return 0.0; vec2 dpos = (vec2(fract(p * 2.0) , p) + vec2(2.0, 2.0)) * 0.25; vec2 cellpos = fract(co / part); vec2 distv = (cellpos - dpos); return dist_func(distv); } float snow(vec2 pos, float time, float scale) { pos.x += cos(pos.y * 1.2 + time * 3.14159 * 2.0 + 1.0 / scale) / (8.0 / scale) * 4.0; pos += time * scale * vec2(-0.5, 1.0) * 4.0; return random_dots(pos / scale) * (scale * 0.5 + 0.5); } void main(void) { float tim = time * 0.4 * speed; vec2 pos = gl_FragCoord.xy / OutputSize.xx; float a = 0.0; a += snow(pos, tim, 1.0); a += snow(pos, tim, 0.7); a += snow(pos, tim, 0.6); a += snow(pos, tim, 0.5); a += snow(pos, tim, 0.4); a += snow(pos, tim, 0.3); a += snow(pos, tim, 0.25); a += snow(pos, tim, 0.125); a = a * min(pos.y * 4.0, 1.0); gl_FragColor = vec4(1.0, 1.0, 1.0, a); } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (shader_in ) vec3 VertexCoord) (declare (uniform ) float time) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor) (swiz x (var_ref VertexCoord) )) (assign (y) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) )) ) ) ( (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float time) (declare (uniform ) vec2 OutputSize) ( function main (signature void (parameters ) ( (declare () int i) (declare () vec3 color) (declare () vec2 uv) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float * (var_ref time) (constant float (4.000000)) ) ) (declare (temporary ) vec2 assignment_tmp@134) (assign (xy) (var_ref assignment_tmp@134) (expression vec2 + (constant float (-1.000000)) (expression vec2 / (expression vec2 * (constant float (2.000000)) (swiz xy (var_ref gl_FragCoord) )) (var_ref OutputSize) ) ) ) (assign (y) (var_ref uv) (swiz y (var_ref assignment_tmp@134) )) (assign (x) (var_ref uv) (expression float * (swiz x (var_ref assignment_tmp@134) )(expression float / (swiz x (var_ref OutputSize) )(swiz y (var_ref OutputSize) )) ) ) (assign (xyz) (var_ref color) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (x) (var_ref i) (constant int (0)) ) (loop ( (if (expression bool >= (var_ref i) (constant int (8)) ) ( break ) ()) (declare (temporary ) float assignment_tmp@135) (assign (x) (var_ref assignment_tmp@135) (expression float + (expression float * (expression float sin (expression float + (expression float * (expression float i2f (var_ref i) ) (constant float (546.130005)) ) (constant float (1.000000)) ) ) (constant float (0.500000)) ) (constant float (0.500000)) ) ) (declare (temporary ) float pow_retval) (declare (temporary ) float x) (assign (x) (var_ref x) (expression float + (expression float * (expression float sin (expression float + (expression float * (expression float i2f (var_ref i) ) (constant float (651.739990)) ) (constant float (5.000000)) ) ) (constant float (0.500000)) ) (constant float (0.500000)) ) ) (declare (temporary ) float squared) (assign (x) (var_ref squared) (expression float * (var_ref x) (var_ref x) ) ) (assign (x) (var_ref pow_retval) (expression float * (var_ref squared) (var_ref squared) ) ) (declare (temporary ) float assignment_tmp@136) (assign (x) (var_ref assignment_tmp@136) (expression float + (expression float + (constant float (0.100000)) (expression float * (constant float (0.500000)) (var_ref pow_retval) ) ) (expression float / (expression float sin (expression float + (var_ref assignment_tmp@135) (var_ref pow_retval) ) ) (constant float (4.000000)) ) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float + (expression float / (expression float * (expression float sin (expression float + (expression float * (expression float i2f (var_ref i) ) (constant float (321.549988)) ) (constant float (4.100000)) ) ) (swiz x (var_ref OutputSize) )) (swiz y (var_ref OutputSize) )) (expression float sin (expression float + (expression float + (expression float / (var_ref assignment_tmp) (constant float (15.000000)) ) (var_ref assignment_tmp@135) ) (var_ref pow_retval) ) ) ) ) (assign (y) (var_ref vec_ctor) (expression float + (expression float + (constant float (-1.000000)) (expression float neg (var_ref assignment_tmp@136) ) ) (expression float * (expression float + (constant float (2.000000)) (expression float * (constant float (2.000000)) (var_ref assignment_tmp@136) ) ) (expression float fract (expression float + (var_ref assignment_tmp@135) (expression float * (expression float * (constant float (0.300000)) (expression float / (var_ref assignment_tmp) (constant float (7.000000)) ) ) (expression float + (constant float (0.200000)) (expression float * (constant float (0.800000)) (var_ref pow_retval) ) ) ) ) ) ) ) ) (declare (temporary ) float length_retval) (declare (temporary ) vec2 x@137) (assign (xy) (var_ref x@137) (expression vec2 + (var_ref uv) (expression vec2 neg (var_ref vec_ctor) ) ) ) (assign (x) (var_ref length_retval) (expression float sqrt (expression float dot (var_ref x@137) (var_ref x@137) ) ) ) (if (expression bool < (var_ref length_retval) (var_ref assignment_tmp@136) ) ( (declare (temporary ) vec3 vec_ctor@138) (assign (y) (var_ref vec_ctor@138) (constant float (0.200000)) ) (assign (x) (var_ref vec_ctor@138) (expression float + (expression float * (constant float (0.194000)) (expression float sin (expression float / (var_ref assignment_tmp) (constant float (6.000000)) ) ) ) (constant float (0.300000)) ) ) (assign (z) (var_ref vec_ctor@138) (expression float * (constant float (0.300000)) (var_ref assignment_tmp@135) ) ) (declare (temporary ) vec3 vec_ctor@139) (assign (z) (var_ref vec_ctor@139) (constant float (0.400000)) ) (assign (x) (var_ref vec_ctor@139) (expression float + (expression float * (constant float (1.100000)) (expression float sin (expression float / (var_ref assignment_tmp) (constant float (9.000000)) ) ) ) (constant float (0.300000)) ) ) (assign (y) (var_ref vec_ctor@139) (expression float * (constant float (0.200000)) (var_ref assignment_tmp@135) ) ) (declare (temporary ) float edge0) (assign (x) (var_ref edge0) (expression float * (var_ref assignment_tmp@136) (constant float (0.150000)) ) ) (declare (temporary ) float t) (assign (x) (var_ref t) (expression float sat (expression float / (expression float + (var_ref length_retval) (expression float neg (var_ref edge0) ) ) (expression float + (var_ref assignment_tmp@136) (expression float neg (var_ref edge0) ) ) ) ) ) (assign (xyz) (var_ref color) (expression vec3 + (var_ref color) (expression vec3 * (swiz zyx (expression vec3 lrp (var_ref vec_ctor@138) (var_ref vec_ctor@139) (expression float + (constant float (0.500000)) (expression float * (constant float (0.500000)) (expression float sin (expression float i2f (var_ref i) ) ) ) ) ) )(expression float + (constant float (1.000000)) (expression float neg (expression float * (var_ref t) (expression float * (var_ref t) (expression float + (constant float (3.000000)) (expression float neg (expression float * (constant float (2.000000)) (var_ref t) ) ) ) ) ) ) ) ) ) ) ) ()) (assign (x) (var_ref i) (expression int + (var_ref i) (constant int (1)) ) ) )) (assign (xyz) (var_ref color) (expression vec3 * (var_ref color) (expression float sqrt (expression float + (constant float (1.500000)) (expression float neg (expression float * (constant float (0.500000)) (expression float sqrt (expression float dot (var_ref uv) (var_ref uv) ) ) ) ) ) ) ) ) (declare (temporary ) vec4 vec_ctor@140) (assign (w) (var_ref vec_ctor@140) (constant float (0.500000)) ) (assign (x) (var_ref vec_ctor@140) (swiz x (var_ref color) )) (assign (y) (var_ref vec_ctor@140) (swiz y (var_ref color) )) (assign (z) (var_ref vec_ctor@140) (swiz z (var_ref color) )) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor@140) ) )) ) ) GLSL IR for linked vertex program 22: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=16 shader_in ) vec3 VertexCoord) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (xy) (var_ref vec_ctor) (swiz xy (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked fragment program 22: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=0 uniform ) float time) (declare (location=1 uniform ) vec2 OutputSize) ( function main (signature void (parameters ) ( (declare () int i) (declare () vec3 color) (declare () vec2 uv) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float * (var_ref time) (constant float (4.000000)) ) ) (declare (temporary ) vec2 assignment_tmp@141) (assign (xy) (var_ref assignment_tmp@141) (expression vec2 + (constant float (-1.000000)) (expression vec2 * (expression vec2 * (constant float (2.000000)) (swiz xy (var_ref gl_FragCoord) )) (expression vec2 rcp (var_ref OutputSize) ) ) ) ) (assign (y) (var_ref uv) (swiz y (var_ref assignment_tmp@141) )) (assign (x) (var_ref uv) (expression float * (swiz x (var_ref assignment_tmp@141) )(expression float * (swiz x (var_ref OutputSize) )(expression float rcp (swiz y (var_ref OutputSize) )) ) ) ) (assign (xyz) (var_ref color) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (x) (var_ref i) (constant int (0)) ) (loop ( (if (expression bool >= (var_ref i) (constant int (8)) ) ( break ) ()) (declare (temporary ) float assignment_tmp@142) (assign (x) (var_ref assignment_tmp@142) (expression float + (expression float * (expression float sin (expression float + (expression float * (expression float i2f (var_ref i) ) (constant float (546.130005)) ) (constant float (1.000000)) ) ) (constant float (0.500000)) ) (constant float (0.500000)) ) ) (declare (temporary ) float pow_retval) (declare (temporary ) float x) (assign (x) (var_ref x) (expression float + (expression float * (expression float sin (expression float + (expression float * (expression float i2f (var_ref i) ) (constant float (651.739990)) ) (constant float (5.000000)) ) ) (constant float (0.500000)) ) (constant float (0.500000)) ) ) (declare (temporary ) float squared) (assign (x) (var_ref squared) (expression float * (var_ref x) (var_ref x) ) ) (assign (x) (var_ref pow_retval) (expression float * (var_ref squared) (var_ref squared) ) ) (declare (temporary ) float assignment_tmp@143) (assign (x) (var_ref assignment_tmp@143) (expression float + (expression float + (constant float (0.100000)) (expression float * (constant float (0.500000)) (var_ref pow_retval) ) ) (expression float * (expression float sin (expression float + (var_ref assignment_tmp@142) (var_ref pow_retval) ) ) (expression float rcp (constant float (4.000000)) ) ) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float + (expression float * (expression float * (expression float sin (expression float + (expression float * (expression float i2f (var_ref i) ) (constant float (321.549988)) ) (constant float (4.100000)) ) ) (swiz x (var_ref OutputSize) )) (expression float rcp (swiz y (var_ref OutputSize) )) ) (expression float sin (expression float + (expression float + (expression float * (var_ref assignment_tmp) (expression float rcp (constant float (15.000000)) ) ) (var_ref assignment_tmp@142) ) (var_ref pow_retval) ) ) ) ) (assign (y) (var_ref vec_ctor) (expression float + (expression float + (constant float (-1.000000)) (expression float neg (var_ref assignment_tmp@143) ) ) (expression float * (expression float + (constant float (2.000000)) (expression float * (constant float (2.000000)) (var_ref assignment_tmp@143) ) ) (expression float fract (expression float + (var_ref assignment_tmp@142) (expression float * (expression float * (constant float (0.300000)) (expression float * (var_ref assignment_tmp) (expression float rcp (constant float (7.000000)) ) ) ) (expression float + (constant float (0.200000)) (expression float * (constant float (0.800000)) (var_ref pow_retval) ) ) ) ) ) ) ) ) (declare (temporary ) float length_retval) (declare (temporary ) vec2 x@144) (assign (xy) (var_ref x@144) (expression vec2 + (var_ref uv) (expression vec2 neg (var_ref vec_ctor) ) ) ) (assign (x) (var_ref length_retval) (expression float sqrt (expression float dot (var_ref x@144) (var_ref x@144) ) ) ) (if (expression bool < (var_ref length_retval) (var_ref assignment_tmp@143) ) ( (declare (temporary ) vec3 vec_ctor@145) (assign (y) (var_ref vec_ctor@145) (constant float (0.200000)) ) (assign (x) (var_ref vec_ctor@145) (expression float + (expression float * (constant float (0.194000)) (expression float sin (expression float * (var_ref assignment_tmp) (expression float rcp (constant float (6.000000)) ) ) ) ) (constant float (0.300000)) ) ) (assign (z) (var_ref vec_ctor@145) (expression float * (constant float (0.300000)) (var_ref assignment_tmp@142) ) ) (declare (temporary ) vec3 vec_ctor@146) (assign (z) (var_ref vec_ctor@146) (constant float (0.400000)) ) (assign (x) (var_ref vec_ctor@146) (expression float + (expression float * (constant float (1.100000)) (expression float sin (expression float * (var_ref assignment_tmp) (expression float rcp (constant float (9.000000)) ) ) ) ) (constant float (0.300000)) ) ) (assign (y) (var_ref vec_ctor@146) (expression float * (constant float (0.200000)) (var_ref assignment_tmp@142) ) ) (declare (temporary ) float edge0) (assign (x) (var_ref edge0) (expression float * (var_ref assignment_tmp@143) (constant float (0.150000)) ) ) (declare (temporary ) float t) (assign (x) (var_ref t) (expression float sat (expression float * (expression float + (var_ref length_retval) (expression float neg (var_ref edge0) ) ) (expression float rcp (expression float + (var_ref assignment_tmp@143) (expression float neg (var_ref edge0) ) ) ) ) ) ) (assign (xyz) (var_ref color) (expression vec3 + (var_ref color) (expression vec3 * (swiz zyx (expression vec3 lrp (var_ref vec_ctor@145) (var_ref vec_ctor@146) (expression float + (constant float (0.500000)) (expression float * (constant float (0.500000)) (expression float sin (expression float i2f (var_ref i) ) ) ) ) ) )(expression float + (constant float (1.000000)) (expression float neg (expression float * (var_ref t) (expression float * (var_ref t) (expression float + (constant float (3.000000)) (expression float neg (expression float * (constant float (2.000000)) (var_ref t) ) ) ) ) ) ) ) ) ) ) ) ()) (assign (x) (var_ref i) (expression int + (var_ref i) (constant int (1)) ) ) )) (assign (xyz) (var_ref color) (expression vec3 * (var_ref color) (expression float sqrt (expression float + (constant float (1.500000)) (expression float neg (expression float * (constant float (0.500000)) (expression float sqrt (expression float dot (var_ref uv) (var_ref uv) ) ) ) ) ) ) ) ) (declare (temporary ) vec4 vec_ctor@147) (assign (w) (var_ref vec_ctor@147) (constant float (0.500000)) ) (assign (x) (var_ref vec_ctor@147) (swiz x (var_ref color) )) (assign (y) (var_ref vec_ctor@147) (swiz y (var_ref color) )) (assign (z) (var_ref vec_ctor@147) (swiz z (var_ref color) )) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor@147) ) )) ) ) GLSL vertex shader 0 source for linked program 22: #define VERTEX #define PARAMETER_UNIFORM attribute vec3 VertexCoord; uniform float time; void main() { vec3 v = vec3(VertexCoord.x, 0.0, VertexCoord.y); vec3 v2 = v; v.y = v.z; gl_Position = vec4(VertexCoord.x, VertexCoord.y, VertexCoord.y, 1.0); } GLSL fragment shader 1 source for linked program 22: #define FRAGMENT #define PARAMETER_UNIFORM uniform float time; uniform vec2 OutputSize; void main(void) { float speed = time * 4.0; vec2 uv = -1.0 + 2.0 * gl_FragCoord.xy / OutputSize.xy; uv.x *= OutputSize.x / OutputSize.y; vec3 color = vec3(0.0); for( int i=0; i < 8; i++ ) { float pha = sin(float(i) * 546.13 + 1.0) * 0.5 + 0.5; float siz = pow(sin(float(i) * 651.74 + 5.0) * 0.5 + 0.5, 4.0); float pox = sin(float(i) * 321.55 + 4.1) * OutputSize.x / OutputSize.y; float rad = 0.1 + 0.5 * siz + sin(pha + siz) / 4.0; vec2 pos = vec2(pox + sin(speed / 15. + pha + siz), - 1.0 - rad + (2.0 + 2.0 * rad) * fract(pha + 0.3 * (speed / 7.) * (0.2 + 0.8 * siz))); float dis = length(uv - pos); if(dis < rad) { vec3 col = mix(vec3(0.194 * sin(speed / 6.0) + 0.3, 0.2, 0.3 * pha), vec3(1.1 * sin(speed / 9.0) + 0.3, 0.2 * pha, 0.4), 0.5 + 0.5 * sin(float(i))); color += col.zyx * (1.0 - smoothstep(rad * 0.15, rad, dis)); } } color *= sqrt(1.5 - 0.5 * length(uv)); gl_FragColor = vec4(color.r, color.g, color.b , 0.5); } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (shader_in ) vec3 VertexCoord) (declare (uniform ) float time) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor) (swiz x (var_ref VertexCoord) )) (assign (y) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) )) ) ) ( (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float time) (declare (uniform ) vec2 OutputSize) (declare () vec2 uv) (declare () float atime) ( function rand (signature float (parameters (declare (in ) vec2 co) ) ( (declare (temporary ) float fract_retval) (assign (x) (var_ref fract_retval) (expression float fract (expression float * (expression float sin (expression float dot (var_ref co) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (return (var_ref fract_retval) ) )) ) ( function rand_float (signature float (parameters (declare (in ) float x) ) ( (declare (temporary ) vec2 vec_ctor) (assign (y) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor) (var_ref x) ) (declare (temporary ) float rand_retval) (call rand (var_ref rand_retval) ((var_ref vec_ctor) )) (return (var_ref rand_retval) ) )) ) ( function snow (signature float (parameters (declare (in ) vec3 pos) (declare (in ) vec2 uv) (declare (in ) float o) ) ( (declare (temporary ) float return_value) (declare (temporary ) vec2 assignment_tmp) (assign (xy) (var_ref assignment_tmp) (expression vec2 + (swiz xy (var_ref pos) )(expression vec2 neg (var_ref uv) ) ) ) (declare (temporary ) bool flip) (assign (x) (var_ref flip) (expression bool >= (constant float (0.000000)) (swiz x (var_ref assignment_tmp) )) ) (declare (temporary ) float s) (assign (x) (var_ref s) (expression float csel (var_ref flip) (expression float abs (swiz x (var_ref assignment_tmp) )) (swiz y (var_ref assignment_tmp) )) ) (declare (temporary ) float t) (assign (x) (var_ref t) (expression float csel (var_ref flip) (swiz y (var_ref assignment_tmp) )(expression float abs (swiz x (var_ref assignment_tmp) )) ) ) (declare (temporary ) float scale) (assign (x) (var_ref scale) (expression float csel (expression bool >= (expression float abs (var_ref t) ) (constant float (1.000000e+18)) ) (constant float (0.250000)) (constant float (1.000000)) ) ) (declare (temporary ) float rcp_scaled_t) (assign (x) (var_ref rcp_scaled_t) (expression float rcp (expression float * (var_ref t) (var_ref scale) ) ) ) (declare (temporary ) float arc) (declare (temporary ) float atan_x) (assign (x) (var_ref atan_x) (expression float / (expression float min (expression float abs (expression float csel (expression bool == (expression float abs (swiz x (var_ref assignment_tmp) )) (expression float abs (swiz y (var_ref assignment_tmp) )) ) (constant float (1.000000)) (expression float abs (expression float * (expression float * (var_ref s) (var_ref scale) ) (var_ref rcp_scaled_t) ) ) ) ) (constant float (1.000000)) ) (expression float max (expression float abs (expression float csel (expression bool == (expression float abs (swiz x (var_ref assignment_tmp) )) (expression float abs (swiz y (var_ref assignment_tmp) )) ) (constant float (1.000000)) (expression float abs (expression float * (expression float * (var_ref s) (var_ref scale) ) (var_ref rcp_scaled_t) ) ) ) ) (constant float (1.000000)) ) ) ) (declare (temporary ) float atan_tmp) (assign (x) (var_ref atan_tmp) (expression float * (var_ref atan_x) (var_ref atan_x) ) ) (assign (x) (var_ref atan_tmp) (expression float * (expression float + (expression float * (expression float + (expression float * (expression float + (expression float * (expression float + (expression float * (expression float + (expression float * (constant float (-0.012132)) (var_ref atan_tmp) ) (constant float (0.053681)) ) (var_ref atan_tmp) ) (constant float (-0.117350)) ) (var_ref atan_tmp) ) (constant float (0.193892)) ) (var_ref atan_tmp) ) (constant float (-0.332676)) ) (var_ref atan_tmp) ) (constant float (0.999979)) ) (var_ref atan_x) ) ) (assign (x) (var_ref atan_tmp) (expression float + (var_ref atan_tmp) (expression float * (expression float b2f (expression bool < (constant float (1.000000)) (expression float abs (expression float csel (expression bool == (expression float abs (swiz x (var_ref assignment_tmp) )) (expression float abs (swiz y (var_ref assignment_tmp) )) ) (constant float (1.000000)) (expression float abs (expression float * (expression float * (var_ref s) (var_ref scale) ) (var_ref rcp_scaled_t) ) ) ) ) ) ) (expression float + (expression float * (var_ref atan_tmp) (constant float (-2.000000)) ) (constant float (1.570796)) ) ) ) ) (assign (x) (var_ref arc) (expression float * (var_ref atan_tmp) (expression float sign (expression float csel (expression bool == (expression float abs (swiz x (var_ref assignment_tmp) )) (expression float abs (swiz y (var_ref assignment_tmp) )) ) (constant float (1.000000)) (expression float abs (expression float * (expression float * (var_ref s) (var_ref scale) ) (var_ref rcp_scaled_t) ) ) ) ) ) ) (assign (x) (var_ref arc) (expression float + (var_ref arc) (expression float * (expression float b2f (var_ref flip) ) (constant float (1.570796)) ) ) ) (declare (temporary ) float assignment_tmp@148) (assign (x) (var_ref assignment_tmp@148) (expression float + (expression float csel (expression bool < (expression float min (swiz y (var_ref assignment_tmp) )(var_ref rcp_scaled_t) ) (constant float (0.000000)) ) (expression float neg (var_ref arc) ) (var_ref arc) ) (expression float * (expression float sin (expression float + (var_ref time) (var_ref o) ) ) (constant float (10.000000)) ) ) ) (declare (temporary ) float assignment_tmp@149) (assign (x) (var_ref assignment_tmp@149) (expression float + (expression float * (swiz x (var_ref assignment_tmp) )(swiz x (var_ref assignment_tmp) )) (expression float * (swiz y (var_ref assignment_tmp) )(swiz y (var_ref assignment_tmp) )) ) ) (if (expression bool < (var_ref assignment_tmp@149) (expression float / (swiz z (var_ref pos) )(constant float (400.000000)) ) ) ( (declare () float col) (assign (x) (var_ref col) (constant float (0.000000)) ) (declare (temporary ) float sin_retval) (assign (x) (var_ref sin_retval) (expression float sin (expression float * (var_ref assignment_tmp@148) (constant float (8.000000)) ) ) ) (if (expression bool < (var_ref sin_retval) (constant float (0.000000)) ) ( (assign (x) (var_ref col) (constant float (1.000000)) ) ) ()) (if (expression bool < (var_ref assignment_tmp@149) (expression float / (swiz z (var_ref pos) )(constant float (800.000000)) ) ) ( (assign (x) (var_ref col) (expression float + (var_ref col) (constant float (1.000000)) ) ) ) ()) (assign (x) (var_ref return_value) (expression float * (var_ref col) (swiz z (var_ref pos) )) ) ) ( (assign (x) (var_ref return_value) (constant float (0.000000)) ) )) (return (var_ref return_value) ) )) ) ( function col (signature float (parameters (declare (in ) vec2 c) ) ( (declare () int i) (declare () float color) (assign (x) (var_ref color) (constant float (0.000000)) ) (assign (x) (var_ref i) (constant int (1)) ) (loop ( (declare () float z) (declare () float o) (if (expression bool >= (var_ref i) (constant int (15)) ) ( break ) ()) (declare (temporary ) float rand_float_retval) (call rand_float (var_ref rand_float_retval) ((expression float / (expression float i2f (var_ref i) ) (constant float (3.000000)) ) )) (assign (x) (var_ref o) (expression float * (var_ref rand_float_retval) (constant float (15.000000)) ) ) (declare (temporary ) float rand_float_retval@150) (call rand_float (var_ref rand_float_retval@150) ((expression float + (expression float i2f (var_ref i) ) (constant float (13.000000)) ) )) (assign (x) (var_ref z) (var_ref rand_float_retval@150) ) (declare (temporary ) float rand_float_retval@151) (call rand_float (var_ref rand_float_retval@151) ((expression float floor (expression float / (expression float + (expression float * (var_ref time) (expression float / (expression float + (var_ref rand_float_retval@150) (constant float (1.000000)) ) (constant float (2.000000)) ) ) (var_ref o) ) (constant float (2.000000)) ) ) )) (declare (temporary ) vec3 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float + (constant float (1.800000)) (expression float neg (expression float * (constant float (3.600000)) (expression float + (var_ref rand_float_retval@151) (expression float / (expression float sin (expression float / (expression float * (var_ref time) (var_ref o) ) (constant float (1000.000000)) ) ) (constant float (10.000000)) ) ) ) ) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (1.000000)) (expression float neg (expression float % (expression float + (expression float * (var_ref time) (expression float / (expression float + (var_ref z) (constant float (1.000000)) ) (constant float (2.000000)) ) ) (var_ref o) ) (constant float (2.000000)) ) ) ) ) (assign (z) (var_ref vec_ctor) (var_ref z) ) (declare (temporary ) float snow_retval) (call snow (var_ref snow_retval) ((var_ref vec_ctor) (var_ref c) (var_ref o) )) (assign (x) (var_ref color) (expression float + (var_ref color) (var_ref snow_retval) ) ) (assign (x) (var_ref i) (expression int + (var_ref i) (constant int (1)) ) ) )) (return (var_ref color) ) )) ) ( function main (signature void (parameters ) ( (declare () vec2 p) (assign (xy) (var_ref uv) (expression vec2 / (swiz xy (var_ref gl_FragCoord) )(var_ref OutputSize) ) ) (assign (xy) (var_ref uv) (expression vec2 + (expression vec2 * (var_ref uv) (constant float (2.000000)) ) (constant float (-1.000000)) ) ) (assign (y) (var_ref p) (swiz y (var_ref uv) )) (assign (x) (var_ref p) (expression float * (swiz x (var_ref uv) )(expression float / (swiz x (var_ref OutputSize) )(swiz y (var_ref OutputSize) )) ) ) (assign (x) (var_ref atime) (expression float / (expression float + (var_ref time) (constant float (1.000000)) ) (constant float (4.000000)) ) ) (declare (temporary ) float col_retval) (call col (var_ref col_retval) ((var_ref p) )) (assign (xyzw) (var_ref gl_FragColor) (swiz xxxx (var_ref col_retval) )) )) ) ) GLSL IR for linked vertex program 25: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=16 shader_in ) vec3 VertexCoord) ( function main (signature void (parameters ) ( (declare (temporary ) vec4 vec_ctor) (assign (w) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (xy) (var_ref vec_ctor) (swiz xy (var_ref VertexCoord) )) (assign (z) (var_ref vec_ctor) (swiz y (var_ref VertexCoord) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked fragment program 25: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=0 uniform ) float time) (declare (location=1 uniform ) vec2 OutputSize) (declare () vec2 uv) ( function main (signature void (parameters ) ( (declare () vec2 p) (assign (xy) (var_ref uv) (expression vec2 * (swiz xy (var_ref gl_FragCoord) )(expression vec2 rcp (var_ref OutputSize) ) ) ) (assign (xy) (var_ref uv) (expression vec2 + (expression vec2 * (var_ref uv) (constant float (2.000000)) ) (constant float (-1.000000)) ) ) (assign (y) (var_ref p) (swiz y (var_ref uv) )) (assign (x) (var_ref p) (expression float * (swiz x (var_ref uv) )(expression float * (swiz x (var_ref OutputSize) )(expression float rcp (swiz y (var_ref OutputSize) )) ) ) ) (declare () int i) (declare () float color) (assign (x) (var_ref color) (constant float (0.000000)) ) (assign (x) (var_ref i) (constant int (1)) ) (loop ( (declare () float o) (if (expression bool >= (var_ref i) (constant int (15)) ) ( break ) ()) (declare (temporary ) vec2 vec_ctor) (assign (y) (var_ref vec_ctor) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor) (expression float * (expression float i2f (var_ref i) ) (expression float rcp (constant float (3.000000)) ) ) ) (assign (x) (var_ref o) (expression float * (expression float fract (expression float * (expression float sin (expression float dot (var_ref vec_ctor) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) (constant float (15.000000)) ) ) (declare (temporary ) vec2 vec_ctor@152) (assign (y) (var_ref vec_ctor@152) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor@152) (expression float + (expression float i2f (var_ref i) ) (constant float (13.000000)) ) ) (declare (temporary ) float fract_retval) (assign (x) (var_ref fract_retval) (expression float fract (expression float * (expression float sin (expression float dot (var_ref vec_ctor@152) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) ) (declare (temporary ) vec2 vec_ctor@153) (assign (y) (var_ref vec_ctor@153) (constant float (1.000000)) ) (assign (x) (var_ref vec_ctor@153) (expression float floor (expression float * (expression float + (expression float * (var_ref time) (expression float * (expression float + (var_ref fract_retval) (constant float (1.000000)) ) (expression float rcp (constant float (2.000000)) ) ) ) (var_ref o) ) (expression float rcp (constant float (2.000000)) ) ) ) ) (declare (temporary ) vec3 vec_ctor@154) (assign (x) (var_ref vec_ctor@154) (expression float + (constant float (1.800000)) (expression float neg (expression float * (constant float (3.600000)) (expression float + (expression float fract (expression float * (expression float sin (expression float dot (var_ref vec_ctor@153) (constant vec2 (12.989800 78.233002)) ) ) (constant float (43758.546875)) ) ) (expression float * (expression float sin (expression float * (expression float * (var_ref time) (var_ref o) ) (expression float rcp (constant float (1000.000000)) ) ) ) (expression float rcp (constant float (10.000000)) ) ) ) ) ) ) ) (assign (y) (var_ref vec_ctor@154) (expression float + (constant float (1.000000)) (expression float neg (expression float % (expression float + (expression float * (var_ref time) (expression float * (expression float + (var_ref fract_retval) (constant float (1.000000)) ) (expression float rcp (constant float (2.000000)) ) ) ) (var_ref o) ) (constant float (2.000000)) ) ) ) ) (assign (z) (var_ref vec_ctor@154) (var_ref fract_retval) ) (declare (temporary ) float return_value) (declare (temporary ) vec2 assignment_tmp) (assign (xy) (var_ref assignment_tmp) (expression vec2 + (swiz xy (var_ref vec_ctor@154) )(expression vec2 neg (var_ref p) ) ) ) (declare (temporary ) bool flip) (assign (x) (var_ref flip) (expression bool >= (constant float (0.000000)) (swiz x (var_ref assignment_tmp) )) ) (declare (temporary ) float s) (assign (x) (var_ref s) (expression float csel (var_ref flip) (expression float abs (swiz x (var_ref assignment_tmp) )) (swiz y (var_ref assignment_tmp) )) ) (declare (temporary ) float t) (assign (x) (var_ref t) (expression float csel (var_ref flip) (swiz y (var_ref assignment_tmp) )(expression float abs (swiz x (var_ref assignment_tmp) )) ) ) (declare (temporary ) float scale) (assign (x) (var_ref scale) (expression float csel (expression bool >= (expression float abs (var_ref t) ) (constant float (1.000000e+18)) ) (constant float (0.250000)) (constant float (1.000000)) ) ) (declare (temporary ) float rcp_scaled_t) (assign (x) (var_ref rcp_scaled_t) (expression float rcp (expression float * (var_ref t) (var_ref scale) ) ) ) (declare (temporary ) float arc) (declare (temporary ) float atan_x) (assign (x) (var_ref atan_x) (expression float * (expression float min (expression float abs (expression float csel (expression bool == (expression float abs (swiz x (var_ref assignment_tmp) )) (expression float abs (swiz y (var_ref assignment_tmp) )) ) (constant float (1.000000)) (expression float abs (expression float * (expression float * (var_ref s) (var_ref scale) ) (var_ref rcp_scaled_t) ) ) ) ) (constant float (1.000000)) ) (expression float rcp (expression float max (expression float abs (expression float csel (expression bool == (expression float abs (swiz x (var_ref assignment_tmp) )) (expression float abs (swiz y (var_ref assignment_tmp) )) ) (constant float (1.000000)) (expression float abs (expression float * (expression float * (var_ref s) (var_ref scale) ) (var_ref rcp_scaled_t) ) ) ) ) (constant float (1.000000)) ) ) ) ) (declare (temporary ) float atan_tmp) (assign (x) (var_ref atan_tmp) (expression float * (var_ref atan_x) (var_ref atan_x) ) ) (assign (x) (var_ref atan_tmp) (expression float * (expression float + (expression float * (expression float + (expression float * (expression float + (expression float * (expression float + (expression float * (expression float + (expression float * (constant float (-0.012132)) (var_ref atan_tmp) ) (constant float (0.053681)) ) (var_ref atan_tmp) ) (constant float (-0.117350)) ) (var_ref atan_tmp) ) (constant float (0.193892)) ) (var_ref atan_tmp) ) (constant float (-0.332676)) ) (var_ref atan_tmp) ) (constant float (0.999979)) ) (var_ref atan_x) ) ) (assign (x) (var_ref atan_tmp) (expression float + (var_ref atan_tmp) (expression float * (expression float b2f (expression bool < (constant float (1.000000)) (expression float abs (expression float csel (expression bool == (expression float abs (swiz x (var_ref assignment_tmp) )) (expression float abs (swiz y (var_ref assignment_tmp) )) ) (constant float (1.000000)) (expression float abs (expression float * (expression float * (var_ref s) (var_ref scale) ) (var_ref rcp_scaled_t) ) ) ) ) ) ) (expression float + (expression float * (var_ref atan_tmp) (constant float (-2.000000)) ) (constant float (1.570796)) ) ) ) ) (assign (x) (var_ref arc) (expression float * (var_ref atan_tmp) (expression float sign (expression float csel (expression bool == (expression float abs (swiz x (var_ref assignment_tmp) )) (expression float abs (swiz y (var_ref assignment_tmp) )) ) (constant float (1.000000)) (expression float abs (expression float * (expression float * (var_ref s) (var_ref scale) ) (var_ref rcp_scaled_t) ) ) ) ) ) ) (assign (x) (var_ref arc) (expression float + (var_ref arc) (expression float * (expression float b2f (var_ref flip) ) (constant float (1.570796)) ) ) ) (declare (temporary ) float assignment_tmp@155) (assign (x) (var_ref assignment_tmp@155) (expression float + (expression float csel (expression bool < (expression float min (swiz y (var_ref assignment_tmp) )(var_ref rcp_scaled_t) ) (constant float (0.000000)) ) (expression float neg (var_ref arc) ) (var_ref arc) ) (expression float * (expression float sin (expression float + (var_ref time) (var_ref o) ) ) (constant float (10.000000)) ) ) ) (declare (temporary ) float assignment_tmp@156) (assign (x) (var_ref assignment_tmp@156) (expression float + (expression float * (swiz x (var_ref assignment_tmp) )(swiz x (var_ref assignment_tmp) )) (expression float * (swiz y (var_ref assignment_tmp) )(swiz y (var_ref assignment_tmp) )) ) ) (if (expression bool < (var_ref assignment_tmp@156) (expression float * (var_ref fract_retval) (expression float rcp (constant float (400.000000)) ) ) ) ( (declare () float col) (assign (x) (var_ref col) (constant float (0.000000)) ) (declare (temporary ) float sin_retval) (assign (x) (var_ref sin_retval) (expression float sin (expression float * (var_ref assignment_tmp@155) (constant float (8.000000)) ) ) ) (if (expression bool < (var_ref sin_retval) (constant float (0.000000)) ) ( (assign (x) (var_ref col) (constant float (1.000000)) ) ) ()) (if (expression bool < (var_ref assignment_tmp@156) (expression float * (var_ref fract_retval) (expression float rcp (constant float (800.000000)) ) ) ) ( (assign (x) (var_ref col) (expression float + (var_ref col) (constant float (1.000000)) ) ) ) ()) (assign (x) (var_ref return_value) (expression float * (var_ref col) (var_ref fract_retval) ) ) ) ( (assign (x) (var_ref return_value) (constant float (0.000000)) ) )) (assign (x) (var_ref color) (expression float + (var_ref color) (var_ref return_value) ) ) (assign (x) (var_ref i) (expression int + (var_ref i) (constant int (1)) ) ) )) (assign (xyzw) (var_ref gl_FragColor) (swiz xxxx (var_ref color) )) )) ) ) GLSL vertex shader 0 source for linked program 25: #define VERTEX #define PARAMETER_UNIFORM attribute vec3 VertexCoord; uniform float time; void main() { vec3 v = vec3(VertexCoord.x, 0.0, VertexCoord.y); vec3 v2 = v; v.y = v.z; gl_Position = vec4(VertexCoord.x, VertexCoord.y, VertexCoord.y, 1.0); } GLSL fragment shader 1 source for linked program 25: #define FRAGMENT #define PARAMETER_UNIFORM uniform float time; uniform vec2 OutputSize; vec2 uv; float atime; float rand(vec2 co) { return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453); } float rand_float(float x) { return rand(vec2(x, 1.0)); } float snow(vec3 pos, vec2 uv, float o) { vec2 d = (pos.xy - uv); float a = atan(d.y,d.x) + sin(time*1.0 + o) * 10.0; float dist = d.x*d.x + d.y*d.y; if(dist < pos.z/400.0) { float col = 0.0; if(sin(a * 8.0) < 0.0) { col=1.0; } if(dist < pos.z/800.0) { col+=1.0; } return col * pos.z; } return 0.0; } float col(vec2 c) { float color = 0.0; for (int i = 1; i < 15; i++) { float o = rand_float(float(i) / 3.0) * 15.0; float z = rand_float(float(i) + 13.0); float x = 1.8 - (3.6) * (rand_float(floor((time*((z + 1.0) / 2.0) +o) / 2.0)) + sin(time * o /1000.0) / 10.0); float y = 1.0 - mod((time * ((z + 1.0)/2.0)) + o, 2.0); color += snow(vec3(x,y,z), c, o); } return color; } void main(void) { uv = gl_FragCoord.xy / OutputSize.xy; uv = uv * 2.0 - 1.0; vec2 p = uv; p.x *= OutputSize.x / OutputSize.y; atime = (time + 1.0) / 4.0; gl_FragColor = vec4(col(p)); } Failed to open /home/diego/.config/retroarch/assets/xmb/monochrome/font.ttf: No such file or directory Failed to open /home/diego/.config/retroarch/assets/xmb/monochrome/font.ttf: No such file or directory Creating dir: /home/diego/roms/bios/dc/data context_reset. Linux paging: 00001000 00001000 00000FFF MAP 00800000 w/ 25165824 MAP 20000000 w/ 25165824 MAP 04000000 w/ 16777216 MAP 06000000 w/ 16777216 MAP 0C000000 w/ 0 A8 vmem reserve: base: F7E00000, aram: 17e00000, vram: FBE00000, ram: 03E00000 Resetting mem Mem alloc successful!Loaded /home/diego/roms/bios/dc/dc_boot.bin as bootrom Loaded /home/diego/roms/bios/dc/dc_nvmem.bin as nvram Sh4 Reset recSh4 Init Freeing fpcb ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float sp_ShaderColor) ( function main (signature void (parameters ) ( (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (var_ref sp_ShaderColor) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL IR for linked vertex program 30: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) GLSL IR for linked fragment program 30: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) float sp_ShaderColor) ( function main (signature void (parameters ) ( (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (var_ref sp_ShaderColor) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vec_ctor) ) )) ) ) GLSL vertex shader 0 source for linked program 30: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 30: uniform float sp_ShaderColor; /* Vertex input*/ void main() { float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=vec4(0.0, 0.0, 0.0, sp_ShaderColor); } Session 1 has 1 track(s) Saving Track: 1 Type: Mode2/2336 Pregap: 150 Size: 33600 LBA: 0 Track position: 350400 Session 2 has 1 track(s) Saving Track: 2 Type: Mode2/2336 Pregap: 150 Size: 313636 LBA: 45000 Track position: 79190400 gdrom: Opened image "/home/diego/roms/Resident Evil - Code - Veronica (USA)(Disc 1 of 2)[RDC].cdi" Initialising empty vmu... Initialising empty vmu... Initialising empty vmu... Sh4 Reset reios: IP.bin is 'SEGA SEGAKATANA SEGA ENTERPRISES5EE7 GD-ROM1/2 JUE 0799A10 T1204N V1.00020000223 1ST_READ.BIN SEGA LC-T-12 RESIDENT EVIL CODE VERONICA ' reios: Hardware ID is: SEGA SEGAKATANA reios: Maker ID is: SEGA ENTERPRISES reios: Device info is: 5EE7 GD-ROM1/2 reios: Area symbols is: JUE reios: Peripherals is: 0799A10 reios: Product number is: T1204N reios: Product version is: V1.000 reios: Release date is: 20000223 reios: Boot filename is: 1ST_READ.BIN reios: Software company is: SEGA LC-T-12 reios: Software name is: RESIDENT EVIL CODE VERONICA reios: loading ip.bin from FAD: 45150 reios: bootfile is '1ST_READ.BIN ' reios: iso9660 PVD found reios: iso9660 root_directory, FAD: 45173, len: 8192 Found 1ST_READ.BIN at 000065 filename len: 14 file LBA: 48099 file LEN: 3915142 Get MemPtr unsupported area : addr=0xA0000000 Get MemPtr unsupported area : addr=0xA0000018 Freeing fpcb Get MemPtr unsupported area : addr=0x80000080 Get MemPtr unsupported area : addr=0x800000A8 Get MemPtr unsupported area : addr=0x800000BE Get MemPtr unsupported area : addr=0x800000C6 Freeing fpcb Invalid GD-DMA start, SB_GDEN=0.Ingoring it. sh4io: Invalid read access @@ 00000030 Freeing fpcb Invalid GD-DMA start, SB_GDEN=0.Ingoring it. Freeing fpcb Freeing fpcb new tactx new tactx ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (location=16 shader_in ) vec4 position) ( function main (signature void (parameters ) ( (assign (xyzw) (var_ref gl_Position) (var_ref position) ) )) ) ) ( (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (location=0 uniform ) vec4 color) ( function main (signature void (parameters ) ( (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program -1: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=16 shader_in ) vec4 position) ( function main (signature void (parameters ) ( (assign (xyzw) (var_ref gl_Position) (var_ref position) ) )) ) ) GLSL IR for linked fragment program -1: ( (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=0 uniform ) vec4 color) ( function main (signature void (parameters ) ( (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program -1: #extension GL_AMD_vertex_shader_layer : enable #extension GL_ARB_draw_instanced : enable #extension GL_ARB_explicit_attrib_location :enable layout(location = 0) in vec4 position; void main() { #ifdef GL_AMD_vertex_shader_layer gl_Layer = gl_InstanceID; #endif gl_Position = position; } GLSL fragment shader 1 source for linked program -1: #extension GL_ARB_explicit_attrib_location :enable #extension GL_ARB_explicit_uniform_location :enable layout(location = 0) uniform vec4 color; void main() { gl_FragColor = color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 33: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) GLSL IR for linked fragment program 33: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 33: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 33: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 0 #define pp_Texture 0 #define pp_IgnoreTexA 0 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 2 #define pp_Gouraud 1 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 36: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=32 shader_out ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) (declare (location=19 shader_in ) vec2 in_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) )) ) ) GLSL IR for linked fragment program 36: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=32 shader_in ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) sampler2D tex) (declare (location=2 uniform ) float trilinear_alpha) ( function main (signature void (parameters ) ( (assign (xy) (var_ref vtx_uv) (var_ref packed:vtx_uv) ) (declare () vec4 color) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 36: #version 120 #define pp_Gouraud 0 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 36: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 1 #define pp_Texture 1 #define pp_IgnoreTexA 0 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 2 #define pp_Gouraud 0 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 39: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) GLSL IR for linked fragment program 39: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 39: #version 120 #define pp_Gouraud 0 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 39: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 0 #define pp_Texture 0 #define pp_IgnoreTexA 1 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 2 #define pp_Gouraud 0 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } Freeing fpcb Freeing fpcb Freeing fpcb Freeing fpcb ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 42: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=32 shader_out ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) (declare (location=19 shader_in ) vec2 in_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) )) ) ) GLSL IR for linked fragment program 42: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=32 shader_in ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) sampler2D tex) (declare (location=2 uniform ) float trilinear_alpha) ( function main (signature void (parameters ) ( (assign (xy) (var_ref vtx_uv) (var_ref packed:vtx_uv) ) (declare () vec4 color) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 42: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 42: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 1 #define pp_Texture 1 #define pp_IgnoreTexA 0 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 2 #define pp_Gouraud 1 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vtx_base) ) )) ) ) GLSL IR for linked vertex program 45: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) GLSL IR for linked fragment program 45: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) ( function main (signature void (parameters ) ( (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vtx_base) ) )) ) ) GLSL vertex shader 0 source for linked program 45: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 45: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 1 #define pp_Texture 0 #define pp_IgnoreTexA 0 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 2 #define pp_Gouraud 1 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vtx_base) ) )) ) ) GLSL IR for linked vertex program 48: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) GLSL IR for linked fragment program 48: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) ( function main (signature void (parameters ) ( (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref vtx_base) ) )) ) ) GLSL vertex shader 0 source for linked program 48: #version 120 #define pp_Gouraud 0 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 48: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 1 #define pp_Texture 0 #define pp_IgnoreTexA 0 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 2 #define pp_Gouraud 0 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } Freeing fpcb Freeing fpcb Freeing fpcb Freeing fpcb Freeing fpcb Freeing fpcb Freeing fpcb Freeing fpcb Freeing fpcb Freeing fpcb ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 texcol) (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (xyz) (var_ref texcol) (swiz xyz (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () ))) (assign (w) (var_ref texcol) (constant float (1.000000)) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref texcol) ) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 51: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=32 shader_out ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) (declare (location=19 shader_in ) vec2 in_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) )) ) ) GLSL IR for linked fragment program 51: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=32 shader_in ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) sampler2D tex) (declare (location=2 uniform ) float trilinear_alpha) ( function main (signature void (parameters ) ( (assign (xy) (var_ref vtx_uv) (var_ref packed:vtx_uv) ) (declare () vec4 texcol) (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (xyz) (var_ref texcol) (swiz xyz (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () ))) (assign (w) (var_ref texcol) (constant float (1.000000)) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref texcol) ) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 51: #version 120 #define pp_Gouraud 0 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 51: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 0 #define pp_Texture 1 #define pp_IgnoreTexA 1 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 2 #define pp_Gouraud 0 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 color) (declare (temporary ) vec4 texture2D_retval) (assign (xyzw) (var_ref texture2D_retval) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyz) (var_ref color) (expression vec3 * (swiz xyz (var_ref color) )(swiz xyz (var_ref texture2D_retval) )) ) (assign (w) (var_ref color) (swiz w (var_ref texture2D_retval) )) (assign (xyz) (var_ref color) (expression vec3 + (swiz xyz (var_ref color) )(swiz xyz (var_ref vtx_offs) )) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 54: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=32 shader_out ) vec4 vtx_offs) (declare (location=33 shader_out ) vec2 packed:vtx_uv) (declare (location=33 ) vec2 vtx_uv) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) (declare (location=18 shader_in ) vec4 in_offs) (declare (location=19 shader_in ) vec2 in_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) )) ) ) GLSL IR for linked fragment program 54: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=32 shader_in ) vec4 vtx_offs) (declare (location=33 shader_in ) vec2 packed:vtx_uv) (declare (location=33 ) vec2 vtx_uv) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) sampler2D tex) (declare (location=2 uniform ) float trilinear_alpha) ( function main (signature void (parameters ) ( (assign (xy) (var_ref vtx_uv) (var_ref packed:vtx_uv) ) (declare () vec4 color) (declare (temporary ) vec4 texture2D_retval) (assign (xyzw) (var_ref texture2D_retval) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyz) (var_ref color) (expression vec3 * (swiz xyz (var_ref color) )(swiz xyz (var_ref texture2D_retval) )) ) (assign (w) (var_ref color) (swiz w (var_ref texture2D_retval) )) (assign (xyz) (var_ref color) (expression vec3 + (swiz xyz (var_ref color) )(swiz xyz (var_ref vtx_offs) )) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 54: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 54: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 1 #define pp_Texture 1 #define pp_IgnoreTexA 0 #define pp_ShadInstr 1 #define pp_Offset 1 #define pp_FogCtrl 2 #define pp_Gouraud 1 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 texcol) (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (xyz) (var_ref texcol) (swiz xyz (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () ))) (assign (w) (var_ref texcol) (constant float (1.000000)) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref texcol) ) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 57: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=32 shader_out ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) (declare (location=19 shader_in ) vec2 in_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) )) ) ) GLSL IR for linked fragment program 57: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=32 shader_in ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) sampler2D tex) (declare (location=2 uniform ) float trilinear_alpha) ( function main (signature void (parameters ) ( (assign (xy) (var_ref vtx_uv) (var_ref packed:vtx_uv) ) (declare () vec4 texcol) (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (xyz) (var_ref texcol) (swiz xyz (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () ))) (assign (w) (var_ref texcol) (constant float (1.000000)) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref texcol) ) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 57: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 57: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 0 #define pp_Texture 1 #define pp_IgnoreTexA 1 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 2 #define pp_Gouraud 1 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 texcol) (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (xyz) (var_ref texcol) (swiz xyz (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () ))) (assign (w) (var_ref texcol) (constant float (1.000000)) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref texcol) ) ) (declare (temporary ) float fog_mode2_retval) (call fog_mode2 (var_ref fog_mode2_retval) ((swiz w (var_ref gl_FragCoord) ))) (assign (xyz) (var_ref color) (expression vec3 lrp (swiz xyz (var_ref color) )(var_ref sp_FOG_COL_RAM) (var_ref fog_mode2_retval) ) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 60: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=32 shader_out ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) (declare (location=19 shader_in ) vec2 in_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) )) ) ) GLSL IR for linked fragment program 60: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=32 shader_in ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) vec3 sp_FOG_COL_RAM) (declare (location=2 uniform ) float sp_FOG_DENSITY) (declare (location=3 uniform ) sampler2D tex) (declare (location=4 uniform ) sampler2D fog_table) (declare (location=5 uniform ) float trilinear_alpha) ( function main (signature void (parameters ) ( (assign (xy) (var_ref vtx_uv) (var_ref packed:vtx_uv) ) (declare () vec4 texcol) (declare () vec4 color) (assign (xyz) (var_ref color) (swiz xyz (var_ref vtx_base) )) (assign (w) (var_ref color) (constant float (1.000000)) ) (assign (xyz) (var_ref texcol) (swiz xyz (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () ))) (assign (w) (var_ref texcol) (constant float (1.000000)) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (var_ref texcol) ) ) (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (swiz w (var_ref gl_FragCoord) )(var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float * (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float rcp (expression float exp2 (var_ref floor_retval) ) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float * (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (expression float rcp (constant float (128.000000)) ) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float * (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (expression float rcp (constant float (2.000000)) ) ) ) ) ) (assign (xyz) (var_ref color) (expression vec3 lrp (swiz xyz (var_ref color) )(var_ref sp_FOG_COL_RAM) (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 60: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 60: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 0 #define pp_Texture 1 #define pp_IgnoreTexA 1 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 0 #define pp_Gouraud 1 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) ) (declare (temporary ) float fog_mode2_retval) (call fog_mode2 (var_ref fog_mode2_retval) ((swiz w (var_ref gl_FragCoord) ))) (assign (xyz) (var_ref color) (expression vec3 lrp (swiz xyz (var_ref color) )(var_ref sp_FOG_COL_RAM) (var_ref fog_mode2_retval) ) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 63: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=32 shader_out ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) (declare (location=19 shader_in ) vec2 in_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) )) ) ) GLSL IR for linked fragment program 63: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=32 shader_in ) vec2 packed:vtx_uv) (declare (location=32 ) vec2 vtx_uv) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) vec3 sp_FOG_COL_RAM) (declare (location=2 uniform ) float sp_FOG_DENSITY) (declare (location=3 uniform ) sampler2D tex) (declare (location=4 uniform ) sampler2D fog_table) (declare (location=5 uniform ) float trilinear_alpha) ( function main (signature void (parameters ) ( (assign (xy) (var_ref vtx_uv) (var_ref packed:vtx_uv) ) (declare () vec4 color) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) ) (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (swiz w (var_ref gl_FragCoord) )(var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float * (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float rcp (expression float exp2 (var_ref floor_retval) ) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float * (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (expression float rcp (constant float (128.000000)) ) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float * (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (expression float rcp (constant float (2.000000)) ) ) ) ) ) (assign (xyz) (var_ref color) (expression vec3 lrp (swiz xyz (var_ref color) )(var_ref sp_FOG_COL_RAM) (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 63: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 63: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 1 #define pp_Texture 1 #define pp_IgnoreTexA 0 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 0 #define pp_Gouraud 1 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (xyzw) (var_ref color) (var_ref vtx_base) ) (declare (temporary ) float fog_mode2_retval) (call fog_mode2 (var_ref fog_mode2_retval) ((swiz w (var_ref gl_FragCoord) ))) (assign (xyz) (var_ref color) (expression vec3 lrp (swiz xyz (var_ref color) )(var_ref sp_FOG_COL_RAM) (var_ref fog_mode2_retval) ) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 66: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) GLSL IR for linked fragment program 66: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) vec3 sp_FOG_COL_RAM) (declare (location=2 uniform ) float sp_FOG_DENSITY) (declare (location=3 uniform ) sampler2D fog_table) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (w) (var_ref color) (swiz w (var_ref vtx_base) )) (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (swiz w (var_ref gl_FragCoord) )(var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float * (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float rcp (expression float exp2 (var_ref floor_retval) ) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float * (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (expression float rcp (constant float (128.000000)) ) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float * (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (expression float rcp (constant float (2.000000)) ) ) ) ) ) (assign (xyz) (var_ref color) (expression vec3 lrp (swiz xyz (var_ref vtx_base) )(var_ref sp_FOG_COL_RAM) (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 66: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 66: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 1 #define pp_Texture 0 #define pp_IgnoreTexA 0 #define pp_ShadInstr 3 #define pp_Offset 0 #define pp_FogCtrl 0 #define pp_Gouraud 1 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } ( (declare (location=0 shader_in ) vec4 gl_Vertex) (declare (location=14 shader_out ) vec4 gl_BackSecondaryColor) (declare (location=2 shader_out ) vec4 gl_FrontSecondaryColor) (declare (location=13 shader_out ) vec4 gl_BackColor) (declare (location=1 shader_out ) vec4 gl_FrontColor) (declare (location=16 shader_out ) vec4 gl_ClipVertex) (declare (location=3 shader_out ) float gl_FogFragCoord) (declare (location=4 shader_out ) (array vec4 0) gl_TexCoord) (declare (location=12 shader_out ) float gl_PointSize) (declare (location=0 shader_out ) vec4 gl_Position) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) vec4 scale) (declare (shader_in ) vec4 in_pos) (declare (shader_in ) vec4 in_base) (declare (shader_in ) vec4 in_offs) (declare (shader_in ) vec2 in_uv) (declare (shader_out ) vec4 vtx_base) (declare (shader_out ) vec4 vtx_offs) (declare (shader_out ) vec2 vtx_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) )) ) ) ( (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=25 shader_in ) vec2 gl_PointCoord) (declare (location=24 shader_in ) bool gl_FrontFacing) (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=2 shader_in ) vec4 gl_SecondaryColor) (declare (location=1 shader_in ) vec4 gl_Color) (declare (location=3 shader_in ) float gl_FogFragCoord) (declare (location=4 shader_in ) (array vec4 0) gl_TexCoord) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) float cp_AlphaTestValue) (declare (uniform ) vec4 pp_ClipTest) (declare (uniform ) vec3 sp_FOG_COL_RAM) (declare (uniform ) vec3 sp_FOG_COL_VERT) (declare (uniform ) float sp_FOG_DENSITY) (declare (uniform ) sampler2D tex) (declare (uniform ) sampler2D fog_table) (declare (uniform ) float trilinear_alpha) (declare (shader_in ) vec4 vtx_base) (declare (shader_in ) vec4 vtx_offs) (declare (shader_in ) vec2 vtx_uv) ( function fog_mode2 (signature float (parameters (declare (in ) float w) ) ( (declare (temporary ) float clamp_retval) (assign (x) (var_ref clamp_retval) (expression float min (expression float max (expression float * (var_ref w) (var_ref sp_FOG_DENSITY) ) (constant float (1.000000)) ) (constant float (255.999893)) ) ) (declare (temporary ) float floor_retval) (assign (x) (var_ref floor_retval) (expression float floor (expression float log2 (var_ref clamp_retval) ) ) ) (declare (temporary ) float assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression float + (expression float / (expression float * (var_ref clamp_retval) (constant float (16.000000)) ) (expression float exp2 (var_ref floor_retval) ) ) (constant float (-16.000000)) ) ) (declare (temporary ) vec2 vec_ctor) (assign (x) (var_ref vec_ctor) (expression float / (expression float + (expression float + (expression float floor (var_ref assignment_tmp) ) (expression float * (var_ref floor_retval) (constant float (16.000000)) ) ) (constant float (0.500000)) ) (constant float (128.000000)) ) ) (assign (y) (var_ref vec_ctor) (expression float + (constant float (0.750000)) (expression float neg (expression float / (expression float + (var_ref assignment_tmp) (expression float neg (expression float floor (var_ref assignment_tmp) ) ) ) (constant float (2.000000)) ) ) ) ) (return (swiz w (tex vec4 (var_ref fog_table) (var_ref vec_ctor) 0 1 () ))) )) ) ( function main (signature void (parameters ) ( (declare () vec4 color) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) ) (assign (xyz) (var_ref color) (expression vec3 + (swiz xyz (var_ref color) )(swiz xyz (var_ref vtx_offs) )) ) (assign (x) (var_ref gl_FragDepth) (expression float / (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (constant float (34.000000)) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL IR for linked vertex program 69: ( (declare (location=0 shader_out ) vec4 gl_Position) (declare (location=31 shader_out ) vec4 vtx_base) (declare (location=32 shader_out ) vec4 vtx_offs) (declare (location=33 shader_out ) vec2 packed:vtx_uv) (declare (location=33 ) vec2 vtx_uv) (declare (location=0 uniform ) vec4 scale) (declare (location=16 shader_in ) vec4 in_pos) (declare (location=17 shader_in ) vec4 in_base) (declare (location=18 shader_in ) vec4 in_offs) (declare (location=19 shader_in ) vec2 in_uv) ( function main (signature void (parameters ) ( (declare () vec4 vpos) (assign (xyzw) (var_ref vtx_base) (var_ref in_base) ) (assign (xyzw) (var_ref vtx_offs) (var_ref in_offs) ) (assign (xy) (var_ref vtx_uv) (var_ref in_uv) ) (assign (xyz) (var_ref vpos) (swiz xyz (var_ref in_pos) )) (assign (w) (var_ref vpos) (expression float rcp (swiz z (var_ref in_pos) )) ) (if (expression bool < (swiz w (var_ref vpos) )(constant float (0.000000)) ) ( (declare (temporary ) vec4 vec_ctor) (assign (xyz) (var_ref vec_ctor) (constant vec3 (0.000000 0.000000 0.000000)) ) (assign (w) (var_ref vec_ctor) (swiz w (var_ref vpos) )) (assign (xyzw) (var_ref gl_Position) (var_ref vec_ctor) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) (return) ) ()) (assign (z) (var_ref vpos) (swiz w (var_ref vpos) )) (assign (xy) (var_ref vpos) (expression vec2 + (expression vec2 * (swiz xy (var_ref in_pos) )(swiz xy (var_ref scale) )) (expression vec2 neg (swiz zw (var_ref scale) )) ) ) (assign (xy) (var_ref vpos) (expression vec2 * (swiz xy (var_ref vpos) )(swiz w (var_ref vpos) )) ) (assign (xyzw) (var_ref gl_Position) (var_ref vpos) ) (assign (xy) (var_ref packed:vtx_uv) (var_ref vtx_uv) ) )) ) ) GLSL IR for linked fragment program 69: ( (declare (location=0 shader_in ) vec4 gl_FragCoord) (declare (location=31 shader_in ) vec4 vtx_base) (declare (location=32 shader_in ) vec4 vtx_offs) (declare (location=33 shader_in ) vec2 packed:vtx_uv) (declare (location=33 ) vec2 vtx_uv) (declare (location=0 shader_out ) float gl_FragDepth) (declare (location=2 shader_out ) vec4 gl_FragColor) (declare (location=1 uniform ) sampler2D tex) (declare (location=2 uniform ) float trilinear_alpha) ( function main (signature void (parameters ) ( (assign (xy) (var_ref vtx_uv) (var_ref packed:vtx_uv) ) (declare () vec4 color) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref vtx_base) (var_ref trilinear_alpha) ) ) (assign (xyzw) (var_ref color) (expression vec4 * (var_ref color) (tex vec4 (var_ref tex) (var_ref vtx_uv) 0 1 () )) ) (assign (xyz) (var_ref color) (expression vec3 + (swiz xyz (var_ref color) )(swiz xyz (var_ref vtx_offs) )) ) (assign (x) (var_ref gl_FragDepth) (expression float * (expression float log2 (expression float + (constant float (1.000000)) (expression float * (swiz w (var_ref gl_FragCoord) )(constant float (100000.000000)) ) ) ) (expression float rcp (constant float (34.000000)) ) ) ) (assign (xyzw) (var_ref gl_FragColor) (var_ref color) ) )) ) ) GLSL vertex shader 0 source for linked program 69: #version 120 #define pp_Gouraud 1 #define INTERPOLATION /* Vertex constants*/ uniform vec4 scale; /* Vertex input */ attribute vec4 in_pos; attribute vec4 in_base; attribute vec4 in_offs; attribute vec2 in_uv; /* output */ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; void main() { vtx_base=in_base; vtx_offs=in_offs; vtx_uv=in_uv; vec4 vpos=in_pos; vpos.w=1.0/vpos.z; if (vpos.w < 0.0) { gl_Position = vec4(0.0, 0.0, 0.0, vpos.w); return; } vpos.z = vpos.w; vpos.xy=vpos.xy*scale.xy-scale.zw; vpos.xy*=vpos.w; gl_Position = vpos; } GLSL fragment shader 1 source for linked program 69: #version 120 #define cp_AlphaTest 0 #define pp_ClipTestMode 0 #define pp_UseAlpha 1 #define pp_Texture 1 #define pp_IgnoreTexA 0 #define pp_ShadInstr 3 #define pp_Offset 1 #define pp_FogCtrl 2 #define pp_Gouraud 1 #define INTERPOLATION #define pp_BumpMap 0 #define PI 3.1415926 /* Shader program params*/ /* gles has no alpha test stage, so its emulated on the shader */ uniform float cp_AlphaTestValue; uniform vec4 pp_ClipTest; uniform vec3 sp_FOG_COL_RAM,sp_FOG_COL_VERT; uniform float sp_FOG_DENSITY; uniform sampler2D tex,fog_table; uniform float trilinear_alpha; /* Vertex input*/ INTERPOLATION varying vec4 vtx_base; INTERPOLATION varying vec4 vtx_offs; varying vec2 vtx_uv; float fog_mode2( float w) { float z = clamp(w * sp_FOG_DENSITY, 1.0, 255.9999); float exp = floor(log2(z)); float m = z * 16.0 / pow(2.0, exp) - 16.0; float idx = floor(m) + exp * 16.0 + 0.5; vec4 fog_coef = texture2D(fog_table, vec2(idx / 128.0, 0.75 - (m - floor(m)) / 2.0)); return fog_coef.a; } void main() { // Clip outside the box #if pp_ClipTestMode==1 if (gl_FragCoord.x < pp_ClipTest.x || gl_FragCoord.x > pp_ClipTest.z || gl_FragCoord.y < pp_ClipTest.y || gl_FragCoord.y > pp_ClipTest.w) discard; #endif // Clip inside the box #if pp_ClipTestMode==-1 if (gl_FragCoord.x >= pp_ClipTest.x && gl_FragCoord.x <= pp_ClipTest.z && gl_FragCoord.y >= pp_ClipTest.y && gl_FragCoord.y <= pp_ClipTest.w) discard; #endif vec4 color=vtx_base; #if pp_UseAlpha==0 color.a=1.0; #endif #if pp_FogCtrl==3 color=vec4(sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); #endif #if pp_Texture==1 { vec4 texcol=texture2D(tex, vtx_uv); #if pp_BumpMap == 1 float s = PI / 2.0 * (texcol.a * 15.0 * 16.0 + texcol.r * 15.0) / 255.0; float r = 2.0 * PI * (texcol.g * 15.0 * 16.0 + texcol.b * 15.0) / 255.0; texcol.a = clamp(vtx_offs.a + vtx_offs.r * sin(s) + vtx_offs.g * cos(s) * cos(r - 2.0 * PI * vtx_offs.b), 0.0, 1.0); texcol.rgb = vec3(1.0, 1.0, 1.0); #else #if pp_IgnoreTexA==1 texcol.a=1.0; #endif color *= trilinear_alpha; #if cp_AlphaTest == 1 if (cp_AlphaTestValue>texcol.a) discard; #endif #endif #if pp_ShadInstr==0 { color=texcol; } #endif #if pp_ShadInstr==1 { color.rgb*=texcol.rgb; color.a=texcol.a; } #endif #if pp_ShadInstr==2 { color.rgb=mix(color.rgb,texcol.rgb,texcol.a); } #endif #if pp_ShadInstr==3 { color*=texcol; } #endif #if pp_Offset==1 && pp_BumpMap == 0 { color.rgb+=vtx_offs.rgb; if (pp_FogCtrl==1) color.rgb=mix(color.rgb,sp_FOG_COL_VERT.rgb,vtx_offs.a); } #endif } #endif #if pp_FogCtrl==0 { color.rgb=mix(color.rgb,sp_FOG_COL_RAM.rgb,fog_mode2(gl_FragCoord.w)); } #endif #if cp_AlphaTest == 1 color.a=1.0; #endif float w = gl_FragCoord.w * 100000.0; gl_FragDepth = log2(1.0 + w) / 34.0; gl_FragColor=color; } Shutting down thread pool... ...Done recSh4 Term Sh4 Term Saved /home/diego/roms/bios/dc/dc_nvmem.bin as nvmem