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

📄 ps_best.fx

📁 about the basic GA in the VC++ using GPU to
💻 FX
字号:


float4 PS_BestGene(float2 pos: TEXCOORD0) : COLOR
{ 
	float2 Tex = pos + float2(0.0019607843 , 0.0019607843);
	
	if(tex2D(ColorMapSamplerBestFit,Tex).r > tex2D(ColorMapSamplerBestFitSave,Tex).r)
	{
		float2 GenePos = tex2D(ColorMapSamplerBestFit,Tex).gb;
		return tex2D(ColorMapSamplerGene,GenePos);
	}
	else
	{
		return tex2D(ColorMapSamplerBestGene,Tex);
	}
 
}


technique TShader_BestGene
{
    pass P0
    {    
        Sampler[0] = (ColorMapSamplerGene);
        Sampler[1] = (ColorMapSamplerBestGene);
        Sampler[2] = (ColorMapSamplerBestFit);
        Sampler[3] = (ColorMapSamplerBestFitSave);	       
        PixelShader  = compile ps_3_0 PS_BestGene();        
    }
    
}


float4 PS_BestFit(float2 pos: TEXCOORD0) : COLOR
{ 
	float2 Tex = pos + float2(0.0019607843 , 0.0019607843);
	
	if(tex2D(ColorMapSamplerBestFit,Tex).r > tex2D(ColorMapSamplerBestFitSave,Tex).r)
	{
		
		return tex2D(ColorMapSamplerBestFit,Tex);
	}
	else
	{
		return tex2D(ColorMapSamplerBestFitSave,Tex);
	}
	
	//return float4(0,0,0,0);
 
}


technique TShader_BestFit
{
    pass P0
    {
		Sampler[0] = (ColorMapSamplerBestFit);
        Sampler[1] = (ColorMapSamplerBestFitSave);	       
        PixelShader  = compile ps_3_0 PS_BestFit();        
    }
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -