mirror of https://github.com/PCSX2/pcsx2.git
Resources: Move shaders to shared shader/ directory
This commit is contained in:
parent
e03076c6ff
commit
da651cabe4
|
@ -218,7 +218,7 @@ bool GSDevice11::Create(const WindowInfo& wi)
|
|||
m_hack_topleft_offset = (m_upscale_multiplier != 1 && D3D::IsNvidia(adapter.get()) && !disable_safe_features) ? -0.01f : 0.0f;
|
||||
}
|
||||
|
||||
std::optional<std::string> shader = Host::ReadResourceFileToString("gs_dx11/tfx.fx");
|
||||
std::optional<std::string> shader = Host::ReadResourceFileToString("shaders/dx11/tfx.fx");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
m_tfx_source = std::move(*shader);
|
||||
|
@ -234,7 +234,7 @@ bool GSDevice11::Create(const WindowInfo& wi)
|
|||
|
||||
ShaderMacro sm_model(m_shader.model);
|
||||
|
||||
shader = Host::ReadResourceFileToString("gs_dx11/convert.fx");
|
||||
shader = Host::ReadResourceFileToString("shaders/dx11/convert.fx");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
CreateShader(*shader, "convert.fx", nullptr, "vs_main", sm_model.GetPtr(), &m_convert.vs, il_convert, std::size(il_convert), m_convert.il.put());
|
||||
|
@ -275,7 +275,7 @@ bool GSDevice11::Create(const WindowInfo& wi)
|
|||
|
||||
m_dev->CreateBuffer(&bd, nullptr, m_merge.cb.put());
|
||||
|
||||
shader = Host::ReadResourceFileToString("gs_dx11/merge.fx");
|
||||
shader = Host::ReadResourceFileToString("shaders/dx11/merge.fx");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
|
||||
|
@ -307,7 +307,7 @@ bool GSDevice11::Create(const WindowInfo& wi)
|
|||
|
||||
m_dev->CreateBuffer(&bd, nullptr, m_interlace.cb.put());
|
||||
|
||||
shader = Host::ReadResourceFileToString("gs_dx11/interlace.fx");
|
||||
shader = Host::ReadResourceFileToString("shaders/dx11/interlace.fx");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
for (size_t i = 0; i < std::size(m_interlace.ps); i++)
|
||||
|
@ -331,7 +331,7 @@ bool GSDevice11::Create(const WindowInfo& wi)
|
|||
|
||||
m_dev->CreateBuffer(&bd, nullptr, m_shadeboost.cb.put());
|
||||
|
||||
shader = Host::ReadResourceFileToString("gs_dx11/shadeboost.fx");
|
||||
shader = Host::ReadResourceFileToString("shaders/dx11/shadeboost.fx");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
CreateShader(*shader, "shadeboost.fx", nullptr, "ps_main", sm_sboost.GetPtr(), m_shadeboost.ps.put());
|
||||
|
@ -969,7 +969,7 @@ void GSDevice11::DoFXAA(GSTexture* sTex, GSTexture* dTex)
|
|||
{
|
||||
try
|
||||
{
|
||||
std::optional<std::string> shader = Host::ReadResourceFileToString("gs_dx11/fxaa.fx");
|
||||
std::optional<std::string> shader = Host::ReadResourceFileToString("shaders/dx11/fxaa.fx");
|
||||
if (shader.has_value())
|
||||
{
|
||||
ShaderMacro sm(m_shader.model);
|
||||
|
|
|
@ -323,7 +323,7 @@ bool GSDeviceOGL::Create(const WindowInfo& wi)
|
|||
}
|
||||
|
||||
{
|
||||
auto shader = Host::ReadResourceFileToString("gs_opengl/common_header.glsl");
|
||||
auto shader = Host::ReadResourceFileToString("shaders/opengl/common_header.glsl");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
|
||||
|
@ -444,7 +444,7 @@ bool GSDeviceOGL::Create(const WindowInfo& wi)
|
|||
m_misc_cb_cache.ScalingFactor = GSVector4i(std::max(1, theApp.GetConfigI("upscale_multiplier")));
|
||||
m_convert.cb->cache_upload(&m_misc_cb_cache);
|
||||
|
||||
const auto shader = Host::ReadResourceFileToString("gs_opengl/convert.glsl");
|
||||
const auto shader = Host::ReadResourceFileToString("shaders/opengl/convert.glsl");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
|
||||
|
@ -480,7 +480,7 @@ bool GSDeviceOGL::Create(const WindowInfo& wi)
|
|||
|
||||
m_merge_obj.cb = new GSUniformBufferOGL("Merge UBO", g_merge_cb_index, sizeof(MergeConstantBuffer));
|
||||
|
||||
const auto shader = Host::ReadResourceFileToString("gs_opengl/merge.glsl");
|
||||
const auto shader = Host::ReadResourceFileToString("shaders/opengl/merge.glsl");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
|
||||
|
@ -500,7 +500,7 @@ bool GSDeviceOGL::Create(const WindowInfo& wi)
|
|||
|
||||
m_interlace.cb = new GSUniformBufferOGL("Interlace UBO", g_interlace_cb_index, sizeof(InterlaceConstantBuffer));
|
||||
|
||||
const auto shader = Host::ReadResourceFileToString("gs_opengl/interlace.glsl");
|
||||
const auto shader = Host::ReadResourceFileToString("shaders/opengl/interlace.glsl");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
|
||||
|
@ -525,7 +525,7 @@ bool GSDeviceOGL::Create(const WindowInfo& wi)
|
|||
+ format("#define SB_BRIGHTNESS %d.0\n", ShadeBoost_Brightness)
|
||||
+ format("#define SB_CONTRAST %d.0\n", ShadeBoost_Contrast);
|
||||
|
||||
const auto shader = Host::ReadResourceFileToString("gs_opengl/shadeboost.glsl");
|
||||
const auto shader = Host::ReadResourceFileToString("shaders/opengl/shadeboost.glsl");
|
||||
if (!shader.has_value())
|
||||
return false;
|
||||
|
||||
|
@ -654,8 +654,8 @@ bool GSDeviceOGL::CreateTextureFX()
|
|||
{
|
||||
GL_PUSH("GSDeviceOGL::CreateTextureFX");
|
||||
|
||||
auto vertex_shader = Host::ReadResourceFileToString("gs_opengl/tfx_vgs.glsl");
|
||||
auto fragment_shader = Host::ReadResourceFileToString("gs_opengl/tfx_fs.glsl");
|
||||
auto vertex_shader = Host::ReadResourceFileToString("shaders/opengl/tfx_vgs.glsl");
|
||||
auto fragment_shader = Host::ReadResourceFileToString("shaders/opengl/tfx_fs.glsl");
|
||||
if (!vertex_shader.has_value() || !fragment_shader.has_value())
|
||||
return false;
|
||||
|
||||
|
@ -1611,7 +1611,7 @@ void GSDeviceOGL::DoFXAA(GSTexture* sTex, GSTexture* dTex)
|
|||
std::string fxaa_macro = "#define FXAA_GLSL_130 1\n";
|
||||
fxaa_macro += "#extension GL_ARB_gpu_shader5 : enable\n";
|
||||
|
||||
std::optional<std::string> shader = Host::ReadResourceFileToString("gs_opengl/fxaa.fx");
|
||||
std::optional<std::string> shader = Host::ReadResourceFileToString("shaders/opengl/fxaa.fx");
|
||||
if (!shader.has_value())
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue