Material: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Nesciuse moved page Material/en to Material without leaving a redirect: Move en subpage to basepage)
No edit summary
Line 3: Line 3:
{{stub}}
{{stub}}
==Overview==
==Overview==
A Material is the file that the engine uses to know what to display. A material contains information about what textures to draw, how to draw them, how to treat the textures being drawn, and how it should react. Materials are different from textures, which are the actual images that are being drawn.
A Material is the file that the engine uses to tell the [[shaders]] what to display. A material contains information about what textures to draw, how to draw them, how to treat the textures being drawn, and how it should react. Materials are different from textures, which are the actual images that are being drawn.
 
Uncompiled materials are human-readable and can be created/edited with a text-editor such as [[notepad++]] or [[Third Party Tools|dedicated tools]].


Materials are the same concept in both Source and Source 2, however they are defined in different files:
Materials are the same concept in both Source and Source 2, however they are defined in different files:

Revision as of 08:46, 28 November 2025

English (en)Deutsch (de)Español (es)Français (fr)Hrvatski (hr)Português do Brasil (pt-br)Русский (ru)中文 (zh)Translate (Translate)
Not to be confused with Texture (the actual images being displayed).

Stub

This article or section is a stub. You can help by expanding it.

Overview

A Material is the file that the engine uses to tell the shaders what to display. A material contains information about what textures to draw, how to draw them, how to treat the textures being drawn, and how it should react. Materials are different from textures, which are the actual images that are being drawn.

Uncompiled materials are human-readable and can be created/edited with a text-editor such as notepad++ or dedicated tools.

Materials are the same concept in both Source and Source 2, however they are defined in different files:

GoldSrc GoldSrc does not use materials; instead, textures are used directly, and flagged either via name in a WAD or by metadata in an MDL or SPR. Information about a texture's "material" is instead stored in materials.txt and MAT files.

Warning.pngRisk of Confusion:This page is for the concept of materials in general. More information about materials in specific engines can be found on the documentation about the specific engines' material format pages.