?? ps_bestindex.fx
字號:
float4 PS_Sub_Max(float2 pos: TEXCOORD0) : COLOR
{
float2 Tex = pos + float2(0.0019607843 , 0.0019607843);
float temp1 = tex2D(ColorMapSamplerSub,Tex).r;
float temp2 = tex2D(ColorMapSamplerSub,Tex + float2(pw,0)).r;
float temp3 = tex2D(ColorMapSamplerSub,Tex + float2(0,ph)).r;
float temp4 = tex2D(ColorMapSamplerSub,Tex + float2(pw,ph)).r;
float3 temp = tex2D(ColorMapSamplerSub,Tex).rgb;
if(temp1 < temp2)
{
temp = tex2D(ColorMapSamplerSub,Tex + float2(pw,0)).rgb;
temp1 = temp2;
}
if(temp1 < temp3)
{
temp = tex2D(ColorMapSamplerSub,Tex + float2(0,ph)).rgb;
temp1 = temp3;
}
if(temp1 < temp4)
{
temp = tex2D(ColorMapSamplerSub,Tex + float2(pw,ph)).rgb;
temp1 = temp4;
}
return float4(temp,0);
}
technique TShader_Sub
{
pass P0
{
Sampler[0] = (ColorMapSamplerSub);
PixelShader = compile ps_2_0 PS_Sub_Max();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -