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


C++ FShaderParameter类代码示例

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


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

示例1: FShader

FMaterialShader::FMaterialShader(const FMaterialShaderType::CompiledShaderInitializerType& Initializer)
:	FShader(Initializer)
,	DebugUniformExpressionSet(Initializer.UniformExpressionSet)
,	DebugDescription(Initializer.DebugDescription)
{
	check(!DebugDescription.IsEmpty());

	// Bind the material uniform buffer parameter.
	MaterialUniformBuffer.Bind(Initializer.ParameterMap,TEXT("Material"));

	for (int32 CollectionIndex = 0; CollectionIndex < Initializer.UniformExpressionSet.ParameterCollections.Num(); CollectionIndex++)
	{
		FShaderUniformBufferParameter CollectionParameter;
		CollectionParameter.Bind(Initializer.ParameterMap,*FString::Printf(TEXT("MaterialCollection%u"), CollectionIndex));
		ParameterCollectionUniformBuffers.Add(CollectionParameter);
	}

	for (int32 Index = 0; Index < Initializer.UniformExpressionSet.PerFrameUniformScalarExpressions.Num(); Index++)
	{
		FShaderParameter Parameter;
		Parameter.Bind(Initializer.ParameterMap, *FString::Printf(TEXT("UE_Material_PerFrameScalarExpression%u"), Index));
		PerFrameScalarExpressions.Add(Parameter);
	}

	for (int32 Index = 0; Index < Initializer.UniformExpressionSet.PerFrameUniformVectorExpressions.Num(); Index++)
	{
		FShaderParameter Parameter;
		Parameter.Bind(Initializer.ParameterMap, *FString::Printf(TEXT("UE_Material_PerFrameVectorExpression%u"), Index));
		PerFrameVectorExpressions.Add(Parameter);
	}

	for (int32 Index = 0; Index < Initializer.UniformExpressionSet.PerFramePrevUniformScalarExpressions.Num(); Index++)
	{
		FShaderParameter Parameter;
		Parameter.Bind(Initializer.ParameterMap, *FString::Printf(TEXT("UE_Material_PerFramePrevScalarExpression%u"), Index));
		PerFramePrevScalarExpressions.Add(Parameter);
	}

	for (int32 Index = 0; Index < Initializer.UniformExpressionSet.PerFramePrevUniformVectorExpressions.Num(); Index++)
	{
		FShaderParameter Parameter;
		Parameter.Bind(Initializer.ParameterMap, *FString::Printf(TEXT("UE_Material_PerFramePrevVectorExpression%u"), Index));
		PerFramePrevVectorExpressions.Add(Parameter);
	}

	DeferredParameters.Bind(Initializer.ParameterMap);
	LightAttenuation.Bind(Initializer.ParameterMap, TEXT("LightAttenuationTexture"));
	LightAttenuationSampler.Bind(Initializer.ParameterMap, TEXT("LightAttenuationTextureSampler"));
	AtmosphericFogTextureParameters.Bind(Initializer.ParameterMap);
	EyeAdaptation.Bind(Initializer.ParameterMap, TEXT("EyeAdaptation"));
	// only used it Material has expression that requires PerlinNoiseGradientTexture
	PerlinNoiseGradientTexture.Bind(Initializer.ParameterMap,TEXT("PerlinNoiseGradientTexture"));
	PerlinNoiseGradientTextureSampler.Bind(Initializer.ParameterMap,TEXT("PerlinNoiseGradientTextureSampler"));
	// only used it Material has expression that requires PerlinNoise3DTexture
	PerlinNoise3DTexture.Bind(Initializer.ParameterMap,TEXT("PerlinNoise3DTexture"));
	PerlinNoise3DTextureSampler.Bind(Initializer.ParameterMap,TEXT("PerlinNoise3DTextureSampler"));

	GlobalDistanceFieldParameters.Bind(Initializer.ParameterMap);
}
开发者ID:mysheng8,项目名称:UnrealEngine,代码行数:59,代码来源:ShaderBaseClasses.cpp

示例2: assert

