Shaders
Railroader provides several shaders for use in asset packs. These are distributed in the shared asset pack and are available to all mods. The ADK includes a copy of this pack so your materials can use them; see Shared Assets.
We strongly recommend using the provided shaders rather than URP/Lit. The provided shaders are shared across all asset packs, so using them keeps your asset pack smaller by avoiding bundling duplicate shader code. Using a common set of shaders also improves rendering performance, as shared shaders batch more efficiently. Finally, the provided shaders are tuned for Railroader’s visual style, for a consistent appearance across the game.
Shader Overview
Section titled “Shader Overview”| Shader | Use Case |
|---|---|
| Standard Car Shader | Rolling stock (cars, locomotives) |
| Standard Environment Shader | Scenery and structures |
| Standard Shader | Simple objects without wear or UV1 features |
| Aggregate Shader Stochastic | Ground/ballast with stochastic tiling |
The Car, Environment, and Standard shaders are each available in Metallic and Specular variants. The metallic workflow is recommended for new content.
Texture Import Settings
Section titled “Texture Import Settings”| Texture | sRGB | Import Type |
|---|---|---|
| MainTex / BaseMap | Yes | Default |
| Normal Map | No | Normal map |
| MetallicGlossMap | No | Default |
| Specular Map | Yes | Default |
| OcclusionMap | No | Default |
Textures containing non-color data (normals, metallic, AO, smoothness) must be imported as Linear (sRGB unchecked). Base color / diffuse textures and the Specular Map use sRGB, since both hold color. The Specular Map’s alpha carries smoothness, which is unaffected — Unity never applies the sRGB curve to an alpha channel.
For how to produce these maps out of Substance 3D Painter with the right channels in the right places, see Texturing Workflow.
Car Shaders
Section titled “Car Shaders”The car shaders are the simplest option for rolling stock. At runtime, Railroader replaces these shaders with builtin versions and applies wear automatically based on car condition. You do not need to configure wear properties on car materials.
Standard Car Shader Metallic
Section titled “Standard Car Shader Metallic”| Texture | Channel Mapping |
|---|---|
| MainTex | RGB = Base color |
| Normal Map | Tangent-space normal |
| MetallicGlossMap | R = Metallic, G = Ambient occlusion, A = Smoothness |
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
| Base Color | Color | — | Tint multiplied with MainTex |
| Smoothness | Float | 0.92 | Multiplied with MetallicGlossMap alpha |
Standard Car Shader Specular
Section titled “Standard Car Shader Specular”| Texture | Channel Mapping |
|---|---|
| MainTex | RGB = Base color |
| Normal Map | Tangent-space normal |
| Specular Map | RGB = Specular color, A = Smoothness |
| OcclusionMap | G = Ambient occlusion |
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
| Base Color | Color | — | Tint multiplied with MainTex |
| Smoothness | Float | 0.92 | Multiplied with Specular Map alpha |
Environment Shaders
Section titled “Environment Shaders”The environment shaders add weathering and color variation features for scenery and structures. They are more expensive than the car or standard shaders due to additional texture samples.
Common Environment Features
Section titled “Common Environment Features”Both environment shader variants share these features on top of the base PBR inputs:
Wear System: Applies a weathering/aging effect using a triplanar-projected noise texture. The wear intensity is controlled by the Wear property (0 = pristine, 1 = full wear).
Noise Color Pattern: Adds subtle per-object color variation using object-space position to sample a noise texture, mapped through a gradient. This prevents identical objects from looking like copies.
UV1 System: Uses the secondary UV channel (UV1) to blend a tint color and modify ambient occlusion. Controlled by influence properties (default 0 = disabled).
Standard Environment Metallic
Section titled “Standard Environment Metallic”| Texture | Channel Mapping |
|---|---|
| MainTex | RGB = Base color |
| Normal Map | Tangent-space normal |
| MetallicGlossMap | R = Metallic, G = Ambient occlusion, A = Smoothness |
| WearNoise | R = Wear pattern (triplanar sampled) |
| Noise texture | R = Color variation pattern (embedded, not a property) |
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
| Base Color | Color | — | Tint multiplied with MainTex |
| Smoothness | Float | 0.92 | Multiplied with MetallicGlossMap alpha |
| Tiling | Vector | — | UV tiling for all texture samples |
| Offset | Vector | — | UV offset for all texture samples |
| Wear | Float | 1 | Wear intensity (0 = none, 1 = full) |
| WearNoise | Texture2D | — | Noise texture for wear pattern |
| WearColor | Color | — | Color of worn areas |
| WearNoiseEdge1 | Float | 0.4 | Smoothstep lower edge for wear pattern |
| WearNoiseEdge2 | Float | 0.6 | Smoothstep upper edge for wear pattern |
| WearTile | Float | 0.04 | Triplanar tiling scale for wear noise |
| WearOcclusionInfluence | Float | 1 | How much wear darkens ambient occlusion |
| UV1DiffuseColor | Color | — | Tint color applied via UV1 |
| UV1DiffuseInfluence | Float | 0 | Strength of UV1 diffuse tint (0 = disabled) |
| UV1AOInfluence | Float | 0 | Strength of UV1 ambient occlusion blend (0 = disabled) |
| UV1Sharpness | Float | 0.5 | Sharpness of UV1 edge detection |
Standard Environment Specular
Section titled “Standard Environment Specular”| Texture | Channel Mapping |
|---|---|
| MainTex | RGB = Base color |
| Normal Map | Tangent-space normal |
| Specular Map | RGB = Specular color, A = Smoothness |
| OcclusionMap | G = Ambient occlusion |
| WearNoise | R = Wear pattern (triplanar sampled) |
| Noise texture | R = Color variation pattern (embedded, not a property) |
Properties: Same as Environment Metallic above, except uses Specular Map and OcclusionMap instead of MetallicGlossMap.
Standard Shaders
Section titled “Standard Shaders”The standard shaders are simple PBR shaders with no wear, noise, or UV1 features. Use these for objects that don’t need weathering effects.
Standard Metallic Shader
Section titled “Standard Metallic Shader”| Texture | Channel Mapping |
|---|---|
| MainTex | RGB = Base color |
| Normal Map | Tangent-space normal |
| Metallic Gloss Map | R = Metallic, G = Ambient occlusion, A = Smoothness |
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
| Base Color | Color | — | Tint multiplied with MainTex |
| Glossiness | Float | 0.9 | Multiplied with Metallic Gloss Map alpha |
Standard Specular Shader
Section titled “Standard Specular Shader”| Texture | Channel Mapping |
|---|---|
| MainTex | RGB = Base color |
| Normal Map | Tangent-space normal |
| Specular Map | RGB = Specular color, A = Smoothness |
| OcclusionMap | G = Ambient occlusion |
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
| Base Color | Color | — | Tint multiplied with MainTex |
| Spec Color | Color | — | Tint multiplied with Specular Map RGB |
| Smoothness | Float | 0.92 | Multiplied with Specular Map alpha |
| Tiling | Vector | — | UV tiling for all texture samples |
| Offset | Vector | — | UV offset for all texture samples |
Aggregate Shader Stochastic
Section titled “Aggregate Shader Stochastic”A specialized shader for ground surfaces (ballast, gravel, dirt) that uses stochastic texture sampling to break up visible tiling patterns.
Textures:
| Texture | Channel Mapping |
|---|---|
| BaseMap | RGB = Base color |
| MetallicGlossMap | R = Metallic, A = Smoothness |
| BumpMap | Normal map |
| OcclusionMap | R = Ambient occlusion |
| Height | Height map (stochastic blend weights) |
Properties:
| Property | Type | Default | Description |
|---|---|---|---|
| Color | Color | — | Base color tint |
| Tiling | Vector | (1, 3.24) | UV tiling |
| NormalLevel | Float | 1 | Normal map strength |
| StochasticContrast | Float | 0.15 | Contrast for stochastic blending (0.01–0.99) |
| StochasticScale | Float | 1 | Scale of stochastic pattern (0–2) |
Texture Channel Packing Summary
Section titled “Texture Channel Packing Summary”Quick reference for how each shader packs data into texture channels.
Normal maps must be in Unity/OpenGL/Y+ format. More information here.
Metallic Workflow Shaders
Section titled “Metallic Workflow Shaders”| Channel | MetallicGlossMap |
|---|---|
| R | Metallic |
| G | AO |
| B | — |
| A | Smoothness |
Specular Workflow Shaders
Section titled “Specular Workflow Shaders”| Channel | Specular Map | OcclusionMap |
|---|---|---|
| R | Specular color | — |
| G | Specular color | AO |
| B | Specular color | — |
| A | Smoothness | — |
© 2026 Giraffe Lab LLC. All rights reserved.