Skip to content

Commit

Permalink
Fix GPUParticles are not rendered for older AMD GPUs with OpenGL+Angle
Browse files Browse the repository at this point in the history
  • Loading branch information
Maran23 committed Aug 31, 2024
1 parent 61598c5 commit a7823e0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/gles3/shaders/stdlib_inc.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ uint float2half(uint f) {
}

uint half2float(uint h) {
uint h_e = h & uint(0x7c00);
return ((h & uint(0x8000)) << uint(16)) | uint((h_e >> uint(10)) != uint(0)) * (((h_e + uint(0x1c000)) << uint(13)) | ((h & uint(0x03ff)) << uint(13)));
uint h_e = h & uint(0x7c00);
if (h_e == uint(0x7c00)) {
return uint(0);
} else {
return ((h & uint(0x8000)) << uint(16)) | ((h_e + uint(0x1c000)) << uint(13)) | ((h & uint(0x03ff)) << uint(13));
}
}

uint godot_packHalf2x16(vec2 v) {
Expand Down

0 comments on commit a7823e0

Please sign in to comment.