Urho.CoreAssets.Techniques Class

Provides access to the techniques that are part of every CoreAssets package in Urho.

See Also: CoreAssets+Techniques

Syntax

public static class CoreAssets.Techniques

Remarks

Usually, Technique name consists of a combination of features it uses:

Basic - uses Basic shader, good for debug purposes

Diff - displays a texture. It defines DIFFMAP and expects the texture in 'diffuse' texture unit (sDiffMap sampler).

Normal - expects a normal map in 'normal' texture unit (sNormalMap sampler)

Spec - expects a specular map in 'specular' texture unit.

NoTexture - used by materials without textures.

EnvCube - expects an environment map (cubic texture) in 'environment' texture unit.

Unlit - materials with this technique won't be affected by any lights (self-illuminated).

Emissive - similiar to Unlit, but it expects an emissive map in 'emissive' texture unit and will be affected by scene lights

LightMap - expects a light map in 'emissive' texture unit.

AO - expects an Ambient Occlusion map in 'emissive' texture unit.

Translucent - materials with this technique will be affected by lights located behind the materials.

VColor - will take Vertex Color (for example, defined via DefineColor) into account.

Additive blending simply sums the values in the two layers. Blending with white gives white. Blending with black does not change the image.

Multiply blend mode multiplies the numbers for each pixel of the top layer with the corresponding pixel for the bottom layer. The result is a darker picture.

You can access built-in techniques via CoreAssets.Techniques:

C# Example

Technique diff = CoreAssets.Techniques.Diff;

It allows to create different materials in code, for example the following snippet creates a material from a texture and a normal map using CoreAssets+Techniques.DiffNormal:

C# Example

var material = new Material(); material.SetTechnique(index: 0, tech: CoreAssets.Techniques.DiffNormal, qualityLevel: 1, lodDistance: 1); material.SetTexture(TextureUnit.Diffuse, ResourceCache.GetTexture2D("Earth.jpg")); material.SetTexture(TextureUnit.Normal, ResourceCache.GetTexture2D("Earth_normal.jpg"));

Some of the basic techniques are explained in the following image

Requirements

Namespace: Urho
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0

The members of Urho.CoreAssets.Techniques are listed below.

See Also: Object

Public Properties

