mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Fix palette conversions for 4 bit efb copies.
Fixes purple shadow in THPS4 and many other things.
This commit is contained in:
parent
e745748c3e
commit
137856bd00
@ -337,7 +337,7 @@ void TextureCache::ConvertTexture(TCacheEntryBase* entry, TCacheEntryBase* uncon
|
|||||||
D3D::stateman->SetTexture(1, palette_buf_srv);
|
D3D::stateman->SetTexture(1, palette_buf_srv);
|
||||||
|
|
||||||
// TODO: Add support for C14X2 format. (Different multiplier, more palette entries.)
|
// TODO: Add support for C14X2 format. (Different multiplier, more palette entries.)
|
||||||
float params[4] = { unconverted->format == 0 ? 15.f : 255.f };
|
float params[4] = { (unconverted->format & 0xf) == 0 ? 15.f : 255.f };
|
||||||
D3D::context->UpdateSubresource(palette_uniform, 0, nullptr, ¶ms, 0, 0);
|
D3D::context->UpdateSubresource(palette_uniform, 0, nullptr, ¶ms, 0, 0);
|
||||||
D3D::stateman->SetPixelConstants(palette_uniform);
|
D3D::stateman->SetPixelConstants(palette_uniform);
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@ void TextureCache::ConvertTexture(TCacheEntryBase* _entry, TCacheEntryBase* _unc
|
|||||||
memcpy(buffer.first, palette, size);
|
memcpy(buffer.first, palette, size);
|
||||||
s_palette_stream_buffer->Unmap(size);
|
s_palette_stream_buffer->Unmap(size);
|
||||||
glUniform1i(s_palette_buffer_offset_uniform[format], buffer.second / 2);
|
glUniform1i(s_palette_buffer_offset_uniform[format], buffer.second / 2);
|
||||||
glUniform1f(s_palette_multiplier_uniform[format], unconverted->format == 0 ? 15.0f : 255.0f);
|
glUniform1f(s_palette_multiplier_uniform[format], (unconverted->format & 0xf) == 0 ? 15.0f : 255.0f);
|
||||||
glUniform4f(s_palette_copy_position_uniform[format], 0.0f, 0.0f, (float)unconverted->config.width, (float)unconverted->config.height);
|
glUniform4f(s_palette_copy_position_uniform[format], 0.0f, 0.0f, (float)unconverted->config.width, (float)unconverted->config.height);
|
||||||
|
|
||||||
glActiveTexture(GL_TEXTURE10);
|
glActiveTexture(GL_TEXTURE10);
|
||||||
|
Loading…
Reference in New Issue
Block a user