---
title: "How do materials and shaders work in graphics programming?"
description: "I stumbled upon a few videos about shaders and materials from The Cherno and my understanding is that materials are this sort of input that a shader takes to calculate an output instead of hard..."
url: https://extraproxies.com/how-do-materials-and-shaders-work-in-graphics-programming
date: 2024-02-13
modified: 2024-02-13
author: "ExtraProxies"
categories: ["Proxy Games"]
tags: ["graphics", "materials", "programming", "shaders", "work"]
type: post
lang: en
---

# How do materials and shaders work in graphics programming?

I stumbled upon a few videos about shaders and materials from The Cherno and my understanding is that materials are this sort of input that a shader takes to calculate an output instead of hard coding values into the shader so basically shaders become more flexible since you can control what their output is with a material.

I’m not sure if this is 100% accurate, but it makes sense so if this is true would you have multiple types of materials for different shaders? For example, shadows I believe require at least a shadow and depth shader so would I have a shadow material? Same for skinning/skeleton animations or are materials only for controlling how an object reacts to light?
