mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
VideoCommon: Expose SamplerState to shaders
The benefit to exposing this over the raw BP state is that adjustments Dolphin makes, such as LOD biases from arbitrary mipmap detection, will work properly.
This commit is contained in:
parent
9ef228503a
commit
4a9b26de86
14 changed files with 188 additions and 139 deletions
|
@ -282,6 +282,15 @@ void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height)
|
|||
constants.texdims[texmapid][1] = height;
|
||||
}
|
||||
|
||||
void PixelShaderManager::SetSamplerState(int texmapid, u32 tm0, u32 tm1)
|
||||
{
|
||||
if (constants.pack2[texmapid][2] != tm0 || constants.pack2[texmapid][3] != tm1)
|
||||
dirty = true;
|
||||
|
||||
constants.pack2[texmapid][2] = tm0;
|
||||
constants.pack2[texmapid][3] = tm1;
|
||||
}
|
||||
|
||||
void PixelShaderManager::SetZTextureBias()
|
||||
{
|
||||
constants.zbias[1][3] = bpmem.ztex1.bias;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue