Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::MaterialTextureSlot Struct Reference

A texture param's sampler unit (>= MATERIAL_TEXTURE_UNIT_BASE, above the batch's 0..7). More...

#include <MaterialStore.hpp>

Public Attributes

std::string name
u32 unit = 0
MaterialDefaultTexture defaultTexture = MaterialDefaultTexture::White
bool layered = false

Detailed Description

A texture param's sampler unit (>= MATERIAL_TEXTURE_UNIT_BASE, above the batch's 0..7).

Definition at line 76 of file MaterialStore.hpp.

Member Data Documentation

◆ defaultTexture

MaterialDefaultTexture esengine::MaterialTextureSlot::defaultTexture = MaterialDefaultTexture::White

The shader's declared default(white|black|flatnormal), kept as the CHOICE rather than the resolved id: the built-ins are re-created when the device is, and an id resolved at registration would outlive the texture it names.

Definition at line 82 of file MaterialStore.hpp.

Referenced by esengine::MaterialStore::builtinDefault().

◆ layered

bool esengine::MaterialTextureSlot::layered = false

Declared textureArray (a sampler2DArray): left unset, it binds layers of its default's colour (setBuiltinDefaultArrays), as a 2D default under an array sampler reads black on WebGL.

Definition at line 85 of file MaterialStore.hpp.

Referenced by esengine::MaterialStore::builtinDefault().

◆ name

std::string esengine::MaterialTextureSlot::name

Definition at line 77 of file MaterialStore.hpp.

◆ unit

u32 esengine::MaterialTextureSlot::unit = 0

The documentation for this struct was generated from the following file: