mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user