Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Latest commit

 

History

History
52 lines (32 loc) · 1.62 KB

CustomMaterial.rst

File metadata and controls

52 lines (32 loc) · 1.62 KB

CustomMaterial

Material object which provides more control over surface properties.

Inherit:

Material

Description

CustomMaterials allow the user to specify their own shaders via the ShaderData datablock. Because CustomMaterials are derived from Materials, they can hold a lot of the same properties. It is up to the user to code how these properties are used.

Example:

singleton CustomMaterial( WaterBasicMat )
{
   sampler["reflectMap"] = "$reflectbuff";
   sampler["refractBuff"] = "$backbuff";

   cubemap = NewLevelSkyCubemap;
   shader = WaterBasicShader;
   stateBlock = WaterBasicStateBlock;
   version = 2.0;
};

Fields