playMaker

Author Topic: Set Global Shader Variable Actions  (Read 1823 times)

nuFF3

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 74
  • Are we even real?
    • One Month Studio
Set Global Shader Variable Actions
« on: May 27, 2020, 11:09:54 AM »
Since there's no actions for setting global shader variables, I decided to make my own.
These are essentially edited versions of 'Set Material Float', 'Set Material Color' and 'Set Material Vector4', with some redundancies removed.
I removed the requirement for a 'Mesh Render' component, being able to target a different gameobject, and setting material id.
We won't need to set a specific gameobjects since it targets a material and its shader. All we need to to is specify the material.
My actions are called:
  • 'Set Shader Global Float'
  • 'Set Shader Global Color'
  • 'Set Shader Global Vector4'

Feel free to download them in the attachments below, and to add them to the Ecosystem if needed.

These actions are not intended to replace the use of 'Set Material X', these are intended for the use where 'Shader.SetGlobalFloat', 'Shader.SetGlobalColor', ect, should be applied.
« Last Edit: May 27, 2020, 11:11:30 AM by nuFF3 »

magarikado

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Set Global Shader Variable Actions
« Reply #1 on: September 19, 2021, 11:06:13 AM »
Thank you sooooooooooo much you saved my world