void FOpenGLDrv::SetupPendingShaderProgramParameters()
{
	FProgramParameters *Parameters = PendingState.ShaderParameters;
	FOpenGLProgram *Program = PendingState.ShaderProgram;

	assert(Program);
	if (Parameters)
	{
		for (FProgramParameters::const_iterator It = Parameters->begin(); It != Parameters->end(); It++)
		{
			FShaderParameter *Param = *It;
			assert(Param);
			Param->ApplyValue(*Program);
			CheckError(__FILE__, __LINE__);
		} // end for
	}
}
开发者ID:JettHuang,项目名称:JetX,代码行数:17,代码来源:OpenGLDrv.cpp

示例3: FGlobalShader

	/** Initialization constructor. */
	FGammaCorrectionPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		SceneTexture.Bind(Initializer.ParameterMap,TEXT("SceneColorTexture"));
		SceneTextureSampler.Bind(Initializer.ParameterMap,TEXT("SceneColorTextureSampler"));
		InverseGamma.Bind(Initializer.ParameterMap,TEXT("InverseGamma"));
		ColorScale.Bind(Initializer.ParameterMap,TEXT("ColorScale"));
		OverlayColor.Bind(Initializer.ParameterMap,TEXT("OverlayColor"));
	}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:10,代码来源:GammaCorrection.cpp

示例4: FGlobalShader

	/** Initialization constructor. */
	FPostProcessTestImagePS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
		, ColorRemapShaderParameters(Initializer.ParameterMap)
	{
		PostprocessParameter.Bind(Initializer.ParameterMap);
		DeferredParameters.Bind(Initializer.ParameterMap);
		FrameNumber.Bind(Initializer.ParameterMap,TEXT("FrameNumber"));
		FrameTime.Bind(Initializer.ParameterMap,TEXT("FrameTime"));
	}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:10,代码来源:PostProcessTestImage.cpp

示例5: FGlobalShader

	/** Initialization constructor. */
	FPostProcessMotionBlurPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		PostprocessParameter.Bind(Initializer.ParameterMap);
		DeferredParameters.Bind(Initializer.ParameterMap);
		PrevViewProjMatrix.Bind(Initializer.ParameterMap, TEXT("PrevViewProjMatrix"));
		TextureViewMad.Bind(Initializer.ParameterMap, TEXT("TextureViewMad"));
		MotionBlurParameters.Bind(Initializer.ParameterMap, TEXT("MotionBlurParameters"));
	}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:10,代码来源:PostProcessMotionBlur.cpp

示例6: FPostProcessHistogramCS

 /** Initialization constructor. */
 FPostProcessHistogramCS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
     : FGlobalShader(Initializer)
 {
     PostprocessParameter.Bind(Initializer.ParameterMap);
     HistogramRWTexture.Bind(Initializer.ParameterMap, TEXT("HistogramRWTexture"));
     HistogramParameters.Bind(Initializer.ParameterMap, TEXT("HistogramParameters"));
     ThreadGroupCount.Bind(Initializer.ParameterMap, TEXT("ThreadGroupCount"));
     LeftTopOffset.Bind(Initializer.ParameterMap, TEXT("LeftTopOffset"));
     EyeAdaptationParams.Bind(Initializer.ParameterMap, TEXT("EyeAdaptationParams"));
 }
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:11,代码来源:PostProcessHistogram.cpp

示例7: FGlobalShader

	FPostProcessVelocityFlattenCS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		PostprocessParameter.Bind(Initializer.ParameterMap);
		CameraMotionParams.Bind(Initializer.ParameterMap);
		OutVelocityFlat.Bind(Initializer.ParameterMap, TEXT("OutVelocityFlat"));
		OutPackedVelocityDepth.Bind(Initializer.ParameterMap, TEXT("OutPackedVelocityDepth"));
		OutMaxTileVelocity.Bind(Initializer.ParameterMap, TEXT("OutMaxTileVelocity"));
		ViewDimensions.Bind(Initializer.ParameterMap, TEXT("ViewDimensions"));
	}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:10,代码来源:PostProcessMotionBlur.cpp

示例8: FGlobalShader

	FRTWriteMaskDecodeCS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		RTWriteMaskDimensions.Bind(Initializer.ParameterMap, TEXT("RTWriteMaskDimensions"));
		OutCombinedRTWriteMask.Bind(Initializer.ParameterMap, TEXT("OutCombinedRTWriteMask"));
		RTWriteMaskInput0.Bind(Initializer.ParameterMap, TEXT("RTWriteMaskInput0"));
		RTWriteMaskInput1.Bind(Initializer.ParameterMap, TEXT("RTWriteMaskInput1"));
		RTWriteMaskInput2.Bind(Initializer.ParameterMap, TEXT("RTWriteMaskInput2"));
		UtilizeMask.Bind(Initializer.ParameterMap, TEXT("UtilizeMask"));
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:10,代码来源:PostProcessDeferredDecals.cpp