[read-only]
static
BasicVColUnlitAlphaTechnique. Vertex color, no lights, alpha blending.
[read-only]
static
DiffTechnique. Basic diffuse technique, defines DIFFMAP and expects a texture in 'diffuse' texture unit..
[read-only]
static
DiffAddTechnique. Same as Diffuse but with alpha blending.
[read-only]
static
DiffAddAlphaTechnique. Diffuse map with alpha and additive blending.
[read-only]
static
DiffAlphaTechnique. Diffuse map with alpha blending.
[read-only]
static
DiffAlphaTranslucentTechnique. Diffuse map with alpha blending. Can be translucent.
[read-only]
static
DiffAOTechnique. Diffuse map with ambient occlusion. AO should be passed to 'emissive' texture unit.
[read-only]
static
DiffAOAlphaTechnique. Diffuse map with ambient occlusion and Alpha blending. AO should be passed to 'emissive' texture unit.
[read-only]
static
DiffEmissiveTechnique. Diffuse and emissive maps.
[read-only]
static
DiffEmissiveAlphaTechnique. Diffuse and emissive maps with Alpha blending.
[read-only]
static
DiffEnvCubeTechnique. Diffuse and environment maps.
[read-only]
static
DiffEnvCubeAlphaTechnique. Diffuse and environment maps with Alpha blending.
[read-only]
static
DiffEnvCubeAOTechnique. Diffuse and environment maps with Ambient Occlusion.
[read-only]
static
DiffEnvCubeAOAlphaTechnique. Diffuse and environment maps with Alpha blending and Ambient Occlusion.
[read-only]
static
DiffLightMapTechnique. Diffuse and light maps.
[read-only]
static
DiffLightMapAlphaTechnique. Diffuse and light maps with Alpha blending.
[read-only]
static
DiffLitParticleAlphaTechnique.
[read-only]
static
DiffLitParticleAlphaSoftTechnique.
[read-only]
static
DiffLitParticleAlphaSoftExpandTechnique.
[read-only]
static
DiffMultiplyTechnique. Diffuse map with blend mode 'multiply'
[read-only]
static
DiffNormalTechnique. Diffuse and normal maps.
[read-only]
static
DiffNormalAlphaTechnique. Diffuse and normal maps with Alpha blending.
[read-only]
static
DiffNormalAlphaTranslucentTechnique. Diffuse and normal maps with Alpha blending. Can be translucent.
[read-only]
static
DiffNormalAOTechnique. Diffuse and normal maps with Ambient occlusion.
[read-only]
static
DiffNormalAOAlphaTechnique. Diffuse and normal maps with Ambient occlusion and Alpha blending.
[read-only]
static
DiffNormalEmissiveTechnique. Diffuse, normal and emissive maps.
[read-only]
static
DiffNormalEmissiveAlphaTechnique. Diffuse, normal and emissive maps with Alpha blending.
[read-only]
static
DiffNormalEnvCubeTechnique. Diffuse, normal and environment maps.
[read-only]
static
DiffNormalEnvCubeAlphaTechnique. Diffuse, normal and environment maps with Alpha blending.
[read-only]
static
DiffNormalSpecTechnique. Diffuse, normal and specular maps.
[read-only]
static
DiffNormalSpecAlphaTechnique. Diffuse, normal and specular maps with alpha.
[read-only]
static
DiffNormalSpecAOTechnique. Diffuse, normal and specular maps with Ambient occlusion.
[read-only]
static
DiffNormalSpecAOAlphaTechnique. Diffuse, normal and specular maps with Ambient occlusion and Alpha blending.
[read-only]
static
DiffNormalSpecEmissiveTechnique. Diffuse, normal, specular and emissive maps.
[read-only]
static
DiffNormalSpecEmissiveAlphaTechnique. Diffuse, normal, specular and emissive maps with Alpha blending.
[read-only]
static
DiffOverlayTechnique. Diffuse map..
[read-only]
static
DiffSkyboxTechnique. Diffuse map for Skybox.
[read-only]
static
DiffSkyboxHDRScaleTechnique.
[read-only]
static
DiffSkydomeTechnique. Diffuse map for Skydome.
[read-only]
static
DiffSkyplaneTechnique. Diffuse map for Skyplane.
[read-only]
static
DiffSpecTechnique. Diffuse and specular maps.
[read-only]
static
DiffSpecAlphaTechnique. Diffuse and specular maps with Alpha blending.
[read-only]
static
DiffUnlitTechnique. Diffuse map, not affected by any lighting (unlit).
[read-only]
static
DiffUnlitAlphaTechnique. Diffuse map, not affected by any lighting (unlit) with Alpha blending.
[read-only]
static
DiffUnlitParticleAddTechnique.
[read-only]
static
DiffUnlitParticleAddSoftTechnique.
[read-only]
static
DiffUnlitParticleAlphaTechnique.
[read-only]
static
DiffUnlitParticleAlphaSoftTechnique.
[read-only]
static
DiffUnlitParticleAlphaSoftExpandTechnique.
[read-only]
static
DiffVColTechnique. Diffuse map, uses Vertex Colors.
[read-only]
static
DiffVColAddTechnique. Diffuse map, uses Vertex Colors and Alpha blending.
[read-only]
static
DiffVColAddAlphaTechnique. Diffuse map, uses Vertex Colors and Alpha and Additive blendings.
[read-only]
static
DiffVColMultiplyTechnique. Diffuse map, uses Vertex Colors and Alpha and 'multiply' blendings.
[read-only]
static
DiffVColUnlitAlphaTechnique. Diffuse map, uses Vertex Colors, Alpha blending and is not affected by any lights.
[read-only]
static
NoTextureTechnique. Solid color.
[read-only]
static
NoTextureAddTechnique. Solid color with Additive blending.
[read-only]
static
NoTextureAddAlphaTechnique. Solid color with Additive and Alpha blending.
[read-only]
static
NoTextureAlphaTechnique. Solid color with Alpha blending.
[read-only]
static
NoTextureAOTechnique. Solid color with Ambient Occlusion.
[read-only]
static
NoTextureAOAlphaTechnique. Solid color with Ambient Occlusion and Alpha blending.
[read-only]
static
NoTextureEnvCubeTechnique. Solid color with Environment map.
[read-only]
static
NoTextureEnvCubeAlphaTechnique. Solid color with Environment map and Alpha blending.
[read-only]
static
NoTextureEnvCubeAOTechnique. Solid color with Environment map and Ambient Occlusion.
[read-only]
static
NoTextureEnvCubeAOAlphaTechnique. Solid color with Environment map, Ambient Occlusion and Alpha blending.
[read-only]
static
NoTextureMultiplyTechnique. Solid color with blend mode 'multiply'.
[read-only]
static
NoTextureNormalTechnique. Solid color with Normal map.
[read-only]
static
NoTextureNormalAlphaTechnique. Solid color with Normal map and Alpha blending.
[read-only]
static
NoTextureOverlayTechnique. Solid color (overlay).
[read-only]
static
NoTextureUnlitTechnique. Solid color, not affected by any lighting.
[read-only]
static
NoTextureUnlitAlphaTechnique. Solid color with alpha, not affected by any lighting
[read-only]
static
NoTextureUnlitVColTechnique. Vertex color not affected by any lights.
[read-only]
static
NoTextureVColTechnique. Vertex color.
[read-only]
static
NoTextureVColAddTechnique. Vertex color with Additive blending.
[read-only]
static
NoTextureVColAddAlphaTechnique. Vertex color with Additive and Alpha blending.
[read-only]
static
NoTextureVColMultiplyTechnique. Vertex color with 'multiply' blending.
[read-only]
static
TerrainBlendTechnique.
[read-only]
static
VegetationDiffTechnique.
[read-only]
static
VegetationDiffUnlitTechnique.
[read-only]
static
WaterTechnique.