Skip to content

Instantly share code, notes, and snippets.

@gkaerts
gkaerts / bindless.hlsl
Last active April 28, 2025 00:05
Vulkan and D3D12 typed bindless resources in one shader-side API
// This file should be compiled with DXC against shader model 6.6
// Change the TARGET_API define here to either D3D or VK and switch compiler output formats (DXIL or SPIR-V) to match
#define D3D 1
#define VK 2
#define TARGET_API D3D
// Begin macro magic
#if TARGET_API == D3D
// No special root signature needed!
@tyhenry
tyhenry / dof.bokeh.2.4.frag
Created September 25, 2020 21:00
depth of field bokeh 2.4 shader by Martins Upitis
#version 330
/*
DoF with bokeh GLSL shader v2.4
by Martins Upitis (martinsh) (devlog-martinsh.blogspot.com)
----------------------
The shader is Blender Game Engine ready, but it should be quite simple to adapt for your engine.
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
So you are free to share, modify and adapt it for your needs, and even use it for commercial use.