当前位置: 首页>>代码示例>>C++>>正文


C++ IsFeatureLevelSupported函数代码示例

本文整理汇总了C++中IsFeatureLevelSupported函数的典型用法代码示例。如果您正苦于以下问题:C++ IsFeatureLevelSupported函数的具体用法?C++ IsFeatureLevelSupported怎么用?C++ IsFeatureLevelSupported使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IsFeatureLevelSupported函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ShouldCache

	static bool ShouldCache(EShaderPlatform Platform)
	{
		if(!IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM5))
		{
			if(MSAASampleCount > 1)
			{
				return false;
			}
		}

		return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
	}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:12,代码来源:PostProcessSelectionOutline.cpp

示例2: ShouldCache

	static bool ShouldCache(EShaderPlatform Platform,const FMaterial* Material,const FVertexFactoryType* VertexFactoryType)
	{
		// Only the local vertex factory supports the position-only stream
		if (bUsePositionOnlyStream)
		{
			return VertexFactoryType->SupportsPositionOnly() && Material->IsSpecialEngineMaterial() 
				&& IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM3);
		}

		// Only compile for the default material and masked materials
		return (Material->IsSpecialEngineMaterial() || Material->IsMasked() || Material->MaterialModifiesMeshPosition())
			 && IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM3);
	}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:13,代码来源:DepthRendering.cpp

示例3: ShouldCache

	static bool ShouldCache(EShaderPlatform Platform)
	{
		if( IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM5) )
		{
			return true;
		}
		else if( IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4) )
		{
			return NumSamples <= 16;
		}
		else
		{
			return NumSamples <= 7;
		}
	}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:15,代码来源:PostProcessWeightedSampleSum.cpp

示例4: ShouldCache

	static bool ShouldCache(EShaderPlatform Platform,const FMaterial* Material,const FVertexFactoryType* VertexFactoryType)
	{
		return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM5) 
			&& DoesPlatformSupportDistanceFieldGI(Platform)
			&& (FCString::Strstr(VertexFactoryType->GetName(), TEXT("LocalVertexFactory")) != NULL
				|| FCString::Strstr(VertexFactoryType->GetName(), TEXT("InstancedStaticMeshVertexFactory")) != NULL);
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:7,代码来源:ConvertToUniformMesh.cpp

示例5: ShouldCache

	/**
	  * Makes sure only shaders for materials that are explicitly flagged
	  * as 'UsedAsDeferredDecal' in the Material Editor gets compiled into
	  * the shader cache.
	  */
	static bool ShouldCache(EShaderPlatform Platform, const FMaterial* Material)
	{
		if (!Material->IsUsedWithDeferredDecal())
		{
			return false;
		}

		return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
	}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:14,代码来源:PostProcessDeferredDecals.cpp

示例6: ShouldCache

	static bool ShouldCache(EShaderPlatform Platform,const FMaterial* Material,const FVertexFactoryType* VertexFactoryType)
	{
		//Only compile the velocity shaders for the default material or if it's masked,
		return ((Material->IsSpecialEngineMaterial() || Material->IsMasked() 
			//or if the material is opaque and two-sided,
			|| (Material->IsTwoSided() && !IsTranslucentBlendMode(Material->GetBlendMode()))
			// or if the material modifies meshes
			|| Material->MaterialMayModifyMeshPosition()))
			&& IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4) && !FVelocityRendering::OutputsToGBuffer();
	}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:10,代码来源:VelocityRendering.cpp

示例7: ShouldCache

    static bool ShouldCache(EShaderPlatform Platform)
    {
        // Always allow simple bilinear upscale. (Provides upscaling for ES2 emulation)
        if (Method == 1)
        {
            return true;
        }

        return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
    }
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:10,代码来源:PostProcessUpscale.cpp

示例8: ModifyCompilationEnvironment

	static void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment& OutEnvironment)
	{
		FGlobalShader::ModifyCompilationEnvironment(Platform, OutEnvironment);

		if( !IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM5) )
		{
			//Need to hack in exposure scale for < SM5
			OutEnvironment.SetDefine(TEXT("NO_EYEADAPTATION_EXPOSURE_FIX"), 1);
		}
	}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:10,代码来源:PostProcessBloomSetup.cpp

