This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Material Class

This class is used to create materials, which are assigned to each node (or each surface of the object) and define how they look like. They implement the shaders and control what options, states, parameters of different types and textures are used to render the node during the rendering passes.

Usage Example

The following example describes how to set texture flags to the material's texture. We set the ANISOTROPY_8 flag to the albedo texture of the ground_grid material.

The following code is written in the AppWorldLogic.cpp file.

Source code (C++)
#include "AppWorldLogic.h"
#include "UnigineMaterial.h"
#include "UnigineMaterials.h"
#include "UnigineLog.h"

int AppWorldLogic::init() {
	// load materials
	Materials *materials = Materials::get();
	// get the ground_grid material
	MaterialPtr m = materials->findMaterial("ground_grid");
	// get the number of albedo texture of the ground_grid material
	int num = m->findTexture("albedo");
	// return the current flags and show them in console
	int flags = m->getImageTextureFlags(num);
	Log::message("Image texture flags are:%i \n", flags);
	
	// set the ANISOTROPY_8 flag
	m->setImageTextureFlags(num, Texture::ANISOTROPY_8);
	
	// get the flags and show them in console
	int flagsSet = m->getImageTextureFlags(num);
	Log::message("Image texture flags are:%i \n", flagsSet);
return 1;
}

In the console, you'll see the following result:

Output
Image texture flags are: 81920
Image texture flags are: 524288

Flags are bits of the integer variable: 81920 value means the FILTER_BILINEAR flag, 524288 value means the ANISOTROPY_8 flag.

Material Class

Members


int isAlphaTest()

Returns a value indicating if the material has an alpha test option enabled.

Return value

1 if the material has alpha test option enabled; otherwise, 0.

int getBlendDestFunc()

Returns the destination blending function.

Return value

One of the MATERIAL_BLEND_* variables, which specify ways of calculating the blend factor.

void setBlendFunc(int src, int dest)

Sets the source and destination blending functions.

Arguments

  • int src - Blend mode (one of the MATERIAL_BLEND_* variables) for the source color.
  • int dest - Blend mode (one of the MATERIAL_BLEND_* variables) for the destination color.

int getBlendSrcFunc()

Returns the source blending function.

Return value

One of the MATERIAL_BLEND_* variables, which specify ways of calculating the blend factor.

void setCastShadow(int shadow)

Enables or disables the cast shadow option for an object with the material applied.

Arguments

  • int shadow - 1 to enable casting of shadows, 0 to disable it.

int getCastShadow()

Returns a value indicating if an object with the material applied casts shadows.

Return value

1 if casting of shadows is enabled; otherwise, 0.

void setCastWorldShadow(int shadow)

Enables or disables casting of shadows from the world light for an object with the material applied.

Arguments

  • int shadow - 1 to enable casting of shadows from the world light, 0 to disable it.

int getCastWorldShadow()

Returns a value indicating if an object with the material applied casts shadows from the world light.

Return value

1 if casting of shadows from the world light is enabled; otherwise, 0.

Material getChild(int num)

Returns a child material with a given number.

Arguments

  • int num - Child material number.

Return value

Child material.

Material getCompare()

Returns the parent material, whose parameters have been changed.

Return value

Parent material.

int isDeferred()

Returns a value indicating if the material is rendered in the deferred pass.

Return value

1 if the material is rendered in the deferred pass (non-transparent); otherwise, 0.

void setDepthMask(int mask)

Sets a value indicating if the material uses a depth mask.

Arguments

  • int mask - 1 to use the depth mask, 0 not to use.

int getDepthMask()

Returns a value indicating if the material uses a depth mask.

Return value

Positive number if the depth mask is used; otherwise, 0.

int isEditable()

Returns a value indicating if the material can be edited.

Return value

1 if the material is editable; otherwise, 0.

int isFilter()

Returns a value indicating if the material has filter texture.

Return value

1 if the material has a filter texture; otherwise, 0.

int isForward()

Returns a value indicating if the material is rendered in the forward pass.

Return value

1 if the material is rendered in the forward pass (transparent with blending func); otherwise, 0.

int isHidden()

Returns a value indicating if the material is hidden.

Return value

1 if the material is hidden; otherwise, 0.

void setImageTexture(int num, Texture texture)

