文档

Unity Engine

Unity Engine

SetReplacementShader(Shader, string)

Make the camera render with shader replacement.
阅读时间1 分钟最后更新于 1 个月前

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.