Merge branch 'ModernEditorLayoutWIP' of https://github.com/Areloch/Torque3D into development

This commit is contained in:
Areloch 2019-05-13 00:28:23 -05:00
commit 3697737498
148 changed files with 3463 additions and 547 deletions

View file

@ -25,99 +25,108 @@ class CustomShaderFeatureData;
class CustomFeatureHLSL : public ShaderFeatureHLSL
{
friend class CustomShaderFeatureData;
friend class CustomShaderFeatureData;
struct VarHolder
{
String varName;
String defaultValue;
String type;
bool uniform;
bool sampler;
bool texture;
U32 constNum;
ConstantSortPosition constSortPos;
U32 arraySize;
struct VarHolder
{
String varName;
String type;
String defaultValue;
S32 elementId;
bool uniform;
bool sampler;
bool texture;
bool texCoord;
U32 constNum;
U32 arraySize;
String structName;
ConstantSortPosition constSortPos;
VarHolder() :
varName(""),
type(""),
defaultValue(""),
uniform(false),
sampler(false),
texture(false),
constNum(0),
arraySize(0),
constSortPos(cspUninit)
{
}
VarHolder() :
varName(""),
type(""),
defaultValue(""),
elementId(-1),
uniform(false),
sampler(false),
texture(false),
texCoord(false),
constNum(0),
arraySize(0),
structName(""),
constSortPos(cspUninit)
{
}
VarHolder(String _varName,String _type, String _defaultValue) :
uniform(false), sampler(false), texture(false), constNum(0), arraySize(0), constSortPos(cspUninit)
{
varName = _varName;
type = _type;
defaultValue = _defaultValue;
}
};
VarHolder(String _varName, String _type, String _defaultValue) :
elementId(-1), uniform(false), sampler(false), texture(false), texCoord(false), constNum(0), arraySize(0), structName(""), constSortPos(cspUninit)
{
varName = _varName;
type = _type;
defaultValue = _defaultValue;
}
};
Vector<VarHolder> mVars;
Vector<VarHolder> mVars;
enum outputState
{
NoOutput,
VertexOutput,
PixelOutput
};
Vector<VarHolder> mConnectorVars;
outputState mOutputState;
enum outputState
{
NoOutput,
VertexOutput,
PixelOutput
};
outputState mOutputState;
public:
CustomShaderFeatureData* mOwner;
CustomShaderFeatureData* mOwner;
Vector<ShaderComponent*> mComponentList;
MaterialFeatureData mFeatureData;
Vector<ShaderComponent*> mComponentList;
MaterialFeatureData mFeatureData;
protected:
MultiLine *meta;
MultiLine* meta;
public:
//****************************************************************************
// Accu Texture
//****************************************************************************
virtual void processVert(Vector<ShaderComponent*> &componentList,
const MaterialFeatureData &fd);
//****************************************************************************
// Accu Texture
//****************************************************************************
virtual void processVert(Vector<ShaderComponent*>& componentList,
const MaterialFeatureData& fd);
virtual void processPix(Vector<ShaderComponent*> &componentList,
const MaterialFeatureData &fd);
virtual void processPix(Vector<ShaderComponent*>& componentList,
const MaterialFeatureData& fd);
virtual Material::BlendOp getBlendOp() { return Material::LerpAlpha; }
virtual Material::BlendOp getBlendOp() { return Material::LerpAlpha; }
virtual Resources getResources(const MaterialFeatureData &fd)
{
Resources res;
res.numTex = 1;
res.numTexReg = 1;
return res;
}
virtual Resources getResources(const MaterialFeatureData& fd)
{
Resources res;
res.numTex = 1;
res.numTexReg = 1;
return res;
}
virtual void setTexData(Material::StageData &stageDat,
const MaterialFeatureData &fd,
RenderPassData &passData,
U32 &texIndex);
virtual void setTexData(Material::StageData& stageDat,
const MaterialFeatureData& fd,
RenderPassData& passData,
U32& texIndex);
virtual String getName()
{
return mOwner->getName();
}
virtual String getName()
{
return mOwner->getName();
}
bool hasFeature(String name);
bool hasFeature(String name);
void addUniform(String name, String type, String defaultValue, U32 arraySize = 0);
void addVariable(String name, String type, String defaultValue);
void addSampler(String name, String type, U32 arraySize = 0);
void addTexture(String name, String type, String samplerState, U32 arraySize);
void addConnector(String name, String elementName, String type);
void writeLine(String format, S32 argc, ConsoleValueRef *argv);
};
void addUniform(String name, String type, String defaultValue, U32 arraySize = 0);
void addVariable(String name, String type, String defaultValue);
void addSampler(String name, String type, U32 arraySize = 0);
void addTexture(String name, String type, String samplerState, U32 arraySize);
void addConnector(String name, String type, String elementName);
void addVertTexCoord(String name);
void writeLine(String format, S32 argc, ConsoleValueRef* argv);
};