Skip to content

Commit

Permalink
Fixing bug in projections. Projections altered the sampler state for …
Browse files Browse the repository at this point in the history
…layer 0 without updating state tracking. (Perhaps sampler state changes should be wrapped in a function.)
  • Loading branch information
colincornaby committed Sep 10, 2023
1 parent 8f242be commit 02a6467
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,7 @@ void plMetalPipeline::IRenderProjection(const plRenderPrimFunc& render, plLightI
fDevice.CurrentRenderCommandEncoder()->setFragmentTexture(tex->fTexture, 0);
MTL::SamplerState* samplerState = fDevice.SampleStateForClampFlags(hsGMatState::hsGMatClampFlags(proj->GetClampFlags()));
fDevice.CurrentRenderCommandEncoder()->setFragmentSamplerState(samplerState, 0);
fState.layerStates[0].clampFlag = hsGMatState::hsGMatClampFlags(proj->GetClampFlags());

// Okay, render it already.

Expand Down

0 comments on commit 02a6467

Please sign in to comment.