mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-05 11:44:49 +12:00
Shader Decompiler: Fix vertex attribute upload
This commit is contained in:
parent
efcb42af2c
commit
d9f4f3736f
3 changed files with 34 additions and 21 deletions
|
@ -364,7 +364,8 @@ void GPU::drawArrays() {
|
|||
PICA::Vertex& out = vertices[i];
|
||||
for (int j = 0; j < totalAttribCount; j++) {
|
||||
const u32 mapping = (inputAttrCfg >> (j * 4)) & 0xf;
|
||||
std::memcpy(&out.raw[mapping], ¤tAttributes[j], sizeof(vec4f));
|
||||
// Multiply mapping * 4 as mapping refers to a vec4 whereas out.raw is an array of floats
|
||||
std::memcpy(&out.raw[mapping * 4], ¤tAttributes[j], sizeof(vec4f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue