Skip to content

Commit

Permalink
fix white noise effect
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Pollind <[email protected]>
  • Loading branch information
pollend committed Sep 7, 2023
1 parent 47becbf commit e4056bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions HPL2/resource/gui.frag.fsl
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ float4 PS_MAIN(PsIn In)
INIT_MAIN;
if(HasClipPlanes(Get(textureConfig)))
{
for(int i = 0; i < 4; i++)
{
float d = dot(Get(clipPlane)[i], float4(In.pos, 1.0));
if(d < 0.0)
for(int i = 0; i < 4; i++)
{
discard;
float d = dot(Get(clipPlane)[i], float4(In.pos, 1.0));
if(d < 0.0)
{
discard;
}
}
}
}

float4 color = In.Color; // Get the input color.
Expand Down
6 changes: 3 additions & 3 deletions HPL2/sources/gui/GuiSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ namespace hpl {
samplerDesc.mMipLodBias = 0.f;
samplerDesc.mMaxAnisotropy = 16.f;
samplerDesc.mMipMapMode = MIPMAP_MODE_LINEAR;
samplerDesc.mAddressU = ADDRESS_MODE_CLAMP_TO_BORDER;
samplerDesc.mAddressV = ADDRESS_MODE_CLAMP_TO_BORDER;
samplerDesc.mAddressW = ADDRESS_MODE_CLAMP_TO_BORDER;
samplerDesc.mAddressU = ADDRESS_MODE_CLAMP_TO_EDGE;
samplerDesc.mAddressV = ADDRESS_MODE_CLAMP_TO_EDGE;
samplerDesc.mAddressW = ADDRESS_MODE_CLAMP_TO_EDGE;
addSampler(pipeline.Rend(), &samplerDesc, &GuiSampler);
}
{
Expand Down

0 comments on commit e4056bf

Please sign in to comment.