Added variable rate shading.

This commit is contained in:
Бранимир Караџић
2025-11-06 17:21:53 -08:00
parent 45df9833a9
commit 358223c63e
21 changed files with 681 additions and 211 deletions

View File

@@ -1,7 +1,7 @@
-- vim: syntax=lua
-- bgfx interface
version(132)
version(133)
typedef "bool"
typedef "char"
@@ -392,6 +392,7 @@ flag.Caps { bits = 64, base = 1, name = "Caps" }
.Texture_2dArray --- 2D texture array is supported.
.Texture_3d --- 3D textures are supported.
.TransparentBackbuffer --- Transparent back buffer supported.
.VariableRateShading --- Variable Rate Shading
.VertexAttribHalf --- Vertex attribute half-float is supported.
.VertexAttribUint10 --- Vertex attribute 10_10_10_2 is supported.
.VertexId --- Rendering with VertexID only is supported.
@@ -689,6 +690,17 @@ enum.ViewMode { underscore, comment = "View modes:" }
.DepthDescending --- Sort draw call depth in descending order.
()
--- Shading Rate.
enum.ShadingRate { underscore, comment = "Shading rate:" }
.Rate1x1
.Rate1x2
.Rate2x1
.Rate2x2
.Rate2x4
.Rate4x2
.Rate4x4
()
--- Native window handle type.
enum.NativeWindowHandleType { underscore, comment = "Native Window handle type:" }
.Default --- Platform default handle type (X11 on Linux).
@@ -2150,6 +2162,16 @@ func.setViewOrder
--- to default state.
{ default = NULL }
--- Set view shading rate.
---
--- @attention Availability depends on: `BGFX_CAPS_VARIABLE_RATE_SHADING`.
---
func.setViewShadingRate
"void"
.id "ViewId" --- View id.
.shadingRate "ShadingRate::Enum" --- Shading rate.
{ default = "ShadingRate::Rate1x1" }
--- Reset all view settings to default.
func.resetView
"void"