bgfx/examples/21-deferred
kingscallop 436b7fab9e
Adds UAV support for D3D12, Vulkan and reworked for OpenGL, D3D11 (#2119)
* Adds UAV support for D3D12, Vulkan and reworked support for OpenGL, D3D11

UAV support is now uniform across compute and draw.
To set a UAV you just use bgfx::setImage() and IMAGE2D in the shader, just like in compute.
Due to these changes shaders will have to be recompiled.

The changes include:
	- D3D11 requires patching of the UAV slot number (which is now done by modifying the DXBC instead of using a macro)
	- If the DXBC binary includes a debug chunk, that is also patched to match the new slot number
	- All the other renderers don't need any kind of patching
	- There are some shader annotations to better convert the UAV format used in hlsl to spirv

Possibility of further enhancements:
	- bgfx::setViewFrameBuffer() only supports binding to a framebuffer or, using BGFX_INVALID_HANDLE, to bind the default backbuffer. This doesn't allow for the case where there is no need to bind to either one of them, for example when using a fragment shader only to read and write to an UAV.

* Bump shader version, because they need to be recompiled.
2020-10-04 21:51:41 -07:00
..
common.sh Happy New Year! 2020-01-14 21:37:06 -08:00
deferred.cpp Adds UAV support for D3D12, Vulkan and reworked for OpenGL, D3D11 (#2119) 2020-10-04 21:51:41 -07:00
fs_deferred_clear_uav.sc Adds UAV support for D3D12, Vulkan and reworked for OpenGL, D3D11 (#2119) 2020-10-04 21:51:41 -07:00
fs_deferred_combine.sc Happy New Year! 2020-01-14 21:37:06 -08:00
fs_deferred_debug_line.sc Happy New Year! 2020-01-14 21:37:06 -08:00
fs_deferred_debug.sc Happy New Year! 2020-01-14 21:37:06 -08:00
fs_deferred_geom.sc Happy New Year! 2020-01-14 21:37:06 -08:00
fs_deferred_light_ta.sc Happy New Year! 2020-01-14 21:37:06 -08:00
fs_deferred_light_uav.sc Adds UAV support for D3D12, Vulkan and reworked for OpenGL, D3D11 (#2119) 2020-10-04 21:51:41 -07:00
fs_deferred_light.sc Happy New Year! 2020-01-14 21:37:06 -08:00
makefile Happy New Year! 2020-01-14 21:37:06 -08:00
screenshot.png Added 21-deferred example. 2014-05-21 20:33:12 -07:00
varying.def.sc Reversed instance data bindings. Issue #309. 2015-04-15 10:37:00 -07:00
vs_deferred_combine.sc Happy New Year! 2020-01-14 21:37:06 -08:00
vs_deferred_debug_line.sc Happy New Year! 2020-01-14 21:37:06 -08:00
vs_deferred_debug.sc Happy New Year! 2020-01-14 21:37:06 -08:00
vs_deferred_geom.sc Happy New Year! 2020-01-14 21:37:06 -08:00
vs_deferred_light.sc Happy New Year! 2020-01-14 21:37:06 -08:00