本文整理汇总了C++中GetPixelShader函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPixelShader函数的具体用法?C++ GetPixelShader怎么用?C++ GetPixelShader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetPixelShader函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetParameters
void SetParameters(FRHICommandList& RHICmdList, const FViewInfo& View, FLightShaftsOutput LightShaftsOutput)
{
FGlobalShader::SetParameters(RHICmdList, GetPixelShader(), View);
SceneTextureParameters.Set(RHICmdList, GetPixelShader(), View);
ExponentialParameters.Set(RHICmdList, GetPixelShader(), &View);
if (LightShaftsOutput.bRendered)
{
SetTextureParameter(
RHICmdList,
GetPixelShader(),
OcclusionTexture, OcclusionSampler,
TStaticSamplerState<SF_Bilinear,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI(),
LightShaftsOutput.LightShaftOcclusion->GetRenderTargetItem().ShaderResourceTexture
);
}
else
{
SetTextureParameter(
RHICmdList,
GetPixelShader(),
OcclusionTexture, OcclusionSampler,
TStaticSamplerState<SF_Bilinear,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI(),
GWhiteTexture->TextureRHI
);
}
}
示例2: SetTextureParameter
void FSimpleElementPS::SetParameters(const FTexture* TextureValue)
{
SetTextureParameter(GetPixelShader(),InTexture,InTextureSampler,TextureValue);
SetShaderValue(GetPixelShader(),TextureComponentReplicate,TextureValue->bGreyScaleFormat ? FLinearColor(1,0,0,0) : FLinearColor(0,0,0,0));
SetShaderValue(GetPixelShader(),TextureComponentReplicateAlpha,TextureValue->bGreyScaleFormat ? FLinearColor(1,0,0,0) : FLinearColor(0,0,0,1));
}
示例3: SetParameters
/** Sets shader parameter values */
void SetParameters(FRHICommandList& RHICmdList, const FLightSceneInfo* LightSceneInfo, const FViewInfo& View, int32 PassIndex, TRefCountPtr<IPooledRenderTarget>& PassSource)
{
FGlobalShader::SetParameters(RHICmdList, GetPixelShader(), View);
LightShaftParameters.SetParameters(RHICmdList, GetPixelShader(), LightSceneInfo, View, PassSource);
const FVector4 Parameters(GLightShaftBlurNumSamples, GLightShaftFirstPassDistance, PassIndex);
SetShaderValue(RHICmdList, GetPixelShader(), RadialBlurParameters, Parameters);
}
示例4: SetTextureParameter
void FCubemapTexturePropertiesPS<bHDROutput>::SetParameters( FRHICommandList& RHICmdList, const FTexture* Texture, const FMatrix& ColorWeightsValue, float MipLevel, float GammaValue )
{
SetTextureParameter(RHICmdList, GetPixelShader(),CubeTexture,CubeTextureSampler,Texture);
FVector4 PackedProperties0Value(MipLevel, 0, 0, 0);
SetShaderValue(RHICmdList, GetPixelShader(), PackedProperties0, PackedProperties0Value);
SetShaderValue(RHICmdList, GetPixelShader(), ColorWeights, ColorWeightsValue);
SetShaderValue(RHICmdList, GetPixelShader(), Gamma, GammaValue);
}
示例5: SetShaderValue
/**
* Sets all the constant parameters for this shader
*
* @param Texture - 2d tile texture
* @param Gamma - if gamma != 1.0 then a pow(color,Gamma) is applied
* @param ClipRef - reference value to compare with alpha for killing pixels
* @param SmoothWidth - The width to smooth the edge the texture
* @param EnableShadow - Toggles drop shadow rendering
* @param ShadowDirection - 2D vector specifying the direction of shadow
* @param ShadowColor - Color of the shadowed pixels
* @param ShadowSmoothWidth - The width to smooth the edge the shadow of the texture
* @param BlendMode - current batched element blend mode being rendered
*/
void FSimpleElementDistanceFieldGammaPS::SetParameters(
const FTexture* Texture,
float Gamma,
float ClipRef,
float SmoothWidthValue,
bool EnableShadowValue,
const FVector2D& ShadowDirectionValue,
const FLinearColor& ShadowColorValue,
float ShadowSmoothWidthValue,
const FDepthFieldGlowInfo& GlowInfo,
ESimpleElementBlendMode BlendMode
)
{
FSimpleElementMaskedGammaPS::SetParameters(Texture,Gamma,ClipRef,BlendMode);
SetShaderValue(GetPixelShader(),SmoothWidth,SmoothWidthValue);
SetPixelShaderBool(GetPixelShader(),EnableShadow,EnableShadowValue);
if (EnableShadowValue)
{
SetShaderValue(GetPixelShader(),ShadowDirection,ShadowDirectionValue);
SetShaderValue(GetPixelShader(),ShadowColor,ShadowColorValue);
SetShaderValue(GetPixelShader(),ShadowSmoothWidth,ShadowSmoothWidthValue);
}
SetPixelShaderBool(GetPixelShader(),EnableGlow,GlowInfo.bEnableGlow);
if (GlowInfo.bEnableGlow)
{
SetShaderValue(GetPixelShader(),GlowColor,GlowInfo.GlowColor);
SetShaderValue(GetPixelShader(),GlowOuterRadius,GlowInfo.GlowOuterRadius);
SetShaderValue(GetPixelShader(),GlowInnerRadius,GlowInfo.GlowInnerRadius);
}
// This shader does not use editor compositing
SetEditorCompositingParameters( NULL, FTexture2DRHIRef() );
}
示例6: SetParameters
void SetParameters(FRHICommandList& RHICmdList, int32 SourceMipIndexValue, FTextureRHIRef& SourceTextureValue)
{
SetShaderValue(RHICmdList, GetPixelShader(), SourceMipIndex, SourceMipIndexValue);
SetTextureParameter(
RHICmdList,
GetPixelShader(),
SourceTexture,
SourceTextureSampler,
TStaticSamplerState<SF_Point, AM_Clamp, AM_Clamp, AM_Clamp>::GetRHI(),
SourceTextureValue);
}
示例7: SetParameters
void SetParameters(FRHICommandList& RHICmdList, const FSceneView& View, const FMaterialRenderProxy* MaterialProxy, const FDeferredDecalProxy& DecalProxy, const float FadeAlphaValue=1.0f)
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FMaterialShader::SetParameters(RHICmdList, ShaderRHI, MaterialProxy, *MaterialProxy->GetMaterial(View.GetFeatureLevel()), View, true, ESceneRenderTargetsMode::SetTextures);
FTransform ComponentTrans = DecalProxy.ComponentTrans;
FMatrix WorldToComponent = ComponentTrans.ToInverseMatrixWithScale();
// Set the transform from screen space to light space.
if(ScreenToDecal.IsBound())
{
const FMatrix ScreenToDecalValue =
FMatrix(
FPlane(1,0,0,0),
FPlane(0,1,0,0),
FPlane(0,0,View.ViewMatrices.ProjMatrix.M[2][2],1),
FPlane(0,0,View.ViewMatrices.ProjMatrix.M[3][2],0)
) * View.InvViewProjectionMatrix * WorldToComponent;
SetShaderValue(RHICmdList, ShaderRHI, ScreenToDecal, ScreenToDecalValue);
}
// Set the transform from light space to world space
if(DecalToWorld.IsBound())
{
const FMatrix DecalToWorldValue = ComponentTrans.ToMatrixWithScale();
SetShaderValue(RHICmdList, ShaderRHI, DecalToWorld, DecalToWorldValue);
}
SetShaderValue(RHICmdList, ShaderRHI, FadeAlpha, FadeAlphaValue);
SetShaderValue(RHICmdList, ShaderRHI, WorldToDecal, WorldToComponent);
}
示例8: SetParameters
void SetParameters(FRHICommandList& RHICmdList, const FViewInfo& View)
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FGlobalShader::SetParameters(RHICmdList, ShaderRHI, View );
FSceneRenderTargets& SceneContext = FSceneRenderTargets::Get(RHICmdList);
const FIntPoint GBufferSize = SceneContext.GetBufferSizeXY();
const FVector2D InvSize( 1.0f / float(GBufferSize.X), 1.0f / float(GBufferSize.Y) );
const FVector4 InputUvFactorAndOffset (
float(2 * View.HZBMipmap0Size.X) / float(GBufferSize.X),
float(2 * View.HZBMipmap0Size.Y) / float(GBufferSize.Y),
float(View.ViewRect.Min.X) / float(GBufferSize.X),
float(View.ViewRect.Min.Y) / float(GBufferSize.Y)
);
const FVector2D InputViewportMaxBound (
float(View.ViewRect.Max.X) / float(GBufferSize.X) - 0.5f * InvSize.X,
float(View.ViewRect.Max.Y) / float(GBufferSize.Y) - 0.5f * InvSize.Y
);
SetShaderValue(RHICmdList, ShaderRHI, InvSizeParameter, InvSize );
SetShaderValue(RHICmdList, ShaderRHI, InputUvFactorAndOffsetParameter, InputUvFactorAndOffset );
SetShaderValue(RHICmdList, ShaderRHI, InputViewportMaxBoundParameter, InputViewportMaxBound );
SceneTextureParameters.Set(RHICmdList, ShaderRHI, View );
}
示例9: 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 );
}
示例10: 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);
}
示例11: GetPixelShader
void FSlateMaterialShaderPS::SetParameters(FRHICommandList& RHICmdList, const FSceneView& View, const FMaterialRenderProxy* MaterialRenderProxy, const FMaterial* Material, float InDisplayGamma, const FVector4& InShaderParams )
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
EBlendMode BlendMode = Material->GetBlendMode();
switch (BlendMode)
{
default:
case BLEND_Opaque:
RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI());
break;
case BLEND_Masked:
RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI());
break;
case BLEND_Translucent:
RHICmdList.SetBlendState(TStaticBlendState<CW_RGB, BO_Add, BF_SourceAlpha, BF_InverseSourceAlpha, BO_Add, BF_Zero, BF_InverseSourceAlpha>::GetRHI());
break;
case BLEND_Additive:
// Add to the existing scene color
RHICmdList.SetBlendState(TStaticBlendState<CW_RGB, BO_Add, BF_One, BF_One, BO_Add, BF_Zero, BF_InverseSourceAlpha>::GetRHI());
break;
case BLEND_Modulate:
// Modulate with the existing scene color
RHICmdList.SetBlendState(TStaticBlendState<CW_RGB, BO_Add, BF_DestColor, BF_Zero>::GetRHI());
break;
};
SetShaderValue( RHICmdList, ShaderRHI, DisplayGamma, InDisplayGamma );
SetShaderValue( RHICmdList, ShaderRHI, ShaderParams, InShaderParams );
const bool bDeferredPass = false;
FMaterialShader::SetParameters<FPixelShaderRHIParamRef>(RHICmdList, ShaderRHI, MaterialRenderProxy, *Material, View, bDeferredPass, ESceneRenderTargetsMode::SetTextures);
}
示例12: GetPixelShader
void FIESLightProfilePS::SetParameters( FRHICommandList& RHICmdList, const FTexture* Texture, float InBrightnessInLumens )
{
FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
SetTextureParameter(RHICmdList, ShaderRHI, IESTexture, IESTextureSampler, Texture);
SetShaderValue(RHICmdList, ShaderRHI, BrightnessInLumens, InBrightnessInLumens);
}
示例13: SetParameters
void SetParameters(const FRenderingCompositePassContext& Context)
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FGlobalShader::SetParameters(Context.RHICmdList, ShaderRHI, Context.View);
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Bilinear,AM_Border,AM_Border,AM_Border>::GetRHI());
}
示例14: SetParameters
void SetParameters(const FSceneView& View)
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FGlobalShader::SetParameters(ShaderRHI, View);
DeferredParameters.Set(ShaderRHI, View);
}
示例15: SetParameters
void SetParameters(FRHICommandList& RHICmdList, const FRenderingCompositePassContext& Context, const FMaterialRenderProxy* Material )
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FMaterialShader::SetParameters(RHICmdList, ShaderRHI, Material, *Material->GetMaterial(Context.View.GetFeatureLevel()), Context.View, true, ESceneRenderTargetsMode::SetTextures);
PostprocessParameter.SetPS(ShaderRHI, Context, TStaticSamplerState<SF_Point,AM_Clamp,AM_Clamp,AM_Clamp>::GetRHI());
}