init: sdl init: net init: game init: video init: gl Renderer: Gallium 0.4 on ATI RS690 (X.Org R300 Project) Driver: 2.1 Mesa 10.1.0 GLSL: 1.20 Rendering using the OpenGL GLSL shader path. init: console init: world init: sound init: cfg init: render init: mainloop ambientobscurance VERTEX SHADER: attribute vec4 vvertex; attribute vec2 vtexcoord0, vtexcoord1; varying vec2 texcoord0, texcoord1; void main(void) { gl_Position = vvertex; texcoord0 = vtexcoord0; texcoord1 = vtexcoord1; } ambientobscurance FRAGMENT SHADER: uniform sampler2DRect tex0; #define gdepthfetch(sampler, coords) texture2DRect(sampler, coords) #define gdepthfetchoffset(sampler, coords, offset) texture2DRectOffset(sampler, coords, offset) #define gdepthfetchproj(sampler, coords) texture2DRectProj(sampler, coords) #define gdepthfetchclamp(sampler, coords) texture2DRect(sampler, coords) uniform sampler2DRect tex1; #define gnormfetch(sampler, coords) texture2DRect(sampler, coords) #define gnormfetchoffset(sampler, coords, offset) texture2DRectOffset(sampler, coords, offset) #define gnormfetchproj(sampler, coords) texture2DRectProj(sampler, coords) #define gnormfetchclamp(sampler, coords) texture2DRect(sampler, coords) uniform vec3 gdepthscale; uniform vec3 gdepthunpackparams; uniform sampler2D tex2; uniform vec3 tapparams; uniform vec2 contrastparams; uniform vec4 offsetscale; uniform float prefilterdepth; uniform mat3 normalmatrix; #define depthtc gl_FragCoord.xy uniform vec3 gdepthpackparams; varying vec2 texcoord0, texcoord1; fragdata(0, fragcolor, vec4) void main(void) { float depth = gdepthfetch(tex0, depthtc).r; vec2 tapscale = tapparams.xy/depth; vec2 dpos = depthtc*offsetscale.xy + offsetscale.zw, pos = depth*dpos; vec3 normal = gnormfetch(tex1, texcoord0).rgb*2.0 - 1.0; float normscale = inversesqrt(dot(normal, normal)); normal *= normscale > 0.75 ? normscale : 0.0; normal = normalmatrix * normal; vec2 noise = texture2D(tex2, texcoord1).rg*2.0-1.0; float obscure = 0.0; vec2 offset0 = reflect(vec2(-0.933103, 0.025116), noise); offset0 = depthtc + tapscale * offset0; float depth0 = gdepthfetch(tex0, offset0).r; vec3 v0 = vec3(depth0*(offset0*offsetscale.xy + offsetscale.zw) - pos, depth0 - depth); float dist20 = dot(v0, v0); obscure += step(dist20, tapparams.z) * max(0.0, dot(v0, normal) + depth*1.0e-2) / (dist20 + 1.0e-5); vec2 offset1 = reflect(vec2(-0.432784, -0.989868), noise); offset1 = depthtc + tapscale * offset1; float depth1 = gdepthfetch(tex0, offset1).r; vec3 v1 = vec3(depth1*(offset1*offsetscale.xy + offsetscale.zw) - pos, depth1 - depth); float dist21 = dot(v1, v1); obscure += step(dist21, tapparams.z) * max(0.0, dot(v1, normal) + depth*1.0e-2) / (dist21 + 1.0e-5); vec2 offset2 = reflect(vec2(0.432416, -0.413800), noise); offset2 = depthtc + tapscale * offset2; float depth2 = gdepthfetch(tex0, offset2).r; vec3 v2 = vec3(depth2*(offset2*offsetscale.xy + offsetscale.zw) - pos, depth2 - depth); float dist22 = dot(v2, v2); obscure += step(dist22, tapparams.z) * max(0.0, dot(v2, normal) + depth*1.0e-2) / (dist22 + 1.0e-5); vec2 offset3 = reflect(vec2(-0.117770, 0.970336), noise); offset3 = depthtc + tapscale * offset3; float depth3 = gdepthfetch(tex0, offset3).r; vec3 v3 = vec3(depth3*(offset3*offsetscale.xy + offsetscale.zw) - pos, depth3 - depth); float dist23 = dot(v3, v3); obscure += step(dist23, tapparams.z) * max(0.0, dot(v3, normal) + depth*1.0e-2) / (dist23 + 1.0e-5); vec2 offset4 = reflect(vec2(0.837276, 0.531114), noise); offset4 = depthtc + tapscale * offset4; float depth4 = gdepthfetch(tex0, offset4).r; vec3 v4 = vec3(depth4*(offset4*offsetscale.xy + offsetscale.zw) - pos, depth4 - depth); float dist24 = dot(v4, v4); obscure += step(dist24, tapparams.z) * max(0.0, dot(v4, normal) + depth*1.0e-2) / (dist24 + 1.0e-5); obscure = pow(clamp(1.0 - contrastparams.x*obscure, 0.0, 1.0), contrastparams.y); vec2 weights = step(fwidth(depth), prefilterdepth) * (2.0*fract((gl_FragCoord.xy - 0.5)*0.5) - 0.5); obscure -= dFdx(obscure) * weights.x; obscure -= dFdy(obscure) * weights.y; fragcolor.rg = vec2(obscure, depth); } bilateral filter horizontal VERTEX SHADER: attribute vec4 vvertex; void main(void) { gl_Position = vvertex; } bilateral filter horizontal FRAGMENT SHADER: uniform sampler2DRect tex1; #define gfetch(sampler, coords) texture2DRect(sampler, coords) #define gfetchoffset(sampler, coords, offset) texture2DRectOffset(sampler, coords, offset) #define gfetchproj(sampler, coords) texture2DRectProj(sampler, coords) #define gfetchclamp(sampler, coords) texture2DRect(sampler, coords) uniform vec3 gdepthscale; uniform vec3 gdepthunpackparams; uniform sampler2DRect tex0; uniform vec2 bilateralparams; uniform vec3 gdepthpackparams; fragdata(0, fragcolor, vec4) void main(void) { #define tc gl_FragCoord.xy #define depthtc gl_FragCoord.xy #define tapvec(type, i) type(i, 0.0) #define texval(i) texture2DRect(tex0, tc + tapvec(vec2, i)) #define texvaloffset(i) texture2DRectOffset(tex0, tc, tapvec(ivec2, i)) #define depthval(i) gfetch(tex1, depthtc + tapvec(vec2, i)) #define depthvaloffset(i) gfetchoffset(tex1, depthtc, tapvec(ivec2, i)) vec2 vals = texture2DRect(tex0, tc).rg; #define color vals.x #define depth vals.y float weights = 1.0; vec2 vals0 = texval(-6.0).rg; #define color0 vals0.x #define depth0 vals0.y depth0 -= depth; float weight0 = exp2(-9.0*bilateralparams.x - depth0*depth0*bilateralparams.y); weights += weight0; color += weight0 * color0; vec2 vals1 = texval(-4.0).rg; #define color1 vals1.x #define depth1 vals1.y depth1 -= depth; float weight1 = exp2(-4.0*bilateralparams.x - depth1*depth1*bilateralparams.y); weights += weight1; color += weight1 * color1; vec2 vals2 = texval(-2.0).rg; #define color2 vals2.x #define depth2 vals2.y depth2 -= depth; float weight2 = exp2(-1.0*bilateralparams.x - depth2*depth2*bilateralparams.y); weights += weight2; color += weight2 * color2; vec2 vals3 = texval(2.0).rg; #define color3 vals3.x #define depth3 vals3.y depth3 -= depth; float weight3 = exp2(-1.0*bilateralparams.x - depth3*depth3*bilateralparams.y); weights += weight3; color += weight3 * color3; vec2 vals4 = texval(4.0).rg; #define color4 vals4.x #define depth4 vals4.y depth4 -= depth; float weight4 = exp2(-4.0*bilateralparams.x - depth4*depth4*bilateralparams.y); weights += weight4; color += weight4 * color4; vec2 vals5 = texval(6.0).rg; #define color5 vals5.x #define depth5 vals5.y depth5 -= depth; float weight5 = exp2(-9.0*bilateralparams.x - depth5*depth5*bilateralparams.y); weights += weight5; color += weight5 * color5; fragcolor.rg = vec2(color / weights, depth); } bilateral filter vertical VERTEX SHADER: attribute vec4 vvertex; void main(void) { gl_Position = vvertex; } bilateral filter vertical FRAGMENT SHADER: uniform sampler2DRect tex1; #define gfetch(sampler, coords) texture2DRect(sampler, coords) #define gfetchoffset(sampler, coords, offset) texture2DRectOffset(sampler, coords, offset) #define gfetchproj(sampler, coords) texture2DRectProj(sampler, coords) #define gfetchclamp(sampler, coords) texture2DRect(sampler, coords) uniform vec3 gdepthscale; uniform vec3 gdepthunpackparams; uniform sampler2DRect tex0; uniform vec2 bilateralparams; uniform vec3 gdepthpackparams; fragdata(0, fragcolor, vec4) void main(void) { #define tc gl_FragCoord.xy #define depthtc gl_FragCoord.xy #define tapvec(type, i) type(0.0, i) #define texval(i) texture2DRect(tex0, tc + tapvec(vec2, i)) #define texvaloffset(i) texture2DRectOffset(tex0, tc, tapvec(ivec2, i)) #define depthval(i) gfetch(tex1, depthtc + tapvec(vec2, i)) #define depthvaloffset(i) gfetchoffset(tex1, depthtc, tapvec(ivec2, i)) vec2 vals = texture2DRect(tex0, tc).rg; #define color vals.x #define depth vals.y float weights = 1.0; vec2 vals0 = texval(-6.0).rg; #define color0 vals0.x #define depth0 vals0.y depth0 -= depth; float weight0 = exp2(-9.0*bilateralparams.x - depth0*depth0*bilateralparams.y); weights += weight0; color += weight0 * color0; vec2 vals1 = texval(-4.0).rg; #define color1 vals1.x #define depth1 vals1.y depth1 -= depth; float weight1 = exp2(-4.0*bilateralparams.x - depth1*depth1*bilateralparams.y); weights += weight1; color += weight1 * color1; vec2 vals2 = texval(-2.0).rg; #define color2 vals2.x #define depth2 vals2.y depth2 -= depth; float weight2 = exp2(-1.0*bilateralparams.x - depth2*depth2*bilateralparams.y); weights += weight2; color += weight2 * color2; vec2 vals3 = texval(2.0).rg; #define color3 vals3.x #define depth3 vals3.y depth3 -= depth; float weight3 = exp2(-1.0*bilateralparams.x - depth3*depth3*bilateralparams.y); weights += weight3; color += weight3 * color3; vec2 vals4 = texval(4.0).rg; #define color4 vals4.x #define depth4 vals4.y depth4 -= depth; float weight4 = exp2(-4.0*bilateralparams.x - depth4*depth4*bilateralparams.y); weights += weight4; color += weight4 * color4; vec2 vals5 = texval(6.0).rg; #define color5 vals5.x #define depth5 vals5.y depth5 -= depth; float weight5 = exp2(-9.0*bilateralparams.x - depth5*depth5*bilateralparams.y); weights += weight5; color += weight5 * color5; fragcolor = vec4(color / weights, 0.0, 0.0, 1.0); }