summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PostProcessing.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2015-01-03 01:33:30 +0100
committerJules Blok <jules.blok@gmail.com>2015-01-25 22:07:03 +0100
commit262c3b19ecf9a4c022b3667613f892a5539dd34d (patch)
tree07373ea748296cf4e366a8a899c83172b6ac59c2 /Source/Core/VideoCommon/PostProcessing.cpp
parenta93433a860af23ca862fe3f1f0e58d1ea6dfd9d4 (diff)
PostProcessing: Add support for user-supplied anaglyph shaders.
There are lots of different anaglyph glasses out there and there may be even more creative uses for stereoscopic post-processing shaders.
Diffstat (limited to 'Source/Core/VideoCommon/PostProcessing.cpp')
-rw-r--r--Source/Core/VideoCommon/PostProcessing.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/PostProcessing.cpp b/Source/Core/VideoCommon/PostProcessing.cpp
index b4ee1e8702..c27b0f89fc 100644
--- a/Source/Core/VideoCommon/PostProcessing.cpp
+++ b/Source/Core/VideoCommon/PostProcessing.cpp
@@ -30,14 +30,16 @@ std::string PostProcessingShaderConfiguration::LoadShader(std::string shader)
shader = g_ActiveConfig.sPostProcessingShader;
m_current_shader = shader;
+ const std::string sub_dir = (g_Config.iStereoMode == STEREO_ANAGLYPH) ? ANAGLYPH_DIR DIR_SEP : "";
+
// loading shader code
std::string code;
- std::string path = File::GetUserPath(D_SHADERS_IDX) + shader + ".glsl";
+ std::string path = File::GetUserPath(D_SHADERS_IDX) + sub_dir + shader + ".glsl";
if (!File::Exists(path))
{
// Fallback to shared user dir
- path = File::GetSysDirectory() + SHADERS_DIR DIR_SEP + shader + ".glsl";
+ path = File::GetSysDirectory() + SHADERS_DIR DIR_SEP + sub_dir + shader + ".glsl";
}
if (!File::ReadFileToString(path, code))