Closed haasn closed 6 years ago
Negative weights exist, so nornalized integer is not an option. The problem is that, the FORMAT
string of user texture is implementation dependent, although cpu side format of rgba16f
rgba16hf
and rgba32f
are all 32bit float (the format of user texture content)
However, with default options, ravu.py
generates user texture with rgba32f
format, which I believe is vulkan compatible.
As for the shaders in master branch, there is just too much options and all pre-generated are mainly meant to address common use cases on common setups. So I'm fine with generated shader incompatible with vulkan, at least at this moment.
although cpu side format of rgba16f rgba16hf and rgba32f are all 32bit float (the format of user texture content)
This is not true. The suffix identifies the CPU format. so rgba16f
is 16-bit texture with 32-bit CPU floats, and rgba32f
is 32-bit texture with 32-bit CPU floats. rgba16hf
is 16-bit texture with 16-bit CPU floats.
The problem is that vulkan does not support bit depth conversion on upload, so you have to actually give it the same format as the resulting texture.
I see. Could you check if 4f229a44f70d49125e049f134424e4daa33ded20 fixed the problem? Just generate ravu/ravu-lite shader with --float-format float16vk
. (I don't have environment to test vulkan support).
@bjin Yeah, that seems to solve it.
I'll still try and see if I can either get opengl to support 16hf or vulkan to support 16f eventually.
The RAVU weights texture currently uses rgba16f, which is an OpenGL-only texture format. For vulkan you need to use either
rgba16hf
(16-bit half float format) or just plainrgba16
(normalized integer).