This repository holds demonstrations on how to use freegnm: a GPU rendering library for the PlayStation 4, and psbc: a shader binary compiler for the PlayStation 4.
These samples are meant to be quick and easy to understand.
CAVEATS:
- Shader binaries compiled with psbc do not have any reflection information, at least for now.
- None of these examples were tested on a Pro/NEO PS4 and may not work correctly under them.
Very basic example of the GPU's capabilities.
Draws a 3D textured cube.
Renders a GLTF's model with some basic PBR parameters.
Example of instanced draw calls usage.
Shows how to setup and use indirect draws.
You need the following tools to build the projects:
Then go this project's root directory and run
export OO_PS4_TOOLCHAIN=/path/to/OpenOrbis-PS4-Toolchain
zig buildIf successful, you should find all samples' package files inside the zig-out directory.
Some of the samples are based on Vulkan samples from Sascha Willems.
Some PBR algorithms are taken from Moving Frostbite to Physically Based Rendering.
The following libraries are used:
The following resources are used:
- Stanford dragon by Stanford Computer Graphics Laboratory;
- Venus statue sourced from Sascha Willems;
- Hack typeface by SourceFoundry;
- Bruno Ace typeface by Astigmatic.
All libraries and resources are owned by their respective owners and are not covered by this project's license.
This project is released to the public domain, see UNLICENSE for more information.




