本文整理汇总了C++中FDeferredPixelShaderParameters类的典型用法代码示例。如果您正苦于以下问题:C++ FDeferredPixelShaderParameters类的具体用法?C++ FDeferredPixelShaderParameters怎么用?C++ FDeferredPixelShaderParameters使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FDeferredPixelShaderParameters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FGlobalShader
/** Initialization constructor. */
FPostProcessHMDPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
PostprocessParameter.Bind(Initializer.ParameterMap);
DeferredParameters.Bind(Initializer.ParameterMap);
}
示例2: FGlobalShader
/** Initialization constructor. */
FPostProcessVisualizeShadingModelsPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
PostprocessParameter.Bind(Initializer.ParameterMap);
DeferredParameters.Bind(Initializer.ParameterMap);
ShadingModelMaskInView.Bind(Initializer.ParameterMap,TEXT("ShadingModelMaskInView"));
}
示例3: FGlobalShader
/** Initialization constructor. */
FPostProcessScreenSpaceReflectionsPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
PostprocessParameter.Bind(Initializer.ParameterMap);
DeferredParameters.Bind(Initializer.ParameterMap);
SSRParams.Bind(Initializer.ParameterMap, TEXT("SSRParams"));
}
示例4: FGlobalShader
/** Initialization constructor. */
FPostProcessMotionBlurNewPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
PostprocessParameter.Bind(Initializer.ParameterMap);
DeferredParameters.Bind(Initializer.ParameterMap);
MotionBlurParameters.Bind(Initializer.ParameterMap, TEXT("MotionBlurParameters"));
}
示例5: SetParameters
void SetParameters(
#if LPV_VOLUME_TEXTURE
FTextureRHIParamRef* LpvBufferSRVsIn,
#else
FShaderResourceViewRHIParamRef LpvBufferSRVIn,
#endif
FLpvReadUniformBufferRef LpvUniformBuffer,
const FRenderingCompositePassContext& Context )
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
SetUniformBufferParameter( ShaderRHI, GetUniformBufferParameter<FLpvReadUniformBufferParameters>(), LpvUniformBuffer );
#if LPV_VOLUME_TEXTURE
for ( int i=0; i<7; i++ )
{
if ( LpvBufferSRVParameters[i].IsBound() )
{
RHISetShaderTexture( ShaderRHI, LpvBufferSRVParameters[i].GetBaseIndex(), LpvBufferSRVsIn[i] );
SetTextureParameter( ShaderRHI, LpvBufferSRVParameters[i], LpvVolumeTextureSampler, TStaticSamplerState<SF_Bilinear,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI(), LpvBufferSRVsIn[i] );
}
}
#else
if ( LpvBufferSRV.IsBound() )
{
RHISetShaderResourceViewParameter( ShaderRHI, LpvBufferSRV.GetBaseIndex(), LpvBufferSRVIn );
}
#endif
FGlobalShader::SetParameters(ShaderRHI, Context.View);
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Bilinear,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI());
DeferredParameters.Set(ShaderRHI, Context.View);
SetTextureParameter( ShaderRHI, PreIntegratedGF, PreIntegratedGFSampler, TStaticSamplerState<SF_Bilinear,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI(), GSystemTextures.PreintegratedGF->GetRenderTargetItem().ShaderResourceTexture );
}
示例6: FGlobalShader
/** Initialization constructor. */
FPostProcessDOFSetupPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
PostprocessParameter.Bind(Initializer.ParameterMap);
DeferredParameters.Bind(Initializer.ParameterMap);
DepthOfFieldParams.Bind(Initializer.ParameterMap,TEXT("DepthOfFieldParams"));
}
示例7: FGlobalShader
/** Initialization constructor. */
FPostProcessSubsurfacePS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
PostprocessParameter.Bind(Initializer.ParameterMap);
DeferredParameters.Bind(Initializer.ParameterMap);
SSSParams.Bind(Initializer.ParameterMap, TEXT("SSSParams"));
}
示例8: FGlobalShader
/** Initialization constructor. */
TPostProcessSubsurfaceRecombinePS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
PostprocessParameter.Bind(Initializer.ParameterMap);
DeferredParameters.Bind(Initializer.ParameterMap);
SubsurfaceParameters.Bind(Initializer.ParameterMap);
}
示例9: SetParameters
void SetParameters(const FRenderingCompositePassContext& Context)
{
const FFinalPostProcessSettings& Settings = Context.View.FinalPostProcessSettings;
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FGlobalShader::SetParameters(Context.RHICmdList, ShaderRHI, Context.View);
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Point, AM_Clamp, AM_Clamp, AM_Clamp>::GetRHI());
DeferredParameters.Set(Context.RHICmdList, ShaderRHI, Context.View);
{
float MaxRoughness = FMath::Clamp(Context.View.FinalPostProcessSettings.ScreenSpaceReflectionMaxRoughness, 0.01f, 1.0f);
// f(x) = x * Scale + Bias
// f(MaxRoughness) = 0
// f(MaxRoughness/2) = 1
float RoughnessMaskScale = -2.0f / MaxRoughness;
RoughnessMaskScale *= SSRQuality < 3 ? 2.0f : 1.0f;
FLinearColor Value(
FMath::Clamp(Context.View.FinalPostProcessSettings.ScreenSpaceReflectionIntensity * 0.01f, 0.0f, 1.0f),
RoughnessMaskScale,
0,
0);
SetShaderValue(Context.RHICmdList, ShaderRHI, SSRParams, Value);
}
}
示例10: FPostProcessUpscalePS
/** Initialization constructor. */
FPostProcessUpscalePS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
PostprocessParameter.Bind(Initializer.ParameterMap);
DeferredParameters.Bind(Initializer.ParameterMap);
UpscaleSoftness.Bind(Initializer.ParameterMap,TEXT("UpscaleSoftness"));
}
示例11: FGlobalShader
/** Initialization constructor. */
FPostProcessNoiseBlurPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
PostprocessParameter.Bind(Initializer.ParameterMap);
DeferredParameters.Bind(Initializer.ParameterMap);
NoiseParams.Bind(Initializer.ParameterMap, TEXT("NoiseParams"));
}
示例12: SetPS
void SetPS(const FRenderingCompositePassContext& Context, FIntRect SrcRect, FIntPoint SrcBufferSize, EStereoscopicPass StereoPass, FMatrix& QuadTexTransform)
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FGlobalShader::SetParameters(Context.RHICmdList, ShaderRHI, Context.View);
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Bilinear,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI());
DeferredParameters.Set(Context.RHICmdList, ShaderRHI, Context.View);
{
check(GEngine->HMDDevice.IsValid());
TSharedPtr< class IHeadMountedDisplay > HMDDevice = GEngine->HMDDevice;
check (StereoPass != eSSP_FULL);
if (StereoPass == eSSP_LEFT_EYE)
{
FTexture* TextureLeft = HMDDevice->GetDistortionTextureLeft();
SetTextureParameter(Context.RHICmdList, ShaderRHI, DistortionTextureParam, DistortionTextureSampler, TextureLeft->SamplerStateRHI, TextureLeft->TextureRHI);
SetShaderValue(Context.RHICmdList, ShaderRHI, TextureScale, HMDDevice->GetTextureScaleLeft());
SetShaderValue(Context.RHICmdList, ShaderRHI, TextureOffset, HMDDevice->GetTextureOffsetLeft());
SetShaderValue(Context.RHICmdList, ShaderRHI, TextureUVOffset, 0.0f);
}
else
{
FTexture* TextureRight = HMDDevice->GetDistortionTextureRight();
SetTextureParameter(Context.RHICmdList, ShaderRHI, DistortionTextureParam, DistortionTextureSampler, TextureRight->SamplerStateRHI, TextureRight->TextureRHI);
SetShaderValue(Context.RHICmdList, ShaderRHI, TextureScale, HMDDevice->GetTextureScaleRight());
SetShaderValue(Context.RHICmdList, ShaderRHI, TextureOffset, HMDDevice->GetTextureOffsetRight());
SetShaderValue(Context.RHICmdList, ShaderRHI, TextureUVOffset, -0.5f);
}
QuadTexTransform = FMatrix::Identity;
}
}
示例13: SetParameters
void SetParameters(
FTextureRHIParamRef* LpvBufferSRVsIn,
FTextureRHIParamRef AOVolumeTextureSRVIn,
FLpvReadUniformBufferRef LpvUniformBuffer,
const FRenderingCompositePassContext& Context )
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
SetUniformBufferParameter(Context.RHICmdList, ShaderRHI, GetUniformBufferParameter<FLpvReadUniformBufferParameters>(), LpvUniformBuffer);
for ( int i=0; i<7; i++ )
{
if ( LpvBufferSRVParameters[i].IsBound() )
{
Context.RHICmdList.SetShaderTexture(ShaderRHI, LpvBufferSRVParameters[i].GetBaseIndex(), LpvBufferSRVsIn[i]);
SetTextureParameter(Context.RHICmdList, ShaderRHI, LpvBufferSRVParameters[i], LpvVolumeTextureSampler, TStaticSamplerState<SF_Bilinear, AM_Border, AM_Border, AM_Border>::GetRHI(), LpvBufferSRVsIn[i]);
}
}
if ( AOVolumeTextureSRVParameter.IsBound() )
{
Context.RHICmdList.SetShaderTexture(ShaderRHI, AOVolumeTextureSRVParameter.GetBaseIndex(), AOVolumeTextureSRVIn );
}
FGlobalShader::SetParameters(Context.RHICmdList, ShaderRHI, Context.View);
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Bilinear, AM_Clamp, AM_Clamp, AM_Clamp>::GetRHI());
DeferredParameters.Set(Context.RHICmdList, ShaderRHI, Context.View);
SetTextureParameter(Context.RHICmdList, ShaderRHI, PreIntegratedGF, PreIntegratedGFSampler, TStaticSamplerState<SF_Bilinear, AM_Clamp, AM_Clamp, AM_Clamp>::GetRHI(), GSystemTextures.PreintegratedGF->GetRenderTargetItem().ShaderResourceTexture);
}
示例14: SetPS
void SetPS(const FRenderingCompositePassContext& Context, uint16 InShadingModelMaskInView)
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FGlobalShader::SetParameters(Context.RHICmdList, ShaderRHI, Context.View);
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Point,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI());
DeferredParameters.Set(Context.RHICmdList, ShaderRHI, Context.View);
static FLinearColor SoftBits[sizeof(InShadingModelMaskInView) * 8] = {}; // init with 0.0f
for(uint32 i = 0; i < sizeof(InShadingModelMaskInView) * 8; ++i)
{
float& ref = SoftBits[i].R;
ref -= Context.View.Family->DeltaWorldTime;
ref = FMath::Max(0.0f, ref);
if(InShadingModelMaskInView & (1 << i))
{
ref = 1.0f;
}
}
SetShaderValueArray(Context.RHICmdList, ShaderRHI, ShadingModelMaskInView, SoftBits, sizeof(InShadingModelMaskInView) * 8);
}
示例15: SetPS
void SetPS(const FRenderingCompositePassContext& Context)
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FGlobalShader::SetParameters(ShaderRHI, Context.View);
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Point,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI());
DeferredParameters.Set(ShaderRHI, Context.View);
}