reckfellENGINE

Materials and Shader Graph

VisualShader, surface outputs and post-processing materials.

On this page

Material, shader and graph

A material defines surface parameters. ShaderMaterial uses a text Shader or visual VisualShader. Shader Graph builds shaders, not gameplay logic; use SharpGraph or C# for object behavior.

Choose the purpose before building the graph: a 3D surface, Canvas or a custom post-processing effect. Outputs and available data differ. Post-processing profiles affect camera images, while an ordinary material affects an object.

Assign a surface graph

  1. Select a MeshInstance3D with visible geometry.
  2. Create a ShaderMaterial in the intended material slot and assign a VisualShader.
  3. Open the shader resource. Use the Fragment stage for surface color, rather than Vertex.
  4. Connect a color constant to the output block's Albedo. Supply roughness separately.
  5. Check that the material is assigned to the surface visible to the camera.
  6. Save the shader and material inside the project, then inspect the object in the game.

An unconnected block does not affect the final material. Port-type or compilation errors can prevent the intended shader variant from building; begin with one valid output.

Surface parameters

InputMeaning
AlbedoBase surface color
MetallicMetallic material response
RoughnessSpecular highlight width and character
NormalDirection used for lighting
EmissionSurface emission

Albedo textures contain color. Normal maps contain directions and need the corresponding import settings. Roughness/metallic masks should not automatically be interpreted as color photographs. Check UVs and model scale before trying to fix stretched textures inside the shader.

Emission can produce bright pixels and bloom when enabled, but does not guarantee illumination of nearby objects: light transport depends on GI.

Compare a text shader

A minimal text material with the same main parameters:

Shader
shader_type spatial;

void fragment() {
    ALBEDO = vec3(0.18, 0.32, 0.40);
    METALLIC = 0.2;
    ROUGHNESS = 0.65;
}

Save it as .rshader and assign it to a ShaderMaterial. This is an alternative resource, not a promise of arbitrary text-to-graph conversion.

Custom post-processing

A fullscreen effect needs camera context and an appropriate insertion stage. Before tone mapping, data may be HDR; afterward the range and interpretation differ. Depth or surface-data effects need a stage that actually supplies those inputs.

Canvas cannot assume that 3D normals, object velocities and depth always exist. Read capability warnings. For multi-pass effects, use named intermediate textures and explicit dependencies; do not read an output that has not yet been produced.

ProblemFirst check
Object is unchangedMaterial assigned to the correct surface and resource
Graph exists without a resultFragment stage, connection to Output and compilation errors
Incorrect highlightsNormal/roughness import, UVs and lighting
Different result in gameCamera, renderer, profile and insertion stage

API: VisualShader, ShaderMaterial.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.