{ parms { stageSort sortTrans } state { blend SRC_ALPHA ONE_MINUS_SRC_ALPHA depthmask depthfunc GL_ALWAYS twosided } hlsl_vp { result.position.x = dot4( vertex.position, $mvpMatrixX ); result.position.y = dot4( vertex.position, $mvpMatrixY ); result.position.z = dot4( vertex.position, $mvpMatrixZ ); result.position.w = dot4( vertex.position, $mvpMatrixW ); result.texcoord0 = float4( vertex.texcoord0.x, vertex.texcoord0.y, 0, 0 ); result.color = swizzleColor( vertex.color ); } hlsl_fp { float2 upper = fragment.texcoord0.xy; float2 delta; delta.x = ddx( upper ).x * 0.25f; delta.y = ddy( upper ).y * 0.25f; float4 color = 0.25 * ( tex2Dbias( $transMap, float4( upper.x-delta.x, upper.y-delta.y, 0, -1 ) ) + tex2Dbias( $transMap, float4( upper.x-delta.x, upper.y+delta.y, 0, -1 ) ) + tex2Dbias( $transMap, float4( upper.x+delta.x, upper.y+delta.y, 0, -1 ) ) + tex2Dbias( $transMap, float4( upper.x+delta.x, upper.y-delta.y, 0, -1 ) ) ); // gamma correct the anti-aliasing // color.w = pow( color.w, 1.0 / 2.2 ); result.color = fragment.color; result.color.w = color.w * fragment.color.w; } }