mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
rsx: Implement Texture LOD Bias addend setting
This commit is contained in:
parent
c0e121abef
commit
7fc26b1fab
2 changed files with 5 additions and 2 deletions
|
|
@ -264,7 +264,8 @@ namespace rsx
|
|||
|
||||
f32 fragment_texture::bias() const
|
||||
{
|
||||
return rsx::decode_fxp<4, 8>((registers[NV4097_SET_TEXTURE_FILTER + (m_index * 8)]) & 0x1fff);
|
||||
const f32 bias = rsx::decode_fxp<4, 8>((registers[NV4097_SET_TEXTURE_FILTER + (m_index * 8)]) & 0x1fff);
|
||||
return std::clamp<f32>(bias + g_cfg.video.texture_lod_bias, -16.f, 16.f - 1.f / 256);
|
||||
}
|
||||
|
||||
rsx::texture_minify_filter fragment_texture::min_filter() const
|
||||
|
|
@ -418,7 +419,8 @@ namespace rsx
|
|||
|
||||
f32 vertex_texture::bias() const
|
||||
{
|
||||
return rsx::decode_fxp<4, 8>((registers[NV4097_SET_VERTEX_TEXTURE_FILTER + (m_index * 8)]) & 0x1fff);
|
||||
const f32 bias = rsx::decode_fxp<4, 8>((registers[NV4097_SET_VERTEX_TEXTURE_FILTER + (m_index * 8)]) & 0x1fff);
|
||||
return std::clamp<f32>(bias + g_cfg.video.texture_lod_bias, -16.f, 16.f - 1.f / 256);
|
||||
}
|
||||
|
||||
rsx::texture_minify_filter vertex_texture::min_filter() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue