Graphics/MaterialPass: Fix shader option index

This commit is contained in:
Jérôme Leclercq 2022-02-23 13:14:30 +01:00
parent 004c0d84b1
commit 1e9e05adfa
1 changed files with 2 additions and 1 deletions

View File

@ -142,7 +142,8 @@ namespace Nz
if (!option.optionIndexByShader[shaderIndex].has_value()) if (!option.optionIndexByShader[shaderIndex].has_value())
continue; continue;
m_pipelineInfo.shaders[shaderIndex].optionValues[optionIndex] = m_optionValues[optionIndex]; std::size_t shaderOptionIndex = *option.optionIndexByShader[shaderIndex];
m_pipelineInfo.shaders[shaderIndex].optionValues[shaderOptionIndex] = m_optionValues[optionIndex];
} }
} }