{ parms { } state { blend GL_ONE GL_ZERO depthmask twosided depthfunc GL_ALWAYS } 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 ); } hlsl_fp { const float3 crc = float3( 1.595794678, -0.813476563, 0 ); const float3 crb = float3( 0, -0.391448975, 2.017822266 ); const float3 adj = float3( -0.87065506, 0.529705048f, -1.081668854f ); float Y = tex2D( $binkY, fragment.texcoord0.xy ).x; float Cr = tex2D( $binkCr, fragment.texcoord0.xy ).x; float Cb = tex2D( $binkCb, fragment.texcoord0.xy ).x; float3 p = _float3( Y * 1.164123535f ); p += ( crc * Cr ) + ( crb * Cb ) + adj; result.color.xyz = p; result.color.w = 1.0; } }