* First commit - tested with dx11 on windows
* Minor changes & adding some comments.
* Update hextile.cpp
* update some bin files
* rename texture
* minor comment update
* Added support to configure tile rate as well as tile rotation strength, update bin files & screenshot
* use texture from polyhaven, updated screenshot, updated bin files & minor changes to shader.
* missed pushing texture
* update license
* Update hextile.cpp
* Fix regular tiling
* use ktx with mipmaps
* minor change to ensure that regular tiling & hextile matches with default tile rate.
* minor c
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Added example 48-multidrawindirect
* Added example 48-multidrawindirect
* enable shader.mk to build directories that only have compute shaders
* compiled shaders for example 48
* MultidrawIndirect example renamed to DrawIndirect, sets draw mtx in compute
* update 48-drawindirect shaders
* fix typos
* fixed bgfx::setPlatformData change for example48
* fix docs
* added name to cs_drawindirect.sc
* style updates for example 44
* add slider to example 48-drawindirect
* examples: Add imageformats example
Example which renders RGBA color wheel, alpha gradient and full value channel textures to
catch conversion errors and bad internal type representations between different backend
renderers.
The example uses bimg to convert from a master texture to different textures.
Each texture is rendered in an ImGui list using `ImGui::Image`. A close-up is visible
when hovering over each image.
U and I textures are skipped because they don't work for sampling.
Compressed textures are skipped because they don't have conversion functions.
Depth textures are not rendered because they don't work with channels.
* pixelformats: Present texture format in table
* Update pixelformats.cpp
* Update pixelformats.cpp
* pixelformats: Update screenshot
* pixelformats: Add checkerboard background
Co-authored-by: Michał Cichoń <michcic@gmail.com>
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Minor rewording & increase of clarity
* Corrected a noun that was being used as a verb
* Slight rewording of the C99 bindings notices
* Actually, this sounds better & looks nicer
Current docs are a little ambiguous with the term "profiling"; sometimes it means
bgfx::CallbackI functions, and sometimes per-view stats collection. This makes it a little clearer.
Adds support on tools.mk for the msys2 environment. The OS is still
considered windows but the command line tools for mkdir and rmdir
behave as if on linux.
The variable SHADER_TMP on the makefiles also had to be quoted to make
it work on msys2.
This echo command on the makefile behaves differently between linux and gnuwin32:
```
-@echo extern const uint8_t* $(basename $(<))_pssl;>> $(@)
```
On linux the semicolon immediately ends the echo command and its output is never piped to the embedded shader's header.
If you try to fix it by quoting the string:
```
-@echo "extern const uint8_t* $(basename $(<))_pssl;" >> $(@)
```
It will work on linux but not on gnuwin32 because the quotes will appear on the outputted string.
The solution was to use printf which works consistently between the two.
Also on gnuwin32 the outputted string has 'CRLF' line endings, which clashes with the rest of the 'LF' line endings
of the embedded shaders header which were produced by shaderc.
The solution was to remove the 'CR' from the outputted string by using the tr command.
In non-embedded shaders there is a separation between essl binaries (examples/runtime/shaders/essl)
and glsl binaries (examples/runtime/shaders/glsl). On embedded shaders there is no such separation
and by default essl shaders are being used by the OpenGL runtime. This usually doesn't cause any
issues but in the case of the debugdraw shaders, that started using uvec4, this now leads to a
runtime error. This patch fixes this by splitting the embedded shaders into essl and glsl.
As asked, this is the first part of the change.
To be able to compile the 'examples/common/debugdraw' shaders, pull
request #2362 is needed.
* Fix typo in SPIR-V id
* Use backend-agnostic shaderc output
...as opposed to directly storing and comparing against Vulkan and WebGPU enums. This is backwards-compatible with existing code and shaders.
* Remove comments and Undefined value
* 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.