Classes

Assets/Materials

Brief descriptions

Structures

nau::assets::MaterialAssetTag

nau::MaterialPipeline

Encapsulates compiled shaders data.

nau::Material

Encapsulates a rendering material, which is a named collection of material pipelines (see MaterialPipeline).

nau::IMaterialAssetAccessor

Detailed information

assets::MaterialAssetTag

engine/core/modules/assets/include/nau/assets/asset_ref.h

struct MaterialAssetTag

Temporary material asset tags.


MaterialPipeline

engine/core/modules/assets/include/nau/assets/material.h

struct MaterialPipeline

Encapsulates compiled shaders data.

In metadata files user can specify settings for the associated shaders compilation. By using preprocessing techniques user can create multiple compiled versions of the same .hlsl shader (i.e. shader assets). For a render pass, user has to specify concrete compiled shader versions for each stage. Material pipeline encapsulates them.

Public Members

eastl::unordered_map<eastl::string, RuntimeValue::Ptr> properties

A collection of all shader inputs (i.e. constants, textures, buffers, etc.).

eastl::vector<eastl::string> shaders

A collection of handles to the compiled shaders.

eastl::optional<CullMode> cullMode
eastl::optional<DepthMode> depthMode
eastl::optional<BlendMode> blendMode
eastl::optional<bool> isScissorsEnabled
eastl::optional<ComparisonFunc> stencilCmpFunc
properties
shaders
cullMode
depthMode
blendMode
isScissorsEnabled

Material

engine/core/modules/assets/include/nau/assets/material.h

struct Material

Encapsulates a rendering material, which is a named collection of material pipelines (see MaterialPipeline).

A material provides an opportunity to switch between various pipelines in runtime.

Public Members

eastl::string name
eastl::optional<eastl::string> master

A handle to the master material.

It is not set if the material itself is master.

eastl::unordered_map<eastl::string, MaterialPipeline> pipelines

A collection of named pipelines to switch between.

name
master

IMaterialAssetAccessor

engine/core/modules/assets/include/nau/assets/material_asset_accessor.h

struct IMaterialAssetAccessor : public nau::IAssetAccessor

Public Functions

virtual IAssetAccessor Result fillMaterial (Material &material) const =0