本文整理汇总了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);
}
示例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
}
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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") );
}
示例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"));
}
示例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"));
}
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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"));
}