示例9: FGlobalShader

	THZBBuildPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		InvSizeParameter.Bind( Initializer.ParameterMap, TEXT("InvSize") );
		InputUvFactorAndOffsetParameter.Bind( Initializer.ParameterMap, TEXT("InputUvFactorAndOffset") );
		InputViewportMaxBoundParameter.Bind( Initializer.ParameterMap, TEXT("InputViewportMaxBound") );
		SceneTextureParameters.Bind( Initializer.ParameterMap );
		TextureParameter.Bind( Initializer.ParameterMap, TEXT("Texture") );
		TextureParameterSampler.Bind( Initializer.ParameterMap, TEXT("TextureSampler") );
	}
开发者ID:dineshone,项目名称:UnrealGameEngine,代码行数:10,代码来源:SceneOcclusion.cpp

示例10: FGlobalShader

	/** Initialization constructor. */
	FPostProcessSelectionOutlinePS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		PostprocessParameter.Bind(Initializer.ParameterMap);
		DeferredParameters.Bind(Initializer.ParameterMap);
		OutlineColor.Bind(Initializer.ParameterMap, TEXT("OutlineColor"));
		BSPSelectionIntensity.Bind(Initializer.ParameterMap, TEXT("BSPSelectionIntensity"));
		PostprocessInput1MS.Bind(Initializer.ParameterMap, TEXT("PostprocessInput1MS"));
		EditorRenderParams.Bind(Initializer.ParameterMap, TEXT("EditorRenderParams"));
		EditorPrimitivesStencil.Bind(Initializer.ParameterMap,TEXT("EditorPrimitivesStencil"));
	}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:12,代码来源:PostProcessSelectionOutline.cpp

示例11: FGlobalShader

	/** Initialization constructor. */
	FPostProcessHMDVS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		EyeToSrcUVScale.Bind(Initializer.ParameterMap, TEXT("EyeToSrcUVScale"));
		EyeToSrcUVOffset.Bind(Initializer.ParameterMap, TEXT("EyeToSrcUVOffset"));

		if (bTimeWarp)
		{
			EyeRotationStart.Bind(Initializer.ParameterMap, TEXT("EyeRotationStart"));
			EyeRotationEnd.Bind(Initializer.ParameterMap, TEXT("EyeRotationEnd"));
		}
	}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:13,代码来源:PostProcessHMD.cpp

示例12: FPostProcessUpscalePS

 /** Initialization constructor. */
 FPostProcessUpscalePS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
     : FGlobalShader(Initializer)
 {
     PostprocessParameter.Bind(Initializer.ParameterMap);
     DeferredParameters.Bind(Initializer.ParameterMap);
     UpscaleSoftness.Bind(Initializer.ParameterMap,TEXT("UpscaleSoftness"));
 }
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:8,代码来源:PostProcessUpscale.cpp

示例13: FGlobalShader

	/** Initialization constructor. */
	FPostProcessSubsurfacePS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		PostprocessParameter.Bind(Initializer.ParameterMap);
		DeferredParameters.Bind(Initializer.ParameterMap);
		SSSParams.Bind(Initializer.ParameterMap, TEXT("SSSParams"));
	}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:8,代码来源:PostProcessSubsurface.cpp

示例14: FGlobalShader

	/** Initialization constructor. */
	FPostProcessDOFSetupPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		PostprocessParameter.Bind(Initializer.ParameterMap);
		DeferredParameters.Bind(Initializer.ParameterMap);
		DepthOfFieldParams.Bind(Initializer.ParameterMap,TEXT("DepthOfFieldParams"));
	}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:8,代码来源:PostProcessDOF.cpp

示例15: FGlobalShader

	/** Initialization constructor. */
	FPostProcessVisualizeShadingModelsPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
		: FGlobalShader(Initializer)
	{
		PostprocessParameter.Bind(Initializer.ParameterMap);
		DeferredParameters.Bind(Initializer.ParameterMap);
		ShadingModelMaskInView.Bind(Initializer.ParameterMap,TEXT("ShadingModelMaskInView"));
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:8,代码来源:VisualizeShadingModels.cpp


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