//--------------------------------------------------------- bool CFilter_Multi_Dir_Lee::On_Execute(void) { bool bResult = false, bWeighted; m_pInput = Parameters("INPUT") ->asGrid(); m_pFiltered = Parameters("RESULT") ->asGrid(); m_pStdDev = Parameters("STDDEV") ->asGrid(); m_pDirection = Parameters("DIR") ->asGrid(); bWeighted = Parameters("WEIGHTED") ->asBool(); switch( Parameters("METHOD")->asInt() ) { case 0: bResult = Get_Filter(bWeighted, true); break; case 1: bResult = Get_Filter(bWeighted, false); break; case 2: bResult = Get_Filter_Ringeler(); break; } m_pFiltered->Set_Name(CSG_String::Format(SG_T("%s [%s]"), m_pInput->Get_Name(), _TL("Lee Filter"))); if( m_pStdDev ) { m_pStdDev ->Set_Name(CSG_String::Format(SG_T("%s [%s]"), m_pInput->Get_Name(), _TL("Lee Filter - Standard Deviation"))); } if( m_pDirection ) { m_pDirection ->Set_Name(CSG_String::Format(SG_T("%s [%s]"), m_pInput->Get_Name(), _TL("Lee Filter - Direction"))); } return( bResult ); }
void Emit_initialize_sampler_state( const wrSamplerState& samplerState, mxTextWriter & tw ) { tw << MXC("\n"); Emit_source_element_comment( samplerState, tw ); tw << MXC("{\n"); tw << MXC("samplerDesc.Filter = ") << Get_Filter( samplerState.filter ) << MXC(";\n") << MXC("samplerDesc.AddressU = ") << GetTextureAddressMode( samplerState.addressU ) << MXC(";\n") << MXC("samplerDesc.AddressV = ") << GetTextureAddressMode( samplerState.addressV ) << MXC(";\n") << MXC("samplerDesc.AddressW = ") << GetTextureAddressMode( samplerState.addressW ) << MXC(";\n") << MXC("samplerDesc.MipLODBias = 0;\n") << MXC("samplerDesc.MaxAnisotropy = 1;\n") << MXC("samplerDesc.ComparisonFunc = D3D11_COMPARISON_NEVER;\n") << MXC("samplerDesc.BorderColor[0] = 1.0f;\n") << MXC("samplerDesc.BorderColor[1] = 1.0f;\n") << MXC("samplerDesc.BorderColor[2] = 1.0f;\n") << MXC("samplerDesc.BorderColor[3] = 1.0f;\n") << MXC("samplerDesc.MinLOD = -FLT_MAX;\n") << MXC("samplerDesc.MaxLOD = +FLT_MAX;\n") << MXC("\n") ; tw << MXC("}\n"); }