3#include "Rendering/SamplerState.h"
5#include "Resources/Resources.h"
6#include "Resources/MaterialOptions.h"
8#include "Renderer/IRenderer.h"
38 glm::vec4 diffuseColor = glm::vec4(1, 1, 1, 1);
39 glm::vec4 emissiveColor = glm::vec4(0, 0, 0, 1);
40 glm::vec4 specularColor = glm::vec4(0, 0, 0, 1);
41 glm::vec4 ambientColor = glm::vec4(0, 0, 0, 1);
42 glm::vec2 diffuseMapScale = glm::vec2(1, 1);
43 glm::vec2 normalMapScale = glm::vec2(1, 1);
44 glm::vec2 specularMapScale = glm::vec2(1, 1);
45 float specularPower = 80;
46 float transparency = 0;
47 float lineWidth = 1.0f;
48 float pointSize = 1.0f;
49 float depthBiasConstant = 0.f;
50 float depthBiasSlope = 0.f;
51 float depthBiasClamp = 0.f;
52 float normalMapFactor = 1.0f;
53 uint32_t stippleFactor = 1;
54 uint32_t stipplePattern = 0xFFFFFFFF;
62 bool vertexColor =
false;
64 bool enableLighting =
true;
66 bool depthWriteEnabled =
true;
67 bool depthTestEnabled =
true;
68 bool depthTestAlwaysPass =
false;
69 bool depthBiasEnable =
false;
70 bool enableOverride =
false;
71 bool enableColorOverride =
true;
72 bool enableAlphaOverride =
true;
73 bool enableTextureOverride =
true;
79 static void registerType();
84template<>
inline Cogs::StringView getName<Cogs::Core::MaterialComponent>() {
return "MaterialComponent"; }
Base class for Component instances.
Provides a weakly referenced view over the contents of a string.
std::weak_ptr< ComponentModel::Entity > WeakEntityPtr
Weak Smart pointer for Entity access.
BlendMode
Defines blending modes for rendering.
@ None
No blending enabled for opaque shapes, defaults to Blend for transparent shapes.
CullMode
Defines primitive culling modes.
@ None
No primitive culling performed.
Contains all Cogs related functionality.
Exposes material properties for legacy entities and code.
bool shadowReceiver
If false, object never gets shadowed.
int32_t drawOrder
Manages draw order, maps to MaterialOptions::drawOrder.
bool backdrop
If true the MaterialFlags::Backdrop on the material instance.
bool instancedLine
Lines rendered with instancing.
static const ResourceHandle_t NoHandle
Handle representing a default (or none if default not present) resource.
EPrimitiveType
Primitive type enumeration.
@ TriangleList
List of triangles.
AddressMode
Addressing modes to use when sampling textures.
@ Wrap
Texture coordinates automatically wrap around to [0, 1] range.
FilterMode
Filter modes to specify how texture data is treated when sampled.
@ MinMagMipLinear
Linear sampling for both minification and magnification.