Class CustomMaterialResourceFile

Inheritance Relationships

Base Type

Class Documentation

class CustomMaterialResourceFile : public MaterialResourceFile

Representation of a custom material.

Public Functions

CustomMaterialResourceFile(const FilePath &path)
~CustomMaterialResourceFile()
void setShaders(const String &vertexShader, const String &pixelShader)
void setVS(const String &vertexShader)
void setPS(const String &pixelShader)
void recompileShaders()
const Shader *getShader() const
Vector<Ref<GPUTexture>> getTextures() const
void bindShader()
void bindTextures()
void bindSamplers()
void bindVSCB()
void bindPSCB()
JSON::json getJSON() const
ID3D11ShaderResourceView *getPreview() const
void reimport()

Reload the file buffer from disk.

bool save()
void draw()
void drawTextureSlots(const char *label, Vector<Ref<ImageResourceFile>> &textures)
float getFloat(int index)
Vector3 getFloat3(int index)
Color getColor(int index)
bool setFloat(int index, float value)
bool setFloat3(int index, Vector3 value)
bool setColor(int index, Color value)

Public Static Functions

static void Load()
static void Destroy()

Public Static Attributes

const String s_DefaultCustomVSPath = "rootex/core/renderer/shaders/custom_vertex_shader.hlsl"
const String s_DefaultCustomPSPath = "rootex/core/renderer/shaders/custom_pixel_shader.hlsl"