OpenOrbis / OpenOrbis-PS4-Toolchain

The OpenOrbis PS4 custom toolchain. Allows developers to build homebrew for the PS4 without the official SDK.
GNU General Public License v3.0
482 stars 89 forks source link

Shader compiler #181

Open Cryptogenic opened 2 years ago

Cryptogenic commented 2 years ago

Need a shader compiler so we can use more complex shaders. Some homebrew bundle the runtime shader compiler (shacc) from devkits to use complex shaders, but this isn't ideal because we don't want to redistribute sony proprietary libraries.

darkxex commented 2 years ago

The last update of orbislink I think it uses the console libraries, is it not possible to do the same?Screenshot_20211231-031856.png

Cryptogenic commented 2 years ago

The last update of orbislink I think it uses the console libraries, is it not possible to do the same?Screenshot_20211231-031856.png

These libraries don't exist on retail firmwares The runtime shader compiler library doesn't exist on retail firmwares, only on devkits. You can pull it from devkit and bundle them with your app to use them, but that's not really 'open' or safe legally. We want to avoid requiring redistribution of sony proprietary code. Piglet exists, but you can only use pre-compiled shaders atm.

dmiller423 commented 2 years ago

This is pain, easier to port mesa and use llvm based glsl compiler

pipehuffer commented 1 year ago

I've ported Mesa's shader compiler to a standalone tool: https://gitgud.io/veiledmerc/psbc It compiles SPIRV to PSSL's shader binary using ACO. Most of the source code is an exact copy of Mesa's. It's incomplete and has some issues though, like no reflection data or vertex and pixel shaders only being supported (so far).

CrazyVoid commented 1 year ago

@pipehuffer you are more then welcome into our discord if you want to join https://discord.gg/syc3njG4

the work you are doing is quite amazing and greatly appericated

CrazyVoid commented 1 year ago

I've ported Mesa's shader compiler to a standalone tool: https://gitgud.io/gluesniffer/psbc It compiles SPIRV to PSSL's shader binary using ACO. Most of the source code is an exact copy of Mesa's. It's incomplete and has some issues though, like no reflection data or vertex and pixel shaders only being supported (so far).

PIPEHUFFER I wrote some code to help with the freegnm stuff :) https://pastebin.com/5QmtWF5B

pipehuffer commented 1 year ago

PIPEHUFFER I wrote some code to help with the freegnm stuff :)

Cheers, I'll try to get that code in the examples the next few days.

you are more then welcome into our discord if you want to join

I'm unable to use Discord, do you hang somewhere else? Also, you can email me at the address in my git commits (the 'ninja' one) if you'd like.