Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save openroomxyz/dd9ba466d7426bbb13d456d0769dac14 to your computer and use it in GitHub Desktop.
Save openroomxyz/dd9ba466d7426bbb13d456d0769dac14 to your computer and use it in GitHub Desktop.
Unity : How to set render texture as texture pragmatically (classic render pipeline ) ?
//Make sure to enable the Keywords (You may not need todo this in a loop)
rend.material.EnableKeyword("_NORMALMAP");
rend.material.EnableKeyword("_METALLICGLOSSMAP");
//After that you can use this
rend.material.SetTexture("_MainTex", result_render_texture);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment