SetGlobalBuffer
Sets a global buffer property for all shaders.
Read time 2 minutesLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
SetGlobalBuffer(string, ComputeBuffer)
Sets a global buffer property for all shaders.
public static void SetGlobalBuffer(string name, ComputeBuffer value)
Parameters
Remarks
Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in Properties block).
Additional Resources: Shader.SetGlobalTexture, ComputeBuffer class, GraphicsBuffer class, ShaderLab documentation.
SetGlobalBuffer(int, ComputeBuffer)
Sets a global buffer property for all shaders.
public static void SetGlobalBuffer(int nameID, ComputeBuffer value)
Parameters
Remarks
Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in Properties block).
Additional Resources: Shader.SetGlobalTexture, ComputeBuffer class, GraphicsBuffer class, ShaderLab documentation.
SetGlobalBuffer(string, GraphicsBuffer)
Sets a global buffer property for all shaders.
public static void SetGlobalBuffer(string name, GraphicsBuffer value)
Parameters
Remarks
Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in Properties block).
Additional Resources: Shader.SetGlobalTexture, ComputeBuffer class, GraphicsBuffer class, ShaderLab documentation.
SetGlobalBuffer(int, GraphicsBuffer)
Sets a global buffer property for all shaders.
public static void SetGlobalBuffer(int nameID, GraphicsBuffer value)
Parameters
Remarks
Global properties are used if a shader needs them but the material does not have them defined (for example, if the shader does not expose them in Properties block).
Additional Resources: Shader.SetGlobalTexture, ComputeBuffer class, GraphicsBuffer class, ShaderLab documentation.