示例9: UpdateDownsampledDepthSurface

/** Updates the downsized depth buffer with the current full resolution depth buffer. */
void FDeferredShadingSceneRenderer::UpdateDownsampledDepthSurface()
{
	if (GSceneRenderTargets.UseDownsizedOcclusionQueries() && IsFeatureLevelSupported(GRHIShaderPlatform, ERHIFeatureLevel::SM3))
	{
		RHISetRenderTarget(NULL, GSceneRenderTargets.GetSmallDepthSurface());

		SCOPED_DRAW_EVENT(DownsampleDepth, DEC_SCENE_ITEMS);

		for (int32 ViewIndex = 0; ViewIndex < Views.Num(); ViewIndex++)
		{
			const FViewInfo& View = Views[ViewIndex];
			// Set shaders and texture
			TShaderMapRef<FScreenVS> ScreenVertexShader(GetGlobalShaderMap());
			TShaderMapRef<FDownsampleSceneDepthPS> PixelShader(GetGlobalShaderMap());

			extern TGlobalResource<FFilterVertexDeclaration> GFilterVertexDeclaration;

			SetGlobalBoundShaderState(DownsampleDepthBoundShaderState, GFilterVertexDeclaration.VertexDeclarationRHI, *ScreenVertexShader, *PixelShader);

			RHISetBlendState(TStaticBlendState<CW_NONE>::GetRHI());
			RHISetRasterizerState(TStaticRasterizerState<FM_Solid,CM_None>::GetRHI());
			RHISetDepthStencilState(TStaticDepthStencilState<true,CF_Always>::GetRHI());

			PixelShader->SetParameters(View);

			const uint32 DownsampledX = FMath::Trunc(View.ViewRect.Min.X / GSceneRenderTargets.GetSmallColorDepthDownsampleFactor());
			const uint32 DownsampledY = FMath::Trunc(View.ViewRect.Min.Y / GSceneRenderTargets.GetSmallColorDepthDownsampleFactor());
			const uint32 DownsampledSizeX = FMath::Trunc(View.ViewRect.Width() / GSceneRenderTargets.GetSmallColorDepthDownsampleFactor());
			const uint32 DownsampledSizeY = FMath::Trunc(View.ViewRect.Height() / GSceneRenderTargets.GetSmallColorDepthDownsampleFactor());

			RHISetViewport(DownsampledX, DownsampledY, 0.0f, DownsampledX + DownsampledSizeX, DownsampledY + DownsampledSizeY, 1.0f);

			DrawRectangle(
				0, 0,
				DownsampledSizeX, DownsampledSizeY,
				View.ViewRect.Min.X, View.ViewRect.Min.Y,
				View.ViewRect.Width(), View.ViewRect.Height(),
				FIntPoint(DownsampledSizeX, DownsampledSizeY),
				GSceneRenderTargets.GetBufferSizeXY(),
				EDRF_UseTriangleOptimization);
		}
	}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:44,代码来源:DeferredShadingRenderer.cpp

示例10: ShouldCache

	static bool ShouldCache(EShaderPlatform Platform)
	{
		return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
	}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:4,代码来源:PostProcessDOF.cpp

示例11: ShouldCache

 //@todo-rco: Remove this when reenabling for OpenGL
 static bool ShouldCache( EShaderPlatform Platform )		{
     return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM5) && !IsOpenGLPlatform(Platform);
 }
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:4,代码来源:LightPropagationVolumeVisualisation.cpp

示例12: IsFeatureLevelSupported

bool FGPUSkinPassthroughVertexFactory::ShouldCache(EShaderPlatform Platform, const class FMaterial* Material, const class FShaderType* ShaderType)
{
	// Passhrough is only valid on platforms with Compute Shader support
	return GEnableGPUSkinCache && IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM5) && Super::ShouldCache(Platform, Material, ShaderType);
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:5,代码来源:GPUSkinVertexFactory.cpp

