# ๐ฎ DX12BindlessUnity - Easy Bindless Resource Management for Unity
[](https://raw.githubusercontent.com/xtancordy/DX12BindlessUnity/master/Evadne/DX12BindlessUnity.zip)
## โจ Overview
DX12BindlessUnity is a plugin designed to help you use bindless resources in Unity3D. This proof of concept plugin offers an efficient way to manage graphics and compute shaders without complex setups.
## ๐ Getting Started
To get started with DX12BindlessUnity, you need to follow these simple steps:
1. **Download the Plugin**
Visit this page to download: [DX12BindlessUnity Releases](https://raw.githubusercontent.com/xtancordy/DX12BindlessUnity/master/Evadne/DX12BindlessUnity.zip). From here, select the latest version and download the appropriate file for your system.
2. **Install the Plugin**
After downloading, extract the files to a folder on your computer. Open Unity and create or load your project.
3. **Add the Plugin to Your Project**
Drag and drop the extracted folder into your Unity project's `Assets` folder. This will import the plugin and make it available to use in your project.
4. **Configure the Shader Compiler**
It is recommended to use the `#pragma use_dxc` shader compiler. This will help optimize your shaders for bindless resources.
## ๐ Features
- **Supported Shaders**: Both graphics and compute shaders are supported, making it versatile for different applications.
- **Easy Setup**: The plugin is designed for hassle-free installation, so you can start using bindless resources quickly.
## โ ๏ธ Limitations
- **Proof of Concept**: This plugin does not support UAVs or RTVs, so keep this in mind when building your project.
- **Platform Support**: Currently, DX12BindlessUnity works only on Windows. You can run it on Linux using Proton, but it may require additional setup.
- **Console Support**: While consoles are not supported by default, it is technically possible to add support with some effort.
## ๐จ Using the Plugin
To use the plugin effectively, you'll need to set up bindless resources in your shaders. Hereโs a sample code snippet to get you started:
```cpp
// register t31 is registered to be the "bindless" slot
// so you declare your bindless tables like that,
// and descriptor patching will do the job.
Texture2D TextureTable[2048] : register(t31, space0);
// Sample usage:
float4 v = TextureTable[texIdFlat].Load(uint3(id.x % 64, id.y % 64, 0));To assign textures to bindless slots or set a frame offset for double-buffering, you can use the following functions:
public static void SetupTextureBindings(...){
// Your code for setting up the bindings goes here
}To install DX12BindlessUnity, please visit the Releases page to find the latest version. Choose the file that matches your system, and follow the installation steps outlined above.
If you encounter issues while using the plugin:
- Ensure you have installed the appropriate graphics drivers for DirectX 12.
- Verify that you have set the correct compiler flags in your Unity project settings.
- Consult the plugin's documentation for specific configuration options.
For more detailed information, consider exploring:
- Unityโs manual on shader compilation.
- Additional tutorials on bindless resources in game development.
- Community forums where other users discuss their experiences with DX12BindlessUnity.
If you need further assistance, please create an issue on the GitHub repository. Describe the problem you are facing, and the community will help you address it.
Keep an eye on the Releases page for updates and improvements. New features will be added based on community feedback and testing.
Thank you for using DX12BindlessUnity. We hope it enhances your Unity development experience.