Conversation
|
Okay I researched this a bit more and after a lot of back and forth, it turns out the compressedBlob really is just LZ4 compression. After decompressing this, the file has some DXBC shaders that can be used with HLSLcc! Though, mine had 8 of those shaders! And there was some more stuff inbetween... |
|
This sounds interesting, what I did was to inspect the shader objects in AssetRipper, took the compressedBlob data, base64 decoded it and then cut off all the bytes before the DXBC bytes and then used it as input for hlslcc but this just crashed. Does the output you are getting look reasonable? Would be a nice step forward if we can compile it and in the best case produce the same output like unity would do. Easiest would be to take a unity project and export with directx and opengl, then try to translate the shaders from directx to opengl and compare the result with the shaders in the opengl version. Should this be working, the next issue would be to figure out how to write the whole shader objects as I described here because only replacing the compressedBlob section will most likely not work. |

This contains an attempt to use the HLSLcc library to translate DXBC to OpenGL. The translation works for the test DXBC object, however it crashes on dumped DXBC objects from unity for yet unknown reasons.
closes #11