mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
Implement float-uniform out-of-bound return value
In the case that the resulting float-uniform index is greater than the 96 slots that it has, a result of `{1,1,1,1}` is to be returned.
This commit is contained in:
parent
dbdf7c4ffb
commit
17b4c68577
1 changed files with 2 additions and 0 deletions
|
@ -136,6 +136,8 @@ PICAShader::vec4f PICAShader::getSource(u32 source) {
|
|||
return tempRegisters[source - 0x10];
|
||||
else if (source <= 0x7f)
|
||||
return floatUniforms[source - 0x20];
|
||||
else if (source <= 0x7f + 96)
|
||||
return vec4f({f24::fromFloat32(1.0f), f24::fromFloat32(1.0f), f24::fromFloat32(1.0f), f24::fromFloat32(1.0f)});
|
||||
else {
|
||||
Helpers::warn("[PICA] Unimplemented source value: %X\n", source);
|
||||
return vec4f({f24::zero(), f24::zero(), f24::zero(), f24::zero()});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue