Nebula
Loading...
Searching...
No Matches
materialtemplatetypes.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9//------------------------------------------------------------------------------
10#include "coregraphics/shader.h"
11namespace MaterialTemplates
12{
13
14enum class BatchGroup;
16{
26 union
27 {
28 bool b;
29 float f;
35#ifdef WITH_NEBULA_EDITOR
36 const char* desc;
37#endif
38 SizeT GetSize() const
39 {
40 switch (this->type)
41 {
42 case Bool: return 1;
43 case Scalar: return 4;
44 case Vec2: return 8;
45 case Vec3:
46 case Color:
47 case Vec4: return 16;
48 default: return 1;
49 }
50 }
51};
52
54{
56 const char* resource;
57#ifdef WITH_NEBULA_EDITOR
58 const char* desc;
59 uint hashedName;
60 uint textureIndex;
61#endif
62};
63
92
93} // namespace MaterialTemplates
Nebula's dynamic array class.
Definition array.h:60
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
VertexLayoutType
Definition vertexlayout.h:49
Materials represent a set of settings and a correlated shader configuration, which tells the engine w...
Definition material.h:21
A shader represents an entire shader resource, containing several stages and programs.
Definition shader.h:51
Definition materialtemplatetypes.h:67
CoreGraphics::ShaderId shader
Definition materialtemplatetypes.h:68
const char * name
Definition materialtemplatetypes.h:71
uint index
Definition materialtemplatetypes.h:70
CoreGraphics::ShaderProgramId program
Definition materialtemplatetypes.h:69
IndexT bufferIndex
Definition materialtemplatetypes.h:72
Definition materialtemplatetypes.h:65
uint numTextures
Definition materialtemplatetypes.h:81
const char * name
Definition materialtemplatetypes.h:75
const char * bufferName
Definition materialtemplatetypes.h:78
const uint HashCode() const
Definition materialtemplatetypes.h:74
Util::Dictionary< const char *, const MaterialTemplateValue * > values
Definition materialtemplatetypes.h:82
uint properties
Definition materialtemplatetypes.h:77
Util::Array< Util::Dictionary< uint, uint > > textureBatchLookup
Definition materialtemplatetypes.h:90
uint uniqueId
Definition materialtemplatetypes.h:76
CoreGraphics::VertexLayoutType vertexLayout
Definition materialtemplatetypes.h:80
Util::Dictionary< const char *, const MaterialTemplateTexture * > textures
Definition materialtemplatetypes.h:83
Util::Array< Util::Array< Materials::ShaderConfigBatchTexture * > > texturesPerBatch
Definition materialtemplatetypes.h:89
Util::Dictionary< MaterialTemplates::BatchGroup, Pass * > passes
Definition materialtemplatetypes.h:88
uint bufferSize
Definition materialtemplatetypes.h:79
Definition materialtemplatetypes.h:54
const char * resource
Definition materialtemplatetypes.h:56
uint bindlessOffset
Definition materialtemplatetypes.h:55
Definition materialtemplatetypes.h:16
Math::float4 f4
Definition materialtemplatetypes.h:32
union MaterialTemplates::MaterialTemplateValue::@193 data
bool b
Definition materialtemplatetypes.h:28
Type
Definition materialtemplatetypes.h:18
@ Scalar
Definition materialtemplatetypes.h:20
@ Color
Definition materialtemplatetypes.h:24
@ Vec3
Definition materialtemplatetypes.h:22
@ Bool
Definition materialtemplatetypes.h:19
@ Vec4
Definition materialtemplatetypes.h:23
@ Vec2
Definition materialtemplatetypes.h:21
Math::float2 f2
Definition materialtemplatetypes.h:30
uint offset
Definition materialtemplatetypes.h:34
SizeT GetSize() const
Definition materialtemplatetypes.h:38
float f
Definition materialtemplatetypes.h:29
Math::float3 f3
Definition materialtemplatetypes.h:31
enum MaterialTemplates::MaterialTemplateValue::Type type
Definition scalar.h:58
Definition scalar.h:67
Definition scalar.h:76
int SizeT
Definition types.h:49
unsigned int uint
Definition types.h:31
int IndexT
Definition types.h:48