Skip to content

Commit

Permalink
[Testbed] Update sampler filter in ResourceArrays test.
Browse files Browse the repository at this point in the history
Left image is supposed to use nearest filter for detail map, not linear filter.
Since MIP-mapping is disabled in this test (due to renderer API implementation differences of MIP generation),
the magnification filter must be selected when sepcifying the nearest filter, not the minification filter, i.e. "filter.mag=nearest".
Also updated reference image for unit test.
  • Loading branch information
LukasBanana committed Jun 23, 2024
1 parent 352344f commit f3fce13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified tests/Testbed/Reference/ResourceArrays.Ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/Testbed/TestbedContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1047,10 +1047,10 @@ void TestbedContext::CreateSamplerStates()
{
samplers[SamplerNearest] = renderer->CreateSampler(Parse("filter=nearest"));
samplers[SamplerNearestClamp] = renderer->CreateSampler(Parse("filter=nearest,address=clamp"));
samplers[SamplerNearestNoMips] = renderer->CreateSampler(Parse("filter.min=nearest,filter.mip=none"));
samplers[SamplerNearestNoMips] = renderer->CreateSampler(Parse("filter.mag=nearest,filter.mip=none"));
samplers[SamplerLinear] = renderer->CreateSampler(Parse("filter=linear"));
samplers[SamplerLinearClamp] = renderer->CreateSampler(Parse("filter=linear,address=clamp"));
samplers[SamplerLinearNoMips] = renderer->CreateSampler(Parse("filter.min=linear,filter.mip=none"));
samplers[SamplerLinearNoMips] = renderer->CreateSampler(Parse("filter.mag=linear,filter.mip=none"));
}

void TestbedContext::LoadProjectionMatrix(Gs::Matrix4f& outProjection, float aspectRatio, float nearPlane, float farPlane, float fov)
Expand Down

0 comments on commit f3fce13

Please sign in to comment.