Sets the given texture smart pointer to the specified image texture.

Arguments

  • int num - Texture number.
  • Texture texture - Texture smart pointer.

Texture getImageTexture(int num)

Gets the image texture smart pointer.

Arguments

  • int num - Texture number.

Return value

Texture smart pointer.

void setImageTextureFlags(int num, int flags)

Sets the flags on the image texture.

Arguments

  • int num - ID number of the target texture.
  • int flags - Texture flags bit mask.

int getImageTextureFlags(int num)

Returns the flags set on the image texture.

Arguments

  • int num - ID number of the target texture.

Return value

Texture flags bit mask.

int setImageTextureImage(int num, Image image, int dynamic = 0)

Replaces a given texture with an Image instance. If you need to reset a texture of the inherited material instance, set dynamic flag to 1.

Arguments

  • int num - ID number of the target texture.
  • Image image - New texture to set.
  • int dynamic - Dynamic texture flag.
    • If set to 0, changing a texture of the inherited material instance will also affect the base material. If the device is lost and the renderer resets its context, a texture will be reset to a default one instead of the specified image.
    • If set to 1, an image will be successfully set only for the current material instance.

Return value

1 if the texture is replaced successfully; otherwise, 0.

int getImageTextureImage(int num, Image image)

Reads a given texture into an Image instance.

Arguments

  • int num - ID number of the target texture.
  • Image image - Image into which texture is read.

Return value

1 if the texture is read successfully; otherwise, 0.

void setImageTextureName(int num, string name)

Updates the name of a given image texture.

Arguments

  • int num - ID number of the target texture.
  • string name - New name of the image texture or NULL (0) to clear the name.

string getImageTextureName(int num)

Returns the name of a given image texture.

Arguments

  • int num - ID number of the target texture.

Return value

Image texture name or NULL (0), if an error occurs.

void setImageTextureProcedural(int num, Material procedural, int procedural_num)

Assigns the procedural texture to the specified image texture.

Arguments

  • int num - Number of the texture, to which the procedural texture will be assigned.
  • Material procedural - Procedural material.
  • int procedural_num - Procedural texture number.

void setLightMask(int mask)

Sets a shadow mask for the material. The surface with the assigned material lit by a light source casts shadow if the shadow mask of the light source matches the corresponding masks of the surface and its material.

Arguments

  • int mask - Integer value, each bit of which is a mask.

int getLightMask()

Returns a shadow mask of the material. The surface with the assigned material lit by a light source casts shadow if the shadow mask of the light source matches the corresponding masks of the surface and its material.

Return value

Integer value, each bit of which is a mask.

string getName()

Returns a material name.

Return value

Material name.

int getNumChildren()

Returns the number of child materials.

Return value

Number of child materials.

int getNumParameters()

Returns the number of material's parameters.

Return value

Number of material's parameters.

int getNumStates()

Returns the number of material's states.

Return value

Number of material's states.

int getNumTextures()

Returns the number of textures used by the material.

Return value

Number of used textures.

void setOffset(int offset)

Sets the rendering polygon offset for the material. Polygon offset is useful to prevent a Z-fighting effect.

Arguments

  • int offset - Rendering polygon offset in levels. Available values: 0 - 1024 (powers of 2).

int getOffset()

Returns the rendering polygon offset used for the material.

Return value

Rendering polygon offset in levels.

void setOrder(int order)

Sets the rendering order of material. The higher the rendering order, the lower the rendering priority (the material with the -8 order will be rendered first).

Arguments

  • int order - Rendering order.

int getOrder()

Returns the rendering order of materials.

Return value

Rendering order.

void setParameter(variable variable)

Sets a material's parameter value.

Arguments

  • variable variable - Parameter to be updated. It can either be:
    • int - ID number of the target parameter.
    • string - name of the target parameter.

vec4 getParameter(variable variable)

Gets the material's parameter value.

Arguments

  • variable variable - Parameter to be updated. It can either be:
    • int - ID number of the target parameter.
    • string - name of the target parameter.

Return value

Parameter value.

void setParameterArray(int num, Vector<vec4> values)

Sets the values of a given array parameter.

Arguments

  • int num - ID number of the target parameter.
  • Vector<vec4> values - Array of parameter values.