示例13: ShouldCache

	static bool ShouldCache(EShaderPlatform Platform)
	{
		return bEnablePlanarReflectionPrefilter ? IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4) : true;
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:4,代码来源:PlanarReflectionRendering.cpp

示例14: SCOPED_DRAW_EVENT

/** 
* Renders the view family. 
*/
void FDeferredShadingSceneRenderer::Render()
{
	if(!ViewFamily.EngineShowFlags.Rendering)
	{
		return;
	}

	SCOPED_DRAW_EVENT(Scene,DEC_SCENE_ITEMS);

	// Initialize global system textures (pass-through if already initialized).
	GSystemTextures.InitializeTextures();

	// Allocate the maximum scene render target space for the current view family.
	GSceneRenderTargets.Allocate(ViewFamily);

	// Find the visible primitives.
	InitViews();

	const bool bIsWireframe = ViewFamily.EngineShowFlags.Wireframe;

	static const auto ClearMethodCVar = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.ClearSceneMethod"));
	bool bRequiresRHIClear = true;
	bool bRequiresFarZQuadClear = false;

	if (ClearMethodCVar)
	{
		switch (ClearMethodCVar->GetValueOnRenderThread())
		{
		case 0: // No clear
			{
				bRequiresRHIClear = false;
				bRequiresFarZQuadClear = false;
				break;
			}
		
		case 1: // RHIClear
			{
				bRequiresRHIClear = true;
				bRequiresFarZQuadClear = false;
				break;
			}

		case 2: // Clear using far-z quad
			{
				bRequiresFarZQuadClear = true;
				bRequiresRHIClear = false;
				break;
			}
		}
	}

	// Always perform a full buffer clear for wireframe, shader complexity view mode, and stationary light overlap viewmode.
	if (bIsWireframe || ViewFamily.EngineShowFlags.ShaderComplexity || ViewFamily.EngineShowFlags.StationaryLightOverlap)
	{
		bRequiresRHIClear = true;
	}

	// force using occ queries for wireframe if rendering is parented or frozen in the first view
	check(Views.Num());
	#if (UE_BUILD_SHIPPING || UE_BUILD_TEST)
		const bool bIsViewFrozen = false;
		const bool bHasViewParent = false;
	#else
		const bool bIsViewFrozen = Views[0].State && ((FSceneViewState*)Views[0].State)->bIsFrozen;
		const bool bHasViewParent = Views[0].State && ((FSceneViewState*)Views[0].State)->HasViewParent();
	#endif
	const bool bIsOcclusionTesting = DoOcclusionQueries() && (!bIsWireframe || bIsViewFrozen || bHasViewParent);

	// Dynamic vertex and index buffers need to be committed before rendering.
	FGlobalDynamicVertexBuffer::Get().Commit();
	FGlobalDynamicIndexBuffer::Get().Commit();

	// Notify the FX system that the scene is about to be rendered.
	if (Scene->FXSystem)
	{
		Scene->FXSystem->PreRender();
	}

	// Draw the scene pre-pass / early z pass, populating the scene depth buffer and HiZ
	RenderPrePass();
	
	// Clear scene color buffer if necessary.
	if ( bRequiresRHIClear )
	{
		ClearView();

		// Only clear once.
		bRequiresRHIClear = false;
	}

	// Clear LPVs for all views
	if ( IsFeatureLevelSupported(GRHIShaderPlatform, ERHIFeatureLevel::SM5) )
	{
		ClearLPVs();
	}

	// only temporarily available after early z pass and until base pass
//.........这里部分代码省略.........
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:101,代码来源:DeferredShadingRenderer.cpp

示例15: ShouldCache

	/**
	  * Only compile these shaders for post processing domain materials
	  */
	static bool ShouldCache(EShaderPlatform Platform, const FMaterial* Material)
	{
		return (Material->GetMaterialDomain() == MD_PostProcess) && IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
	}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:7,代码来源:PostProcessMaterial.cpp


注:本文中的IsFeatureLevelSupported函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。