HaxeFoundation / hxcpp

Runtime files for c++ backend for haxe
Other
298 stars 189 forks source link

f16/half worth supporting? #1074

Open nanjizal opened 11 months ago

nanjizal commented 11 months ago

Hugh

Is it hard to use F16 / half floats with haxe c++ not heard about them before. kha has. var GL_RGBA16F = 0x881A; heaps has https://github.com/HeapsIO/heaps/blob/master/hxd/PixelFormat.hx#L7C2-L7C9 ( heaps does not currently have f16 type). and nme https://github.com/haxenme/nme/blob/master/src/nme/gl/GL.hx#L537 so presume they can be used in haxe.

Specifically was curious about Richard Geldreich work on extending png's. The idea from my limited niave understanding is to create faster shader images by cramming more data in by using a wider dynamic range but with less intervals, but being backwards compatible with png implementations but abandoning the png specifications and extending it for something simpler allowing half floats. He posted this repo in relation, but I would not know how to use it and not yet linux anyway.

https://github.com/richgel999/png16/

Currently have been drawing pixels to png's from Int so hearing about f16 png's was a little curious, he said format png could be modified to support his cng's.

feel free to close just thought maybe of interest, and curious on thoughts regarding f16 haxe support and what usefulness it may have for tensor and shaders etc..

Best Justin