void getParameterArray(int num, Vector<vec4> & values)

Returns the values of a given array parameter.

Arguments

  • int num - ID number of the target parameter.
  • Vector<vec4> & values - Array of parameter values.

int setParameterExpression(int num, string expression)

Sets the expression used as a parameter value.

Arguments

  • int num - ID number of the target parameter.
  • string expression - New expression.

Return value

1 if the expression is set successfully; otherwise, 0.

string getParameterExpression(int num)

Returns an expression used as a parameter value.

Arguments

  • int num - ID number of the target parameter.

Return value

Parameter expression, if it exists; otherwise, NULL (0).

string getParameterGroup(int num)

Returns the group of the material parameter.

Arguments

  • int num - ID number of the target parameter.

Return value

The group of the material parameter.

int isParameterHidden(int num)

Returns a value indicating if a given parameter is hidden.

Arguments

  • int num - ID number of the target parameter.

Return value

1 if the parameter is hidden; otherwise, 0.

int setParameterMask(int num, int mask)

Sets a mask for a given parameter.

Arguments

  • int num - ID number of the target parameter.
  • int mask - Integer value, each bit of which is a mask.

int getParameterMask(int num)

Returns the mask for a given parameter.

Arguments

  • int num - ID number of the target parameter.

Return value

Integer value, each bit of which is a mask.

string getParameterName(int num)

Returns the name of a given parameter.

Arguments

  • int num - ID number of the target parameter.

Return value

Parameter name.

void setParameterSlider(int num, float value)

Sets the value of a given slider parameter.

Arguments

  • int num - ID number of the target slider parameter.
  • float value - Slider parameter value.

float getParameterSlider(int num)

Returns the current value of a given slider parameter.

Arguments

  • int num - ID number of the target slider parameter.

Return value

Slider parameter value.

int getParameterSliderLog10(int num)

Returns a value indicating if a given parameter uses a logarithmic scale (with the base ten).

Arguments

  • int num - ID number of the target parameter.

Return value

1 if the parameter uses a logarithmic scale; otherwise, 0.

int getParameterSliderMaxExpand(int num)

Returns a value indicating if the maximum value of a given parameter can be increased.

Arguments

  • int num - ID number of the target parameter.

Return value

1 if the maximum value can be changed; otherwise, 0.

float getParameterSliderMaxValue(int num)

Returns the maximum allowed value of a slider parameter.

Arguments

  • int num - ID number of the target parameter.

Return value

Maximum value.

int getParameterSliderMinExpand(int num)

Returns a value indicating if the minimum value of a given parameter can be decreased.

Arguments

  • int num - ID number of the target parameter.

Return value

1 if the minimum value can be changed; otherwise, 0.

float getParameterSliderMinValue(int num)

Returns the minimum allowed value of a slider parameter.

Arguments

  • int num - ID number of the target parameter.

Return value

Minimum value.

string getParameterTitle(int num)

Returns the title of the material parameter.

Arguments

  • int num - ID number of the target parameter.

Return value

Material parameter title.

string getParameterTooltip(int num)

Returns the tooltip of the material parameter.

Arguments

  • int num - ID number of the target parameter.

Return value

The tooltip text of the material parameter.

int getParameterType(int num)

Returns the type of a given parameter.

Arguments

  • int num - ID number of the target parameter.

Return value

One of the MATERIAL_PARAMETER_* pre-defined variables or -1, if an error occurred.

string getParameterWidget(int num)

Returns the widget for a given parameter.

Arguments

  • int num - ID number of the target parameter.

Return value

Widget name for a given parameter.

Material getParent()

Returns the parent material.

Return value

Parent material or NULL (0), if the current material has no parent.

int isParent(string name)

Returns a value indicating if the material is parent.

Arguments

  • string name - Material name.

Return value

1 if the material is parent, otherwise - 0.

int isProcedural()

Returns a value indicating if the material has procedural texture.

Return value

1 if the material has a procedural texture; otherwise, 0.

int setProceduralTextureImage(int num, Image image)

Replaces a given procedural texture with an Image instance. Procedural textures are calculated in run-time on GPU, using custom shaders. For example, this function allows to set the initial value for such texture.

Arguments

  • int num - ID number of the target texture. In materials, such texture should be declared with type="procedural" attribute.
  • Image image - New texture to set.

