mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-09 16:31:19 +12:00
fix: color write mask and unpackHalf2x16
This commit is contained in:
parent
c6ab45a098
commit
eb573fcaca
6 changed files with 30 additions and 11 deletions
|
@ -3734,8 +3734,9 @@ void LatteDecompiler_emitHelperFunctions(LatteDecompilerShaderContext* shaderCon
|
|||
|
||||
// unpackHalf2x16
|
||||
fCStr_shaderSource->add(""
|
||||
"float2 unpackHalf2x16(float x) {\r\n"
|
||||
"return float2(as_type<half>(ushort(as_type<uint>(x) & 0x00FF)), as_type<half>(ushort((as_type<uint>(x) & 0xFF00) >> 16)));\r\n"
|
||||
"template<typename T>\r\n"
|
||||
"float2 unpackHalf2x16(T x) {\r\n"
|
||||
"return float2(as_type<half2>(x));\r\n"
|
||||
"}\r\n");
|
||||
|
||||
// Bit cast
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue