- Uniform buffers for lens shader

This commit is contained in:
Magnus Norddahl 2018-06-11 20:58:20 +02:00
commit d22fb24e28
4 changed files with 33 additions and 17 deletions

View file

@ -582,10 +582,11 @@ void FGLRenderer::LensDistortScene()
mBuffers->BindCurrentTexture(0, GL_LINEAR);
mLensShader->Bind();
mLensShader->InputTexture.Set(0);
mLensShader->AspectRatio.Set(aspect);
mLensShader->Scale.Set(scale);
mLensShader->LensDistortionCoefficient.Set(k);
mLensShader->CubicDistortionValue.Set(kcube);
mLensShader->Uniforms->AspectRatio = aspect;
mLensShader->Uniforms->Scale = scale;
mLensShader->Uniforms->LensDistortionCoefficient = k;
mLensShader->Uniforms->CubicDistortionValue = kcube;
mLensShader->Uniforms.Set();
RenderScreenQuad();
mBuffers->NextTexture();