mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-13 21:50:09 +00:00
PostProcessing/GLSL: Support OpenGL 3.1
This commit is contained in:
parent
742cfcb12b
commit
80a689257c
@ -185,7 +185,8 @@ GPUDevice::PresentResult PostProcessing::GLSLShader::Apply(GPUTexture* input_col
|
||||
else
|
||||
{
|
||||
g_gpu_device->SetRenderTargets(&final_target, 1, nullptr);
|
||||
g_gpu_device->ClearRenderTarget(final_target, GPUDevice::DEFAULT_CLEAR_COLOR); // TODO: Could use an invalidate here too.
|
||||
g_gpu_device->ClearRenderTarget(final_target,
|
||||
GPUDevice::DEFAULT_CLEAR_COLOR); // TODO: Could use an invalidate here too.
|
||||
}
|
||||
|
||||
g_gpu_device->SetPipeline(m_pipeline.get());
|
||||
@ -377,11 +378,12 @@ std::string PostProcessingGLSLShaderGen::GeneratePostProcessingFragmentShader(co
|
||||
WriteUniformBuffer(ss, shader, false);
|
||||
DeclareTexture(ss, "samp0", 0);
|
||||
|
||||
ss << R"(
|
||||
layout(location = 0) in VertexData {
|
||||
vec2 v_tex0;
|
||||
};
|
||||
if (m_use_glsl_interface_blocks)
|
||||
ss << "layout(location = 0) in VertexData { vec2 v_tex0; }\n";
|
||||
else
|
||||
ss << "layout(location = 0) in vec2 v_tex0;\n";
|
||||
|
||||
ss << R"(
|
||||
layout(location = 0) out float4 o_col0;
|
||||
|
||||
float4 Sample() { return texture(samp0, v_tex0); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user