🔩
Mod Developer
DeveloperModder
  • 👋Welcome!
  • Support
    • Dashboard
    • 📄Dictionary
    • 📘Glossary
      • ▫️Files
        • ▫️Assets
          • ▫️Appendix
        • ▫️Red4 Shaders
          • ▫️Definitions
          • ▫️Descriptions
      • ▫️In-Game Objects
        • ▫️Building
        • ▫️Character
          • ▫️Hair
        • ▫️Clothes
          • ▫️Variants
        • ▫️Environment
        • ▫️Vehicle
          • ▫️Assests
            • ▫️Appearance Mapping
          • ▫️TweakDB
        • ▫️Weapon
    • 🐣Getting Started
      • ▫️1. Setup
      • ▫️2. Download
      • ▫️3. Configure
    • 👪Community Links
    • 🔨Troubleshooting
      • ❔FAQ
      • ❗Problems
  • Documentation
    • Dashboard
    • Generalized guidees
      • Replace a player item with an NPC item
      • Mesh editing
      • Remove an Animation (and Potentially Replace It)
      • Change Position and Rotation of an entMeshComponent
      • PagEdit Voiceover and Subtitles In a Quest
      • Recoloring items
      • Creating new items (adding to the game)
    • 🎨Graphical Editors
      • 🦮General Guides
      • 📄General References
      • ▫️Adobe Substance
      • ▫️Autodesk Maya
      • ▫️Blender
      • ▫️Gimp
      • ▫️Krita
      • ▫️Photoshop
    • 🧑‍💻Modding Tools
      • ▫️Cyberpunk Engine Tweaks
        • 🦮Guides
          • ▫️Installing
            • ▫️Troubleshooting
            • ▫️Proton
          • ▫️Usage
          • ▫️Scripts
          • VS Code
        • 📄Reference Sheets
          • ▫️Config File
          • ▫️Font & font size
          • ▫️Uninstalling
          • ▫️UI Examples
      • ▫️MLSETUP Builder
        • 🦮Guides
        • 📄Reference Sheets
      • ▫️REDmod
        • 🦮Guides
        • 📄Reference Sheets
          • ▫️Commands
            • ▫️Deploy
            • ▫️Import
          • ▫️Usage
          • ▫️Structure
      • ▫️Redscript
        • 🦮Guides
          • Get Started
            • Download
            • REDscript in 2 minutes
        • 📄Reference Sheets
          • Language Features
            • Intrinsics
            • String formatting
            • Loops
      • ▫️Red4ext
        • 🦮Guides
          • ▫️Get Started
            • Installing RED4ext
            • Installing a Plugin
            • Configuration
            • Uninstalling
          • ▫️Creating a Plugin
          • ▫️Creating a Custom Native Class
            • Adding a Native Function
        • 📄Reference Sheets
      • ▫️TweakDB
        • ▫️TweakXL
          • 📄Reference Sheets
        • ▫️ArchiveXL
          • 📄Reference Sheets
        • 🦮Guides
      • ▫️WolvenKit
        • 🦮Guides
          • ▫️Getting Started
            • ▫️Download
            • ▫️Setup
            • ▫️Install
            • ▫️Uninstall
            • ▫️Create a mod
          • ▫️Custom Photo Mode Expressions
        • 📄Reference Sheets
          • ▫️Overview
          • ▫️Editor
            • ▫️Project Explorer
            • ▫️Properties
            • ▫️Asset Browser
          • ▫️Release Notes
      • ▫️WolvenKit.CLI
        • 🦮Guides
        • 📄Reference Sheets
    • ⚙️Utilities
      • ▫️010 Editor
        • 🦮Guides
        • 📄Reference Sheets
      • ▫️3DS
        • 🦮Guides
        • 📄Reference Sheets
      • ▫️Deep Asset Discovery
        • 🦮Guides
        • 📄Reference Sheets
      • ▫️Noesis
        • 🦮Guides
        • 📄Reference Sheets
      • ▫️Notepad++
        • 🦮Guides
        • 📄Reference Sheets
      • ▫️PixelRick's Save Editor
        • 🦮Guides
        • 📄Reference Sheets
  • Collaboration
    • Dashboard
    • 🤝Get Involved
      • Needed Documentation
      • Wanted Ads
    • 📅Meetings
Powered by GitBook
On this page
  • What are shaders?
  • What are materials?
  • The Daisy Chain
  1. Support
  2. Glossary
  3. Files

Red4 Shaders

RED4 shaders (mt)

What are shaders?

Every visual asset in REDengine uses a specific shader, designated by REDengine as MT (.mt) files. Even meshes "without a shader" are in-fact using a debug shader such as debug_coloring.mt. Shaders are the most basic expression of a surface, ranging from glass, skin, concrete, and steel. Each shader contains a combination of constant hidden-variables, and exposed variables for artists to tweak. For example, all skin exhibits some similar properties such as subsurface scattering so there is no reason to expose this; artists cannot use the skin shader without subsurface scattering. However skin color can vary dramatically, so these parameters are exposed to the artists using textures or color parameters. Artists are able to create "instances" of shaders called which contain localized variations of the textures and properties exposed by the base shader. ​

What are materials?

Materials are a specific instance of a file, to be used on a mesh or subset of meshes. Materials are contained inside mi (material instance) files or within mesh files themselves as a CMaterialInstance chunk. While internal material instance chunks can be handy to have inside the mesh, external mi files can be used for multiple meshes.

It's important to remember that materials are simply instances of shaders. The variables contained within the material only take effect when those same variables are present inside the base shader. For example, if RoughnessTexture is not present within the base shader adding this property to a material instance will have absolutely no effect.

The Daisy Chain

The mechanism behind the link between shaders and meshes can be thought of as a daisy chain. Meshes do not directly link shaders, but instead rely on a variable number of daisy chained materials. Some meshes may use a single internal material instance, which specifies a base shader. The other approach which is just as, or perhaps more common is chaining several mi files together. The benefit of doing so, is the ability to globally adjust materials for hundreds or thousands of meshes. When chaining multiple materials together, the properties of each material overwrite those that are below.

PreviousAppendixNextDefinitions

Last updated 2 years ago

📘
▫️
▫️