You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/manual/graphics/materials/materials-for-developers.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,28 @@ This diagram shows the Material interfaces and implementation classes:
13
13
- The @'Stride.Rendering.Materials.MaterialDescriptor' is the editor-time description of the material before being compiled into a material shader.
14
14
- The @'Stride.Rendering.Material' class is the runtime material shader generated from the @'Stride.Rendering.Materials.MaterialDescriptor'
15
15
16
+
# Modifying parameters at runtime
17
+
18
+
The file @'Stride.Rendering.Materials.MaterialKeys' contains most material keys you might need to use, have a look through it to figure out which one you might need to get to modify the parameter you are interested in.
And you want to clone that material, but change its color to red at runtime.
24
+
Searching through the different keys contained in @'Stride.Rendering.Materials.MaterialKeys' you would find `MaterialKeys.DiffuseValue` and use it as the key to set the new color value you want:
If you aren't too sure which parameter keys your material uses, the best way to figure it out would be to inspect the material's variables with a debugger.
31
+
Here's an example of that through Rider's *Threads & Variables* window:
0 commit comments