mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
VideoCommon: fix MaterialAsset so that boolean parameters are written to memory as integers, matching the format internally expected by shaders
This commit is contained in:
parent
4f30aaf1ca
commit
6e13a7d7e9
@ -197,7 +197,12 @@ void MaterialProperty::WriteToMemory(u8*& buffer, const MaterialProperty& proper
|
|||||||
[&](const std::array<float, 2>& value) { write_memory(value.data(), sizeof(float) * 2); },
|
[&](const std::array<float, 2>& value) { write_memory(value.data(), sizeof(float) * 2); },
|
||||||
[&](const std::array<float, 3>& value) { write_memory(value.data(), sizeof(float) * 3); },
|
[&](const std::array<float, 3>& value) { write_memory(value.data(), sizeof(float) * 3); },
|
||||||
[&](const std::array<float, 4>& value) { write_memory(value.data(), sizeof(float) * 4); },
|
[&](const std::array<float, 4>& value) { write_memory(value.data(), sizeof(float) * 4); },
|
||||||
[&](bool value) { write_memory(&value, sizeof(bool)); }},
|
|
||||||
|
// Bool has the size of an int in the shader
|
||||||
|
[&](bool value) {
|
||||||
|
u32 val = static_cast<u32>(value);
|
||||||
|
write_memory(&val, sizeof(u32));
|
||||||
|
}},
|
||||||
property.m_value);
|
property.m_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user