mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: extend HDR colclip to 32 bits texture
Unfortunately 16 bits wasn't enough for Castlevania.
This commit is contained in:
parent
6e1cd077a9
commit
45bb27d6db
|
@ -959,7 +959,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
|||
}
|
||||
|
||||
if (ps_sel.hdr) {
|
||||
hdr_rt = dev->CreateTexture(rtsize.x, rtsize.y, GL_RGBA16F);
|
||||
hdr_rt = dev->CreateTexture(rtsize.x, rtsize.y, GL_RGBA32F);
|
||||
|
||||
dev->CopyRectConv(rt, hdr_rt, ComputeBoundingBox(rtscale, rtsize), false);
|
||||
|
||||
|
|
|
@ -598,6 +598,9 @@ void ps_main()
|
|||
|
||||
#if PS_HDR == 1
|
||||
// Use negative value to avoid overflow of the texture (in accumulation mode)
|
||||
// Note: code were initially done for an Half-Float texture. Due to overflow
|
||||
// the texture was upgraded to a full float. Maybe this code is useless now!
|
||||
// Good testcase is castlevania
|
||||
if (any(greaterThan(C.rgb, vec3(128.0f)))) {
|
||||
C.rgb = (C.rgb - 256.0f);
|
||||
}
|
||||
|
|
|
@ -1473,6 +1473,9 @@ static const char* tfx_fs_all_glsl =
|
|||
"\n"
|
||||
"#if PS_HDR == 1\n"
|
||||
" // Use negative value to avoid overflow of the texture (in accumulation mode)\n"
|
||||
" // Note: code were initially done for an Half-Float texture. Due to overflow\n"
|
||||
" // the texture was upgraded to a full float. Maybe this code is useless now!\n"
|
||||
" // Good testcase is castlevania\n"
|
||||
" if (any(greaterThan(C.rgb, vec3(128.0f)))) {\n"
|
||||
" C.rgb = (C.rgb - 256.0f);\n"
|
||||
" }\n"
|
||||
|
|
Loading…
Reference in New Issue