{ parms { stageSort sortTrans } state { blend GL_ONE GL_ZERO 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.x = dot4( vertex.texcoord0, $sMatrix ); result.texcoord0.y = dot4( vertex.texcoord0, $tMatrix ); result.texcoord0.zw = _float2( 0.0 ); } hlsl_fp { // black level adjustment float scale = 1.0 - $cbBlackLevel.x; float bias = $cbBlackLevel.x; half4 color = tex2D( $transMap, fragment.texcoord0.xy ); result.color.xyz = saturate( color.xyz * scale + bias ); result.color.w = 0.5; } }