Commit Graph

8275 Commits

Author SHA1 Message Date
Бранимир Караџић
eacf36abb0 Cleanup. 2022-09-01 23:33:24 -07:00
SnapperTT
4613bd1e02
Parallelised compute shader in example 48 (#2906)
* Parallelised compute shader in example 48

* Ex48 - Dispatch numToDraw/64 workgroups of 64 local threads

* fixed vs build (again)
2022-08-29 06:44:55 -07:00
SnapperTT
8d412e16e4
Fix vs build (#2904) 2022-08-27 07:35:30 -07:00
Бранимир Караџић
963571a31e Cleanup. 2022-08-26 21:46:22 -07:00
Бранимир Караџић
946ba5e968 Updated docs. 2022-08-26 21:44:03 -07:00
Бранимир Караџић
c430f0d90a Updated docs. 2022-08-26 21:41:20 -07:00
Бранимир Караџић
c163482a57 Updated version number. 2022-08-26 21:34:06 -07:00
Бранимир Караџић
750e95f7d0 Cleanup. 2022-08-26 21:32:34 -07:00
SnapperTT
135dc7fa27
Adds example 48-multidrawindirect (#2894)
* 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
2022-08-26 21:32:15 -07:00
Sandy
8e94c8c2db
Readme: Update openblack screenshot (#2899) 2022-08-25 21:14:16 -07:00
Бранимир Караџић
ed8d6da5f4 Cleanup. 2022-08-25 21:12:09 -07:00
Бранимир Караџић
72cbe83275 Removed bgfx::setPlatformData usage from entry example harness. 2022-08-25 20:07:03 -07:00
Sandy
85910e9778
Add BGR versions of 16 bit formats (#2897)
* pixelformats: Add BGRA4

* pixelformats: Add BGR5A1

* pixelformats: Add B5G6R5

* make idl
2022-08-25 16:08:06 -07:00
Sandy
561e91a62b
opengl: Implement texture swizzle mapping (#2892)
* opengl: Implement texture swizzle mapping

* imageformats: Fix compilation on android

Android GLES does not have a definition for GL_BGR: Swizzle instead.
2022-08-25 06:54:57 -07:00
Michał Cichoń
c8c245c37b
pixelformat: Include compressed format in texture sets (#2893)
* pixelformat: Include compressed format in texture sets

* pixelformats: Show why texture preview is not shown
2022-08-25 06:51:48 -07:00
Sandy
30f2920ae5
egl: Fix narrowing warning/error (#2891) 2022-08-24 14:31:55 -07:00
云风
8207645355
fix getUniformInfo(), See Issue #2883 (#2885) 2022-08-23 19:53:49 -07:00
Michał Cichoń
549077fc0b
Pixelformats example mupltiple sources (#2889)
* Added texture conversion for pixelformat to runtime asset.

* pixelformats: Support multiple sources, cleanup
2022-08-23 12:51:00 -07:00
ichordev
e9e9605304
Updated BGFX_PCI_ID docs to reflect GPU priority & added missing enums (#2888)
* Add new BGFX_PCI_ID enums

* Updated BGFX_PCI_ID docs to reflect GPU priority & added missing enums

* Updated bgx.idl; minor corrections; ran GENie
2022-08-23 09:30:01 -07:00
Бранимир Караџић
6cb74deed4 VK: Fixed GPU selection. 2022-08-23 08:28:29 -07:00
云风
75a335f01f
bx::kFloatMin to bx:kFloatSmallest (#2884) 2022-08-23 06:52:52 -07:00
Sandy
536c4cdbf5
Texture format info: Invert R and B in R5G6B5 (#2886)
d3d9: Do software conversion to take advantage of B5G6R5.
d3d11: Do software conversion to take advantage of B5G6R5.
gl: Set internal representation to swap R and B.
metal: Swizzle R and B and remove software conversion.
2022-08-23 06:46:56 -07:00
Бранимир Караџић
db0074bb3e 47-pixelformats: Improved tooltips. 2022-08-22 23:29:13 -07:00
Бранимир Караџић
c08e51441f 47-pixelformats: Scroll checkerboard. 2022-08-22 21:49:26 -07:00
Бранимир Караџић
58e82fb785 Cleanup. 2022-08-22 21:40:04 -07:00
Бранимир Караџић
aa36d167b6 47-pixelformats: Add supported/emulated info. 2022-08-22 20:57:19 -07:00
Бранимир Караџић
ae7eca02b7 Cleanup. 2022-08-22 20:45:14 -07:00
Бранимир Караџић
5d447dd7f3 Cleanup. 2022-08-22 20:41:35 -07:00
Бранимир Караџић
ad5cc799a4 Added numeric min/max for type. 2022-08-22 20:33:50 -07:00
Branimir Karadžić
89e1e3b14e Fixed warning. 2022-08-22 20:14:42 -07:00
Branimir Karadžić
cea9c033fc D3D12: Fixed R5G6B5 format. 2022-08-22 20:14:34 -07:00
Sandy
c334d7c8f1
metal: Fix BGR to RGB swizzle (#2879) 2022-08-22 19:42:19 -07:00
Sandy
054a9ecd83
Texture format info: Invert R and B in RGBA4 (#2878)
* texture format info: Invert R and B in RGBA4

d3d9: Revert 06c08adc9e to force software
      conversion because the format doesn't exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert 3e3e655262 to swizzle R and B
mtl: Swizzle channels

* metal: Remove explicit conversion of RGBA4 and RGB5A1 in osx

* metal: Set alpha bit to correct end of short
2022-08-22 19:03:22 -07:00
Бранимир Караџић
31c92ece0a VK: Fixed A8 format. 2022-08-22 19:02:57 -07:00
Sandy
58aeeaf155
texture format info: Invert R and B in RGB5A1 (#2876)
d3d9: Revert 76db2ed38d to force software
      conversion and use the format that does exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert b36aa71403 to swizzle R and B
mtl: Swizzle R and B
2022-08-22 17:36:50 -07:00
Michał Cichoń
7cc56a01de
pixelformats: Use "Alpha" instead of "Ignore Alpha" (#2875) 2022-08-22 12:50:13 -07:00
Michał Cichoń
a4b71961c3
pixelformats: Add checkbox to ignore alpha channel, select RGBA8 by default (#2874) 2022-08-22 12:32:40 -07:00
Sandy
651432df1d
examples: Add imageformats example (#2872)
* 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>
2022-08-22 12:16:58 -07:00
Бранимир Караџић
2d313f46ad Cleanup. 2022-08-21 16:26:45 -07:00
Paul Gruenbacher
e354b14168
Update stb_rect_pack.h to match dear-imgui (#2870)
dear-imgui updated the stb_rect_pack which bgfx should match.
Users with the old stb_rect_pack will get an assertion failure with font atlases not being packed properly with latest bgfx.
2022-08-20 18:04:32 -07:00
Paul Gruenbacher
f99f972c17
Fix invalid boolean logic of texture validation (#2871)
I noticed that this 0363560934
broke b5e7a4cccd/examples/16-shadowmaps/shadowmaps.cpp (L1750)
which shouldn't be the case. The validation was meant for only multisample flags.
my boolean logic assumes that it must be BGFX_TEXTURE_RT in the flag or BGFX_TEXTURE_RT_MSAA_XX in the flag.
2022-08-20 18:04:10 -07:00
Бранимир Караџић
b5e7a4cccd MTL: Added texture format component mapping from PR #2869. 2022-08-20 09:31:53 -07:00
Бранимир Караџић
ec00fa1bc2 GL: Added component mapping stub. 2022-08-19 19:11:13 -07:00
Branimir Karadžić
186c95fd29 D3D12: Added texture format component mapping from PR #2869. 2022-08-19 18:50:02 -07:00
Branimir Karadžić
99770c9f43 Overallocate dynamic buffers on resize. 2022-08-19 18:21:11 -07:00
Бранимир Караџић
6b5b50c2cf VK: Fixed RGB10A2, and RGB5A1 swizzle. 2022-08-19 11:29:59 -07:00
Бранимир Караџић
130ac64a0b VK: Fixed RGBA4 swizzle. 2022-08-19 11:25:11 -07:00
Бранимир Караџић
280cae73af VK: Fixed swizzle macro. 2022-08-19 10:57:49 -07:00
Бранимир Караџић
67f27573b9 Cleanup. 2022-08-19 10:40:00 -07:00
Branimir Karadžić
b35b3fa2a7 Fixed dynamic buffer leak. Issue #2867. 2022-08-19 09:51:23 -07:00