mirror of
https://github.com/rt64/rt64.git
synced 2025-04-24 09:02:42 +00:00
Adjust mip bias.
This commit is contained in:
parent
9f55e2d2af
commit
676bd084f5
@ -192,7 +192,7 @@ namespace RT64 {
|
||||
samplerDesc.addressW = RenderTextureAddressMode::CLAMP;
|
||||
|
||||
// This matches the bias used in the shader when native samplers are not used.
|
||||
samplerDesc.mipLODBias = -0.5f;
|
||||
samplerDesc.mipLODBias = -0.25f;
|
||||
|
||||
// WRAP.
|
||||
samplerDesc.addressU = RenderTextureAddressMode::WRAP;
|
||||
|
@ -215,7 +215,7 @@ float4 sampleTexture(OtherMode otherMode, RenderFlags renderFlags, float2 inputU
|
||||
float2 ddxUVxScaled = ddxUVx * gpuTile.tcScale;
|
||||
float2 ddxUVyScaled = ddyUVy * gpuTile.tcScale;
|
||||
float ddMax = max(dot(ddxUVxScaled, ddxUVxScaled), dot(ddxUVyScaled, ddxUVyScaled));
|
||||
float mipBias = -0.5f;
|
||||
float mipBias = -0.25f;
|
||||
mip = 0.5 * log2(ddMax) + mipBias;
|
||||
float maxMip = float(textureLevels - 1);
|
||||
RDPMipLevels[0] = min(floor(mip), maxMip);
|
||||
|
Loading…
x
Reference in New Issue
Block a user