Merge pull request #73332 from clayjohn/GL-h2f-branch

Avoid branch in half2float in gl_compatibility renderer
This commit is contained in:
Rémi Verschelde 2023-02-15 22:46:47 +01:00 committed by GitHub
commit aa6ec76317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -14,11 +14,7 @@ uint float2half(uint f) {
uint half2float(uint h) { uint half2float(uint h) {
uint h_e = h & uint(0x7c00); uint h_e = h & uint(0x7c00);
if (h_e == uint(0x0000)) { return ((h & uint(0x8000)) << uint(16)) | uint((h_e >> uint(10)) != uint(0)) * (((h_e + uint(0x1c000)) << uint(13)) | ((h & uint(0x03ff)) << uint(13)));
return uint(0);
} else {
return ((h & uint(0x8000)) << uint(16)) | ((h_e + uint(0x1c000)) << uint(13)) | ((h & uint(0x03ff)) << uint(13));
}
} }
uint packHalf2x16(vec2 v) { uint packHalf2x16(vec2 v) {