public class Sandbox.Shader : Sandbox.Resource
A shader is a specialized and complex computer program that use world geometry, materials and textures to render graphics.
Related Guides
Broader workflow and conceptual references connected to this API.
Just like Subgraphs, you can also create your own custom Nodes with C# (and shader code) to be used in Shader Graphs.
To make a post process shader you should derive from BasePostProcess<T>. This makes it easier to make a component that will be able to blend from multiple others.
The FilmGrain component adds simulated film-style grain to the camera output. It's purely visual โ it does not affect gameplay or lighting โ and is intended to add texture, grit or stylistic noise to the final image.
Using texture sheets in shaders is made easy using the Sheet class.
Attributes are the bridge to pass information around the CPU to the GPU, like Variables, Textures or entire Buffers.
The fancy new way to do things in Vulkan / DX12 is bindless. This removes the limitations of the binding model allowing you to have access to far more textures and other resources within a shader and the ability to sample them from a dynamically provided identifier from buffers, vertex input, etc.
Methods
Showing 1 methods
public static Sandbox.Shader Load(string filename)
Load a shader by file path.
Parameters
filename: The file path to load as a shader.
Returns
The loaded shader, or null
No results match this filter.
Properties
Showing 2 properties
public virtual bool Sandbox.Shader.IsValid { get; set; }
public Sandbox.Shader.ShaderSchema Sandbox.Shader.Schema { get; set; }
Returns a schema representing the variables and combos in this shader. This is used by the material editor to show UI for editing shader parameters.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Shader |