28 #ifndef BERSERK_SHADERPARAMS_HPP
29 #define BERSERK_SHADERPARAMS_HPP
36 #include <unordered_map>
150 std::unordered_map<StringName, uint32> mParamLookUp;
151 std::vector<ShaderParam> mParams;
152 std::vector<ShaderParamLight> mParamsLight;
153 std::vector<DataParamInfo> mDataParamsInfo;
154 std::vector<TextureParamInfo> mTextureParamsInfo;
155 std::vector<unsigned char> mDefaultDataValues;
157 uint32 mTexturesCount = 0;
#define BRK_NS_END
Definition: Config.hpp:48
#define BRK_API
Definition: Config.hpp:32
std::uint8_t uint8
Definition: Typedefs.hpp:38
std::uint32_t uint32
Definition: Typedefs.hpp:44
Reference counted base object.
Definition: RefCnt.hpp:52
General types of shader params.
Describes layout of shader params for packing by material.
Definition: ShaderParams.hpp:88
Cached shared utf-8 string id.
Definition: StringName.hpp:61
Utf-8 encoded std based default string class.
String defaultValue
Definition: ShaderParams.hpp:71
static const uint32 INVALID_ID
Definition: ShaderParams.hpp:90
uint32 offset
Definition: ShaderParams.hpp:109
void Build()
Definition: ShaderParams.cpp:71
BRK_API const std::vector< DataParamInfo > & GetDataParamsInfo() const
Definition: ShaderParams.hpp:132
BRK_API const std::vector< unsigned char > & GetDefaultDataValues() const
Definition: ShaderParams.hpp:136
BRK_API bool HasParam(const StringName &name) const
Definition: ShaderParams.cpp:42
BRK_API const ShaderParamLight * GetParamLight(const StringName &name) const
Definition: ShaderParams.cpp:56
uint32 GetDataSize() const
Definition: ShaderParams.hpp:139
ShaderParamType type
Definition: ShaderParams.hpp:96
BRK_API const std::vector< TextureParamInfo > & GetTextureParamsInfo() const
Definition: ShaderParams.hpp:134
RHIShaderDataType typeData
Definition: ShaderParams.hpp:79
StringName uiName
Definition: ShaderParams.hpp:67
BRK_API const ShaderParam * GetParam(const StringName &name) const
Definition: ShaderParams.cpp:51
void InitDefaults()
Definition: ShaderParams.cpp:128
uint32 offset
Definition: ShaderParams.hpp:103
ShaderParamType type
Definition: ShaderParams.hpp:77
uint32 info
Definition: ShaderParams.hpp:94
BRK_API ~ShaderParams() override=default
BRK_API const std::vector< ShaderParamLight > & GetParamsLight() const
Definition: ShaderParams.hpp:130
BRK_API const std::unordered_map< StringName, uint32 > & GetParamLookUp() const
Definition: ShaderParams.hpp:126
uint32 size
Definition: ShaderParams.hpp:104
uint32 info
Definition: ShaderParams.hpp:75
RHIShaderParamType typeParam
Definition: ShaderParams.hpp:81
BRK_API ShaderParams(std::vector< ShaderParam > params)
Definition: ShaderParams.cpp:37
uint32 GetTexturesCount() const
Definition: ShaderParams.hpp:141
StringName name
Definition: ShaderParams.hpp:65
String description
Definition: ShaderParams.hpp:69
uint32 arraySize
Definition: ShaderParams.hpp:95
uint32 arraySize
Definition: ShaderParams.hpp:73
RHIShaderDataType typeData
Definition: ShaderParams.hpp:97
RHIShaderParamType typeParam
Definition: ShaderParams.hpp:98
BRK_API const std::vector< ShaderParam > & GetParams() const
Definition: ShaderParams.hpp:128
BRK_API uint32 GetParamId(const StringName &name) const
Definition: ShaderParams.cpp:46
RHIShaderParamType
Definition: RHIDefs.hpp:106
RHIShaderDataType
Definition: RHIDefs.hpp:83
Definition: GLDevice.cpp:46
Describes single param in the shader.
Definition: ShaderParams.hpp:63
Info about raw data param.
Definition: ShaderParams.hpp:102
Definition: ShaderParams.hpp:93
Info about texture data param.
Definition: ShaderParams.hpp:108