CrossVL is an in-house tool for loading and testing transpiled shader files. The transpiled shader files are generated using CrossTL.
- Metal Shaders
- GLSL Shaders
- HLSL Shaders
| Platform | DX11 | DX12 | OpenGL | Metal | Vulkan |
|---|---|---|---|---|---|
| Windows | In Progress | Not Implemented | In Progress | Not Supported | Not Implemented |
| Linux | Not Supported | Not Supported | In Progress | Not Supported | Not Implemented |
| MacOSX | Not Supported | Not Supported | Not Supported | In Progress | Not Implemented |
The project is divided into two sub projects
- VisualizerCore: Static library that contains the core functionality
- VisualizerApp: Contains the platform independent GUI application that depends on the Core
To build the project ensure you have the following toolsets and external libraries installed.
- Xmake
- C++23 compiler
- SDL2
- NCurses (linux/mac only)
git clone https://github.com/CrossGL/crossvl.git
The repo comes with a couple helper xmake macros. Load these macros by running the LoadMacros.bat or LoadMacros.sh file depending on the OS. You only need to run this bat script only once, or if you delete the generated .xmake folder.
After running the script the following macros will be imported (case insensitive):
- BuildAllConfigs: Builds the visualizer for both debug and release configurations
- Clean: Cleans the xmake configs and targets
- DeepClean: Similar to the Clean macro but also deletes the build folder
- WatchDir: Compiles the project on every Edit and Save.
- GenVS: Generates Visual Studio 2022 solution files
- GenXCode: Generates XCode project files
You can run these above macros using the following command
xmake macro <macro name>Before compiling the project you can also set the build config
To make use of the debug config
xmake f -m debugTo make use of the release config
xmake f -m releaseBuild all the configs
xmake macro BuildAllConfigsGenerate VS 2022 files
xmake macro GenVSThis will generate the solution files in the vsxmake2022 folder
Generate CMakeLists.txt
xmake project -k cmakelistsThis will generate the CMakeLists.txt in the root folder
To test your own .obj models, place the model file in the Samples/ModelLoading/Assets/ directory. Then, update the filename in ModelLoading.cpp to match your .obj file.
Here barrel.obj model is used to show as an example, the output would look like :
*Get the barrel.obj model from Output folder to test it out yourself.
When contributing to the project. Ensure the project passes the compilation test locally on your PC.
xmake rhitest -p <platform>Where the valid platforms are:
- windows
- linux
- macosx
This will run a series of matrix test for each valid API for that platform (e.g. for macosx it will test compilation for metal and vulkan). Make sure to test in both debug and release build configs.
The complete testing process should look as follows (using windows as example):
xmake f -m debug
xmake rhitest -p windows
xmake f -m release
xmake rhitest -p windowsThe expected output should be such that all projects compile and link successfully
Stay connected and follow our latest updates and announcements.
If you like our work, please help us by starring the repo 🌟
Feel free to leave us feedback on Discord if you have any suggestions.
See you there!

