mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Merge branch 'CustomShaderFeatures' of https://github.com/Areloch/Torque3D into development
This commit is contained in:
commit
c283295f22
37 changed files with 1365 additions and 38 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -21,7 +21,13 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- cube.dae MATERIALS BEGIN ---
|
||||
singleton Material(cube_GridMaterial)
|
||||
singleton CustomShaderFeatureData(FlatColorFeature)
|
||||
{
|
||||
|
||||
|
||||
};
|
||||
|
||||
/*singleton Material(cube_GridMaterial)
|
||||
{
|
||||
mapTo = "GridMaterial";
|
||||
|
||||
|
|
@ -41,7 +47,40 @@ singleton Material(cube_GridMaterial)
|
|||
specularPower0 = "0.415939";
|
||||
pixelSpecular0 = "0";
|
||||
specular0 = "0.9 0.9 0.9 1";
|
||||
|
||||
mapTo = "GridMaterial";
|
||||
|
||||
CustomShaderFeature[0] = FlatColorFeature;
|
||||
CustomShaderFeatureUniforms[FlatColorFeature,0] = "TestFloat";
|
||||
};
|
||||
|
||||
|
||||
//--- cube.dae MATERIALS END ---
|
||||
|
||||
//Voodoo!
|
||||
function FlatColorFeature::processVertHLSL(%this)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function FlatColorFeature::processPixelHLSL(%this)
|
||||
{
|
||||
%this.addUniform("strudel", "float2");
|
||||
%this.addSampler("strudelMap");
|
||||
%this.addTexture("strudelTex", "Texture2D", "strudelMap");
|
||||
|
||||
%this.addVariable("bobsyeruncle", "float", 15.915);
|
||||
%this.addVariable("chimmychanga", "float");
|
||||
|
||||
%this.writeLine(" @ = @ * 2;", "chimmychanga", "bobsyeruncle");
|
||||
%this.writeLine(" @ *= @.x;", "bobsyeruncle", "strudel");
|
||||
%this.writeLine(" @ *= @.y;", "chimmychanga", "strudel");
|
||||
|
||||
%this.addVariable("sprangle", "float4");
|
||||
%this.writeLine(" @ = @.Sample(@,@);", "sprangle", "strudelTex", "strudelMap", "strudel");
|
||||
}
|
||||
|
||||
function FlatColorFeature::setTextureResources(%this)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue