Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetReplacementShader(Shader, string)

Make the camera render with shader replacement.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public void SetReplacementShader(Shader shader, string replacementTag)

Parameters

shader


replacementTag

Remarks

See Rendering with Replaced Shaders page for details.
If the replacementTag argument is not in use, pass an empty string as the value.
After calling this function, camera will render its view with shader replacement. Call Camera.ResetReplacementShader to reset it back to normal rendering.