mirror of https://github.com/PCSX2/pcsx2.git
GSdx: Adjust Scaling Factor.
Use value of 1 when upscale multiplier is 0 for ScalingFactor, this is to avoid doing math with 0 in shader. It helps custom res be less broken. Still not recommended to use custom res ofc.
This commit is contained in:
parent
55bc8e13fc
commit
2aadf0be89
|
@ -186,7 +186,7 @@ bool GSDevice11::Create(const std::shared_ptr<GSWnd> &wnd)
|
|||
|
||||
std::string convert_mstr[1];
|
||||
|
||||
convert_mstr[0] = format("%d", m_upscale_multiplier);
|
||||
convert_mstr[0] = format("%d", m_upscale_multiplier ? m_upscale_multiplier : 1);
|
||||
|
||||
D3D_SHADER_MACRO convert_macro[] =
|
||||
{
|
||||
|
|
|
@ -233,7 +233,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
|
|||
str[21] = format("%d", sel.dfmt);
|
||||
str[22] = format("%d", sel.depth_fmt);
|
||||
str[23] = format("%d", sel.fmt >> 2);
|
||||
str[24] = format("%d", m_upscale_multiplier);
|
||||
str[24] = format("%d", m_upscale_multiplier ? m_upscale_multiplier : 1);
|
||||
|
||||
D3D_SHADER_MACRO macro[] =
|
||||
{
|
||||
|
|
|
@ -377,8 +377,10 @@ bool GSDeviceOGL::Create(const std::shared_ptr<GSWnd> &wnd)
|
|||
GL_PUSH("GSDeviceOGL::Convert");
|
||||
|
||||
m_convert.cb = new GSUniformBufferOGL("Misc UBO", g_convert_index, sizeof(MiscConstantBuffer));
|
||||
// Upload once and forget about it
|
||||
m_misc_cb_cache.ScalingFactor = GSVector4i(theApp.GetConfigI("upscale_multiplier"));
|
||||
// Upload once and forget about it.
|
||||
// Use value of 1 when upscale multiplier is 0 for ScalingFactor,
|
||||
// this is to avoid doing math with 0 in shader. It helps custom res be less broken.
|
||||
m_misc_cb_cache.ScalingFactor = GSVector4i(theApp.GetConfigI("upscale_multiplier") ? theApp.GetConfigI("upscale_multiplier") : 1);
|
||||
m_convert.cb->cache_upload(&m_misc_cb_cache);
|
||||
|
||||
theApp.LoadResource(IDR_CONVERT_GLSL, shader);
|
||||
|
|
Loading…
Reference in New Issue