Return value

1 if the texture is replaced successfully; otherwise, 0.

int getProceduralTextureImage(int num, Image image)

Reads a given procedural texture into an Image instance. Procedural textures are calculated in run-time on GPU, using custom shaders. For example, this function allows to read the value of such texture at any moment.

Arguments

  • int num - Number of the target texture. In materials, such texture should be declared with type="procedural" attribute.
  • Image image - Image into which texture is read.

Return value

1 if the texture is read successfully; otherwise, 0.

int isReflection2D()

Returns a value indicating if the material has 2d reflection texture.

Return value

1 if the material has a 2d reflection texture; otherwise, 0.

void setState(variable variable, int value)

Sets the state value.

Arguments

  • variable variable - State to be updated. It can either be:
    • int - ID number of the target state.
    • string - name of the target state.
  • int value - State value to be set.

int getState()

Returns the value of the given state.

Arguments

    Return value

    State value.

    string getStateGroup(int num)

    Returns the group of the material state.

    Arguments

    • int num - ID number of the target state.

    Return value

    The group of the material state.

    int isStateHidden(int num)

    Returns a value indicating if a given state is hidden.

    Arguments

    • int num - ID number of the target state.

    Return value

    1 is the state is hidden; otherwise, 0.

    string getStateName(int num)

    Returns the name of a given state.

    Arguments

    • int num - ID number of the target state.

    Return value

    State name.

    string getStateSwitchItem(int num, int item)

    Returns the switch item name for a given state.

    Arguments

    • int num - ID number of the target state.
    • int item - ID number of the target item.

    Return value

    Switch item name or NULL (0), if an error occurred.

    int getStateSwitchNumItems(int num)

    Returns the number of switch items for a given state.

    Arguments

    • int num - ID number of the target state.

    Return value

    Number of switch items.

    string getStateTitle(int num)

    Returns the title of the material state.

    Arguments

    • int num - ID number of the target state.

    Return value

    The title of the material state.

    string getStateTooltip(int num)

    Returns the tooltip of the material state.

    Arguments

    • int num - ID number of the target state.

    Return value

    The tooltip text of the material state.

    int getStateType(int num)

    Returns the type of a given state.

    Arguments

    • int num - ID number of the target state.

    Return value

    One of the MATERIAL_STATE_* pre-defined variables or -1, if an error occurred.

    string getTextureGroup(int num)

    Returns the group of the material texture.

    Arguments

    • int num - ID number of the target texture.

    Return value

    The group of the material texture.

    int isTextureHidden(int num)

    Returns a value indicating if the texture is hidden.

    Arguments

    • int num - ID number of the target texture.

    Return value

    1 if the texture is hidden; otherwise, 0.

    string getTextureName(int num)

    Returns the name of a given texture.

    Arguments

    • int num - ID number of the target texture.

    Return value

    Texture name.

    string getTextureTitle(int num)

    Returns the title of the material texture.

    Arguments

    • int num - ID number of the target texture.

    Return value

    Title of the material texture.

    string getTextureTooltip(int num)

    Returns the tooltip of the material texture.

    Arguments

    • int num - ID number of the target texture.

    Return value

    Tooltip text of the material texture.

    int getTextureType(int num)

    Returns the type of a given texture.

    Arguments

    • int num - ID number of the target texture.

    Return value

    One of the MATERIAL_TEXTURE_* pre-defined variables or -1, if an error occurred.

    void setTransparent(int transparent)

    Sets a value indicating the transparency type of the material. If the transparent option is set to TRANSPARENT_NONE or TRANSPARENT_DEFERRED, the blending function won't be used.

    Arguments

    • int transparent - The transparency option (one of the TRANSPARENT_* variables).

    int getTransparent()

    Returns a value indicating the transparency type of the material.

    Return value

    One of the TRANSPARENT_* variables.

    void setTwoSided(int sided)

    Enables or disables the two sided option for the material.

    Arguments

    • int sided - 1 to make the material two-sided, 0 to make it one-sided.

    int getTwoSided()

    Returns a value indicating if the material is two-sided.

    Return value

    1 if the material is two-sided; otherwise, 0.

    void setViewportMask(int mask)

    Sets a bit mask for rendering into the viewport. The material is rendered, if its mask matches the player's one.

    Arguments

    • int mask - Integer, each bit of which is a mask.

    int getViewportMask()

    Returns the current bit mask for rendering into the viewport. The material is rendered, if its mask matches the player's one.

    Return value

    Integer, each bit of which is a mask.

    int isWater()

    Returns a value indicating if the material is rendered in the water pass.

    Return value

    1 if the material is rendered in the water pass; otherwise, 0.

    Material clone(string name)

    Clones the material.

    Arguments

    • string name - New material name.

    Return value

    Cloned material.

    int fetchParameter(string name, int fast_id)

    Searches for a parameter by a given name among all parameters of the current material.

    Arguments

    • string name - Parameter name.
    • int fast_id - ID number of the parameter in users auxiliary parameters cache. The value must be in the range [0; 128]

    Return value

    ID number of the parameter, if it is found; otherwise, -1.

    int fetchState(string name, int fast_id)

    Searches for a state by a given name among all states of the current material.

    Arguments

    • string name - State name.
    • int fast_id - ID number of the state in users auxiliary states cache. The value must be in the range [0; 128]

    Return value

    ID number of the state, if it is found; otherwise, -1.

    int fetchTexture(string name, int fast_id)

    Searches for a texture by a given name among all textures used by the current material.

    Arguments

    • string name - Texture name.
    • int fast_id - ID number of the texture in users auxiliary textures cache. The value must be in the range [0; 128]

    Return value

    ID number of the texture, if it is found; otherwise, -1.

    int findParameter(string name)

    Searches for a parameter by a given name among all parameters of the current material.

    Arguments

    • string name - Parameter name.

    Return value

    ID number of the parameter, if it is found; otherwise, -1.

    int findState(string name)

    Searches for a state by a given name among all states of the current material.

    Arguments

    • string name - State name.

    Return value

    ID number of the state, if it is found; otherwise, -1.

    int findTexture(string name)

    Searches for a texture by a given name among all texture used by the current material.

    Arguments

    • string name - Texture name.

    Return value

    ID number of the texture, if it is found; otherwise, -1.

    Material inherit(string name)

    Creates a new material with a specified name and sets the current material as its parent.

    Arguments

    • string name - New material name.

    Return value

    Inherited material.

    int load(Xml xml)

    Loads material settings from the Xml.

    Arguments

    • Xml xml - Xml smart pointer.

    Return value

    1 if the material settings are loaded successfully; otherwise, 0.

    int loadWorld(Xml xml)

    Loads material settings from the Xml.

    Arguments

    • Xml xml - Xml smart pointer.

    Return value

    1 if the material settings are loaded successfully; otherwise, 0.

    int restoreState(Stream stream, int forced = 0)

    Restores the state of a given material (all of its options, states and parameters) from a binary stream.
    Warning
    This function is deprecated and will be removed in the next release.

    Arguments

    • Stream stream - The stream with saved material data.
    • int forced - Forced restoring of material settings.

    Return value

    1 if the material settings are restored successfully; otherwise, 0.

    int save(Xml xml)

    Saves material settings to the Xml.

    Arguments

    • Xml xml - Xml smart pointer.

    Return value

    1 if the material settings are saved successfully; otherwise, 0.

    int saveState(Stream stream, int forced = 0)

    Saves the settings of a given material (all of its options, states and parameters) into a binary stream.
    Warning
    This function is deprecated and will be removed in the next release.

    Arguments

    • Stream stream - The stream to save material state data.
    • int forced - Forced saving of material settings.

    Return value

    1 if the material settings are saved successfully; otherwise, 0.

    int saveWorld(Xml xml, int force)

    Saves material settings to the Xml.

    Arguments

    • Xml xml - Xml smart pointer.
    • int force - Forced saving of material settings.

    Return value

    1 if the material settings are saved successfully; otherwise, 0.

    int isTextureOverridden(int num)

    Arguments

    • int num

    int isStateOverridden(int num)

    Arguments

    • int num

    int isParameterOverridden(int num)

    Arguments

    • int num

    int MATERIAL_PARAMETER_ARRAY

    Description

    Parameter of this type accepts vec4 data type.

    int MATERIAL_PARAMETER_COLOR

    Description

    Parameter of this type requires a color value—a quad of floats corresponding to RGBA color components.

    int MATERIAL_PARAMETER_COMBINER

    Description

    Parameter of this type allows you to combine some parameter values in one data type.

    int MATERIAL_PARAMETER_CONSTANT

    Description

    Parameter of this type accepts only a constant value.

    int MATERIAL_PARAMETER_EXPRESSION

    Description

    Parameter of this type accepts expressions, which may include any operators, functions, and constants from the UnigineScript core library plus additional variable time and functions random() and noise().

    int MATERIAL_PARAMETER_SLIDER

    Description

    Parameter of this type accepts values only from a continuous range of allowed values.

    int MATERIAL_STATE_INT

    Description

    State of this type allows specifying only one possible value.

    int MATERIAL_STATE_SWITCH

    Description

    State of this type allows specifying a set of more than two possible values.

    int MATERIAL_STATE_TOGGLE

    Description

    State of this type allows only two possible values.

    int MATERIAL_TEXTURE_AUXILIARY

    Description

    Auxiliary texture is used for different post effects (auxiliary pass).

    int MATERIAL_TEXTURE_CLOUDS_COVERAGE

    int MATERIAL_TEXTURE_CLOUDS_SCREEN

    int MATERIAL_TEXTURE_CURRENT_DEPTH

    Description

    A texture of this type stores current depth data for all geometry on the scene.

    int MATERIAL_TEXTURE_DECAL_ALBEDO

    Description

    A texture of this type stores albedo color data for decals.

    int MATERIAL_TEXTURE_DECAL_DEPTH

    Description

    A texture of this type stores depth data for decals.

    int MATERIAL_TEXTURE_DECAL_NORMAL

    Description

    A texture of this type stores normal data for decals.

    int MATERIAL_TEXTURE_DECAL_SHADING

    Description

    A texture of this type stores shading data for decals.

    int MATERIAL_TEXTURE_DEFERRED_LIGHT

    Description

    A texture of this type uses a deferred buffer to store light values.

    int MATERIAL_TEXTURE_DEFERRED_REFLECTION

    Description

    A texture of this type uses a deferred buffer to store reflection values.

    int MATERIAL_TEXTURE_DOF_MASK

    Description

    A texture of this type stores a DoF (Depth of Field) mask.

    int MATERIAL_TEXTURE_FIELD_HEIGHT_ARRAY

    Description

    A heightmap texture is used to create an additional height displacement for water surface. Field Height textures are rendered in a 2D array of R16F or R32F textures (depends on settings). All Field Height textures are packed into 2D array to pass the data to the shader.

    int MATERIAL_TEXTURE_FIELD_SHORELINE_ARRAY

    Description

    A field shoreline texture. All Field Shoreline textures are packed into 2D array (of RGBA8) to pass the data to the shader.

    int MATERIAL_TEXTURE_FILTER

    Description

    A filtering texture.

    int MATERIAL_TEXTURE_GBUFFER_ALBEDO

    Description

    A texture of this type uses a G-Buffer to store albedo values.

    int MATERIAL_TEXTURE_GBUFFER_LIGHTMAP

    Description

    A texture of this type uses a G-Buffer to store light map values.

    int MATERIAL_TEXTURE_GBUFFER_MATERIAL_MASK

    Description

    A texture of this type uses a G-Buffer to store material mask data.

    int MATERIAL_TEXTURE_GBUFFER_NORMAL

    Description

    A texture of this type uses a G-Buffer to store normal values.

    int MATERIAL_TEXTURE_GBUFFER_SHADING

    Description

    A texture of this type uses a G-Buffer to store shading data.

    int MATERIAL_TEXTURE_GBUFFER_VELOCITY

    Description

    A texture of this type uses a G-Buffer to store velocity values.

    int MATERIAL_TEXTURE_GEODETIC_TOPOLOGY

    Description

    A texture of this type stores geodetic topology data.

    int MATERIAL_TEXTURE_IMAGE

    Description

    A standard bitmap image.

    int MATERIAL_TEXTURE_LIGHT_DEPTH

    Description

    A texture of this type stores depth values (used to render shadows).

    int MATERIAL_TEXTURE_LIGHT_IMAGE

    Description

    A texture of this type stores the light values provided by projected light sources.

    int MATERIAL_TEXTURE_LINEAR_DEPTH

    Description

    A texture of this type stores linear depth data.

    int MATERIAL_TEXTURE_OPACITY_DEPTH

    Description

    A texture of this type stores depth data for opacity geometry and can be used for soft particles and volumetrics.

    int MATERIAL_TEXTURE_OPACITY_SCREEN

    Description

    A texture of this type stores the deferred composite and emission data.

    int MATERIAL_TEXTURE_PROCEDURAL

    Description

    A procedurally generated texture.

    int MATERIAL_TEXTURE_REFLECTION_2D

    Description

    A texture of this type stores reflection values (used to render 2D reflections).

    int MATERIAL_TEXTURE_REFLECTION_CUBE

    Description

    A texture of this type stores reflection values (used to render cube-mapped reflections).

    int MATERIAL_TEXTURE_REFRACTION

    Description

    A texture of this type stores refraction data.

    int MATERIAL_TEXTURE_SCATTERING_GROUND_LUT

    Description

    A texture of this type stores ground scattering LUT data.

    int MATERIAL_TEXTURE_SCATTERING_SKY_LUT

    Description

    A texture of this type stores sky scattering LUT data.

    int MATERIAL_TEXTURE_SCREEN_COLOR

    Description

    A texture of this type stores screen color data and can be used for post effects.

    int MATERIAL_TEXTURE_SCREEN_COLOR_OLD

    Description

    A texture of this type stores Color Old (previous frame) data.

    int MATERIAL_TEXTURE_SCREEN_COLOR_OLD_REPROJECTION

    Description

    A texture of this type stores Color Old (previous frame) Reprojection data.

    int MATERIAL_TEXTURE_SSAO

    Description

    A texture of this type stores SSAO (Screen Space Ambient Occlusion) data.

    int MATERIAL_TEXTURE_SSGI

    Description

    A texture of this type stores SSGI (Screen Space Global Illumination) data.

    int MATERIAL_TEXTURE_SSR

    Description

    A texture of this type stores SSR (Screen Space Reflections) data.

    int MATERIAL_TEXTURE_SSR_DEPTH

    Description

    A texture of this type stores SSR (Screen Space Reflections) depth data.

    int MATERIAL_TEXTURE_TRANSPARENT_ENVIRONMENT_PROBE

    Description

    A texture of this type stores an environment cube map.

    int MATERIAL_TEXTURE_WBUFFER_CONSTANT_ID

    Description

    A constant texture, R32U. A texture of this type stores the ID value of the water mesh which is used to load the corresponding textures and parameters for it.

    int MATERIAL_TEXTURE_WBUFFER_DIFFUSE

    Description

    A diffuse texture. The diffuse color of the water is black, and diffuse texture is necessary for decals, that will be displayed over the water surface.

    int MATERIAL_TEXTURE_WBUFFER_FOG

    Description

    An underwater fog texture, RGBA16.

    int MATERIAL_TEXTURE_WBUFFER_NORMAL

    Description

    A normal texture stores normal data for lighting, and alpha channel stores mesh transparency values (it can be used for soft intersections with water geometry).

    int MATERIAL_TEXTURE_WBUFFER_WATER

    Description

    A water texture, RG8. It is used to create the procedural foam mask. The mask shows where the foam will be depicted.

    int MATERIAL_TEXTURE_WBUFFER_WU_MASK

    Description

    An underwater mask texture, RGB8. Underwater mask is used only for Global water, since water mesh doesn't have an underwater mode.

    int MATERIAL_TRANSPARENT_ALPHA_TEST

    Description

    A transparent material which uses alpha test.

    int MATERIAL_TRANSPARENT_BLEND

    Description

    A transparent material which is rendered in forward pass, uses blend func.

    int MATERIAL_TRANSPARENT_DEFERRED

    Description

    A transparent material which is rendered in deferred pass upon the deferred geometry into the g-buffer with alpha blend, doesn't use blend func.

    int MATERIAL_TRANSPARENT_NONE

    Description

    An opaque material (non-transparent), doesn't use blend func.

    int MATERIAL_TRANSPARENT_WATER

    Description

    A transparent material which is rendered in water pass.
    Last update: 2017-07-03
    Build: ()