Search Results for

    Show / Hide Table of Contents

    Class MaterialGenerator

    Material shaders generator from graphs.

    Inheritance
    ShaderGenerator
    MaterialGenerator
    Inherited Members
    ShaderGenerator::_callStack
    ShaderGenerator::_functions
    ShaderGenerator::_graphStack
    ShaderGenerator::_includes
    ShaderGenerator::_localIndex
    ShaderGenerator::_mathFunctions
    ShaderGenerator::_parameters
    ShaderGenerator::_perGroupProcessCall
    ShaderGenerator::_subs
    ShaderGenerator::_writer
    ShaderGenerator::Assets
    MaterialGenerator
    ShaderGenerator::eatBox(Node* caller, Box* box)
    ShaderGenerator::Error
    MaterialGenerator
    ShaderGenerator::findOrAddCubeTexture(const Guid& id)
    ShaderGenerator::findOrAddGlobalSDF()
    ShaderGenerator::findOrAddNormalMap(const Guid& id)
    ShaderGenerator::findOrAddSceneTexture(MaterialSceneTextures type)
    ShaderGenerator::findOrAddTexture(const Guid& id)
    ShaderGenerator::findOrAddTextureGroupSampler(int32 index)
    ShaderGenerator::findParam(const String& shaderName)
    ShaderGenerator::findParam(const Guid& id)
    ShaderGenerator::getLocalName(int32 index)
    ShaderGenerator::getParamName(int32 index)
    MaterialGenerator
    MaterialGenerator
    ShaderGenerator::OnError(Node* node, Box* box, const StringView& message)
    MaterialGenerator
    MaterialGenerator
    ShaderGenerator::ProcessGroupBitwise(Box* box, Node* node, Value& value)
    ShaderGenerator::ProcessGroupBoolean(Box* box, Node* node, Value& value)
    ShaderGenerator::ProcessGroupComparisons(Box* box, Node* node, Value& value)
    ShaderGenerator::ProcessGroupConstants(Box* box, Node* node, Value& value)
    ShaderGenerator::ProcessGroupPacking(Box* box, Node* node, Value& value)
    ShaderGenerator::ShaderGenerator()
    ShaderGenerator::tryGetValue(Box* box, int32 defaultValueBoxIndex, const Value& defaultValue)
    ShaderGenerator::tryGetValue(Box* box, const Value& defaultValue)
    ShaderGenerator::tryGetValue(Box* box, const Variant& defaultValue)
    MaterialGenerator
    MaterialGenerator
    ShaderGenerator::writeFunction1(Node* caller, const Value& valueA, const String& function)
    ShaderGenerator::writeFunction2(Node* caller, const Value& valueA, const Value& valueB, const String& function)
    ShaderGenerator::writeFunction2(Node* caller, const Value& valueA, const Value& valueB, const String& function, ValueType resultType)
    ShaderGenerator::writeFunction3(Node* caller, const Value& valueA, const Value& valueB, const Value& valueC, const String& function, ValueType resultType)
    ShaderGenerator::writeLocal(ValueType type, Node* caller)
    ShaderGenerator::writeLocal(ValueType type, Node* caller, const String& name)
    ShaderGenerator::writeLocal(ValueType type, const Value& value, Node* caller)
    ShaderGenerator::writeLocal(const Value& value, Node* caller)
    ShaderGenerator::writeLocal(ValueType type, const String& value, Node* caller)
    ShaderGenerator::writeLocal(ValueType type, const String& value, Node* caller, const String& name)
    ShaderGenerator::writeOperation2(Node* caller, const Value& valueA, const Value& valueB, Char op1)
    ShaderGenerator::~ShaderGenerator()
    Assembly: FlaxEngine.dll
    File: Engine/Tools/MaterialGenerator/MaterialGenerator.h
    Syntax
    public class MaterialGenerator : public ShaderGenerator

    Constructors

    ~MaterialGenerator()

    Declaration
    public ~MaterialGenerator()

    MaterialGenerator()

    Declaration
    public MaterialGenerator()

    Fields

    getNormal

    Declaration
    public static MaterialValue getNormal
    Field Value
    MaterialValue

    getNormalZero

    Declaration
    public static MaterialValue getNormalZero
    Field Value
    MaterialValue

    getTime

    Declaration
    public static MaterialValue getTime
    Field Value
    MaterialValue

    getUVs

    Declaration
    public static MaterialValue getUVs
    Field Value
    MaterialValue

    getVertexColor

    Declaration
    public static MaterialValue getVertexColor
    Field Value
    MaterialValue

    MaterialGraphBoxesMappings

    Declaration
    public static MaterialGraphBoxesMapping MaterialGraphBoxesMappings[]
    Field Value
    MaterialGraphBoxesMapping

    Methods

    AddLayer(MaterialLayer* layer)

    Add new layer to the generator data (will be deleted after usage)

    Declaration
    public void AddLayer(MaterialLayer* layer)
    Parameters
    MaterialLayer layer

    Layer to add

    Generate(WriteStream& source, MaterialInfo& materialInfo, BytesContainer& parametersData)

    Generate material source code (first layer should be the base one)

    Declaration
    public bool Generate(WriteStream& source, MaterialInfo& materialInfo, BytesContainer& parametersData)
    Parameters
    WriteStream source

    Output source code

    MaterialInfo materialInfo

    Material info structure (will contain output data)

    BytesContainer parametersData

    Output material parameters data

    Returns
    bool

    True if cannot generate code, otherwise false

    GetLayer(const Guid& id, Node* caller)

    Gets layer that has given ID, if not loaded tries to load it

    Declaration
    public MaterialLayer* GetLayer(const Guid& id, Node* caller)
    Parameters
    Guid id

    Layer ID

    Node caller

    Calling node

    Returns
    MaterialLayer

    Material layer or null if cannot do that

    GetMaterialRootNodeBox(MaterialGraphBoxes box)

    Declaration
    public static MaterialGraphBoxesMapping GetMaterialRootNodeBox(MaterialGraphBoxes box)
    Parameters
    MaterialGraphBoxes box

    Returns
    MaterialGraphBoxesMapping

    GetRootLayer()

    Gets material root layer

    Declaration
    public MaterialLayer* GetRootLayer() const
    Returns
    MaterialLayer

    Base layer

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat