|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
One resource a compute dispatch binds, at @group(0) @binding(binding). More...
#include <GfxEnums.hpp>
Public Types | |
| enum class | Kind : u8 { Uniform , StorageRead , Storage , Texture , StorageTexture , Sampler , DepthTexture } |
Static Public Member Functions | |
| static GfxComputeBinding | uniform (u32 binding, BufferHandle buffer, u32 offset=0, u32 size=0) |
| static GfxComputeBinding | storageRead (u32 binding, BufferHandle buffer, u32 offset=0, u32 size=0) |
| static GfxComputeBinding | storage (u32 binding, BufferHandle buffer, u32 offset=0, u32 size=0) |
| static GfxComputeBinding | sampled (u32 binding, TextureHandle texture) |
| static GfxComputeBinding | storageTexture (u32 binding, TextureHandle texture) |
| static GfxComputeBinding | depth (u32 binding, TextureHandle texture) |
| static GfxComputeBinding | sampler (u32 binding, TextureFilter filter) |
Public Attributes | |
| Kind | kind = Kind::Uniform |
| u32 | binding = 0 |
| BufferHandle | buffer = BufferHandle::Invalid |
| u32 | offset = 0 |
| Bytes into the buffer (a multiple of 256 for a uniform, 4 for storage) and how many; 0 = the rest. | |
| u32 | size = 0 |
| TextureHandle | texture = TextureHandle::Invalid |
| TextureFilter | filter = TextureFilter::Linear |
| A Sampler's filter. | |
One resource a compute dispatch binds, at @group(0) @binding(binding).
The bind-group layout is built from the list itself, so the shader's declarations have to say the same thing: Uniform is var<uniform>, StorageRead is var<storage, read>, Storage is var<storage, read_write>, Texture is a texture_2d<f32> (or texture_depth_2d for a depth texture) read with textureLoad, StorageTexture is a texture_storage_2d<FORMAT, write> whose format is the texture's, and Sampler is a sampler.
Definition at line 689 of file GfxEnums.hpp.
|
strong |
| Enumerator | |
|---|---|
| Uniform | |
| StorageRead | |
| Storage | |
| Texture | |
| StorageTexture | |
| Sampler | |
| DepthTexture | |
Definition at line 690 of file GfxEnums.hpp.
|
inlinestatic |
A depth texture, read with textureLoad as texture_depth_2d. An Invalid handle binds a stand-in, so a shader that declares the binding runs whether or not the frame wrote depth.
Definition at line 718 of file GfxEnums.hpp.
References binding, DepthTexture, kind, and texture.
Referenced by esengine::DynamicGI::declare(), and esengine::VoxelGI::declare().
|
inlinestatic |
Definition at line 710 of file GfxEnums.hpp.
References binding, kind, Texture, and texture.
Referenced by esengine::DynamicGI::declare(), and esengine::VoxelGI::declare().
|
inlinestatic |
|
inlinestatic |
Definition at line 707 of file GfxEnums.hpp.
References binding, buffer, kind, offset, size, and Storage.
Referenced by esengine::DynamicGI::declare(), esengine::VoxelGI::declare(), and esengine::SkinCache::run().
|
inlinestatic |
Definition at line 704 of file GfxEnums.hpp.
References binding, buffer, kind, offset, size, and StorageRead.
Referenced by esengine::DynamicGI::declare(), esengine::VoxelGI::declare(), and esengine::SkinCache::run().
|
inlinestatic |
Definition at line 713 of file GfxEnums.hpp.
References binding, kind, StorageTexture, and texture.
Referenced by esengine::DynamicGI::declare(), and esengine::VoxelGI::declare().
|
inlinestatic |
Definition at line 701 of file GfxEnums.hpp.
References binding, buffer, kind, offset, size, and Uniform.
Referenced by esengine::DynamicGI::declare(), esengine::VoxelGI::declare(), and esengine::SkinCache::run().
| u32 esengine::GfxComputeBinding::binding = 0 |
Definition at line 692 of file GfxEnums.hpp.
Referenced by depth(), sampled(), sampler(), storage(), storageRead(), storageTexture(), and uniform().
| BufferHandle esengine::GfxComputeBinding::buffer = BufferHandle::Invalid |
Definition at line 693 of file GfxEnums.hpp.
Referenced by storage(), storageRead(), and uniform().
| TextureFilter esengine::GfxComputeBinding::filter = TextureFilter::Linear |
| Kind esengine::GfxComputeBinding::kind = Kind::Uniform |
Definition at line 691 of file GfxEnums.hpp.
Referenced by depth(), sampled(), sampler(), storage(), storageRead(), storageTexture(), and uniform().
| u32 esengine::GfxComputeBinding::offset = 0 |
Bytes into the buffer (a multiple of 256 for a uniform, 4 for storage) and how many; 0 = the rest.
Definition at line 695 of file GfxEnums.hpp.
Referenced by storage(), storageRead(), and uniform().
| u32 esengine::GfxComputeBinding::size = 0 |
Definition at line 696 of file GfxEnums.hpp.
Referenced by storage(), storageRead(), and uniform().
| TextureHandle esengine::GfxComputeBinding::texture = TextureHandle::Invalid |
Definition at line 697 of file GfxEnums.hpp.
Referenced by depth(), sampled(), and storageTexture().