28 lines
856 B
Plaintext
28 lines
856 B
Plaintext
{
|
|
parms {
|
|
stageSort sortTrans
|
|
}
|
|
state {
|
|
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, 0.0 );
|
|
result.color = swizzleColor( vertex.color );
|
|
result.texcoord1 = swizzleColor( vertex.tangent ) * _float4( 2.0 ) - _float4( 1.0 );
|
|
}
|
|
hlsl_fp {
|
|
// black level adjustment
|
|
float scale = 1.0 - $cbBlackLevel.x;
|
|
float bias = $cbBlackLevel.x;
|
|
|
|
float4 c = tex2D( $transMap, fragment.texcoord0.xy ) * fragment.color + fragment.texcoord1;
|
|
result.color.xyz = saturate( c.xyz * scale + bias ) * c.w;
|
|
result.color.w = c.w;
|
|
}
|
|
} |