MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / CompileShadeBoostProgram

Method CompileShadeBoostProgram

pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp:2222–2237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2220}
2221
2222bool GSDeviceOGL::CompileShadeBoostProgram()
2223{
2224 const std::optional<std::string> shader = ReadShaderSource("shaders/opengl/shadeboost.glsl");
2225 if (!shader.has_value())
2226 {
2227 Host::ReportErrorAsync("GS", "Failed to read shaders/opengl/shadeboost.glsl.");
2228 return false;
2229 }
2230
2231 const std::string ps(GetShaderSource("ps_main", GL_FRAGMENT_SHADER, *shader));
2232 if (!m_shader_cache.GetProgram(&m_shadeboost.ps, m_convert.vs, ps))
2233 return false;
2234 m_shadeboost.ps.RegisterUniform("params");
2235 m_shadeboost.ps.SetName("Shadeboost pipe");
2236 return true;
2237}
2238
2239void GSDeviceOGL::DoShadeBoost(GSTexture* sTex, GSTexture* dTex, const float params[4])
2240{

Callers

nothing calls this directly

Calls 3

GetProgramMethod · 0.80
RegisterUniformMethod · 0.80
SetNameMethod · 0.45

Tested by

no test coverage detected