mirror of https://github.com/PCSX2/pcsx2.git
Merge branch 'hdr-colclip-32bits'
This commit is contained in:
commit
36554c3375
|
@ -964,7 +964,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);
|
||||
|
||||
|
|
|
@ -600,6 +600,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);
|
||||
}
|
||||
|
|
|
@ -1475,6 +1475,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