An XNA-inspired 3D graphics library with modern capabilities.
 
 
 
Go to file
TheSpydog 05900bee14
continuous-integration/drone/push Build is passing Details
Shader cross-compiler (#34)
This PR adds a shader cross-compiler program (written in C#) that uses glslc and spirv-cross to compile GLSL source files to a custom, Refresh-specific shader blob format that contains shader code for various backends.

The goal is that whenever you want to compile your shaders, you just run this program (either via `refreshc` or `dotnet run`), passing in the path to the GLSL source file. You can specify which backends you want to support via flags (`--vulkan`, for instance), and it will generate a .refresh blob file for Refresh to consume.

This can also be extended via C# defines and the `partial class` system. An example is the PS5 shader implementation, whose logic is squirreled away in the NDA'd repository but can be called in sequence with the rest of the shader cross-compile logic. This way, we don't have to run two separate programs to compile our shaders to all supported platforms.

Refresh handles all the parsing of the file format in Refresh_CreateShaderModule, so individual backends do not need to concern themselves with the particulars.

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: #34
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-20 23:19:12 +00:00
Vulkan-Headers@1d99b835ec update vulkan headers 2021-02-27 15:14:48 -08:00
include Remove fixed command buffers + minor cleanup (#33) 2023-01-14 18:03:58 +00:00
shadercompiler Shader cross-compiler (#34) 2023-01-20 23:19:12 +00:00
src Shader cross-compiler (#34) 2023-01-20 23:19:12 +00:00
visualc fix empty compute image descriptor set creation 2021-01-31 14:30:16 -08:00
.drone.yml fix windows build release path 2021-02-27 15:35:46 -08:00
.editorconfig convert all spaces to tabs 2022-02-25 13:42:11 -08:00
.gitignore remove FNA3D dependency 2020-12-16 18:12:20 -08:00
.gitmodules DroneCI (#12) 2021-01-04 23:31:56 -08:00
CMakeLists.txt 1.10.0 2023-01-04 11:18:37 -08:00
LICENSE fix LICENSE file 2021-01-05 16:30:27 -08:00
README.md update build badge 2021-01-23 08:52:51 +00:00

README.md

Build Status

This is Refresh, an XNA-inspired 3D graphics library with modern capabilities.

License

Refresh is licensed under the zlib license. See LICENSE for details.

About Refresh

Refresh is directly inspired by FNA3D and intended to be a replacement for XNA's Graphics namespace. XNA 4.0 is a powerful API, but its shader system is outdated and certain restrictions are awkward to handle in a modern context. In the way that XNA was "one step above" DX9, Refresh intends to be "one step above" Vulkan. It should map nicely to modern graphics APIs. Refresh will initially have a Vulkan runtime implementation. Support for other APIs like DX12 may come later. For shaders, we consume SPIR-V bytecode.

Dependencies

Refresh depends on SDL2 for portability. Refresh never explicitly uses the C runtime.

Building Refresh

For *nix platforms, use CMake:

$ mkdir build/
$ cd build/
$ cmake ../
$ make

For Windows, use the Refresh.sln in the "visualc" folder.

Want to contribute?

Issues can be reported and patches contributed via Github:

https://github.com/thatcosmonaut/Refresh