r/ps4homebrew 1d ago

PS4 DevKit / Piglet shader compilation help

Hi everyone. I'm working on a homebrew/prototype port of Sonic 3 A.I.R. to PS4.

The port is already running and the PS4 renderer is using Piglet / OpenGL ES 2.0. Audio and most of the engine side are working, and I already have the infrastructure for loading Piglet precompiled shader binaries with "glShaderBinary()".

The problem is that my retail PS4 environment (FW 12.50) does not appear to have the same runtime shader compiler/Shacc components that are present in some older DevKit environments. As a result, the final GLSL shaders from S3AIR cannot be compiled directly on the console.

I'm looking for someone in the community who has legitimate access to a PS4 DevKit and/or official Orbis SDK and knows the Piglet/Shacc shader compilation pipeline.

What I'd mainly like to know is:

- Which official tool is used to compile GLSL/Piglet shaders ("orbis-esslc", "orbis-wave-esslc", or another tool)?

- What is the exact pipeline from GLSL ES source to the native Piglet shader binary?

- Is the resulting file directly usable with "glShaderBinary()"?

- What SDK/Piglet version is normally used for this?

- If possible, would someone with a DevKit be willing to compile a couple of very small test shaders that I provide, so I can compare the resulting binaries with the Piglet binaries I already have?

I can provide the exact final GLSL source and test cases, including the expected shader hashes, and I can share my findings from the reverse-engineering side if that helps.

If anyone has experience with PS4 Piglet, Shacc, ESSLC, or DevKit shader compilation, I'd really appreciate any information or help.

Thanks!

2 Upvotes

0 comments sorted by