⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ps_bestindex.fx

📁 about the basic GA in the VC++ using GPU to
💻 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 + -