mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Merge branch 'arb_framebuffer' into GLSL-master
Conflicts: Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp Source/Plugins/Plugin_VideoOGL/Src/Render.cpp Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
This commit is contained in:
@ -253,8 +253,7 @@ void VertexShaderManager::SetConstants()
|
||||
float GC_ALIGNED16(material[4]);
|
||||
float NormalizationCoef = 1 / 255.0f;
|
||||
|
||||
// TODO: This code is wrong. i goes out of range for xfregs.ambColor.
|
||||
for (int i = 0; i < 4; ++i)
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (nMaterialsChanged & (1 << i))
|
||||
{
|
||||
@ -268,6 +267,21 @@ void VertexShaderManager::SetConstants()
|
||||
SetVSConstant4fv(C_MATERIALS + i, material);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (nMaterialsChanged & (1 << (i + 2)))
|
||||
{
|
||||
u32 data = *(xfregs.matColor + i);
|
||||
|
||||
material[0] = ((data >> 24) & 0xFF) * NormalizationCoef;
|
||||
material[1] = ((data >> 16) & 0xFF) * NormalizationCoef;
|
||||
material[2] = ((data >> 8) & 0xFF) * NormalizationCoef;
|
||||
material[3] = ( data & 0xFF) * NormalizationCoef;
|
||||
|
||||
SetVSConstant4fv(C_MATERIALS + i + 2, material);
|
||||
}
|
||||
}
|
||||
|
||||
nMaterialsChanged = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user