Skip to content

Commit

Permalink
rename parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed Oct 30, 2024
1 parent e2e9e81 commit 49e0840
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,27 +146,27 @@ void RendererOutputShader::SetUniformParameters(const LatteTextureView& texture_
{
sint32 effectiveWidth, effectiveHeight;
texture_view.baseTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, 0);
auto setUniforms = [&](RendererShader* shader, const UniformLocations& attributes){
auto setUniforms = [&](RendererShader* shader, const UniformLocations& locations){
float res[2];
if (attributes.m_loc_textureSrcResolution != -1)
if (locations.m_loc_textureSrcResolution != -1)
{
res[0] = (float)effectiveWidth;
res[1] = (float)effectiveHeight;
shader->SetUniform2fv(attributes.m_loc_textureSrcResolution, res, 1);
shader->SetUniform2fv(locations.m_loc_textureSrcResolution, res, 1);
}

if (attributes.m_loc_nativeResolution != -1)
if (locations.m_loc_nativeResolution != -1)
{
res[0] = (float)texture_view.baseTexture->width;
res[1] = (float)texture_view.baseTexture->height;
shader->SetUniform2fv(attributes.m_loc_nativeResolution, res, 1);
shader->SetUniform2fv(locations.m_loc_nativeResolution, res, 1);
}

if (attributes.m_loc_outputResolution != -1)
if (locations.m_loc_outputResolution != -1)
{
res[0] = (float)output_res.x;
res[1] = (float)output_res.y;
shader->SetUniform2fv(attributes.m_loc_outputResolution, res, 1);
shader->SetUniform2fv(locations.m_loc_outputResolution, res, 1);
}
};
setUniforms(m_vertex_shader, m_uniformLocations[0]);
Expand Down

0 comments on commit 49e0840

Please sign in to comment.