playMaker

Author Topic: Modify a shader's parameters  (Read 1810 times)

PET

  • Full Member
  • ***
  • Posts: 139
    • GamerPET
Modify a shader's parameters
« on: August 23, 2017, 10:13:24 AM »
Hello brothers!



I have this shader let's say. It has that Dissolve Amount. I would like to "animate" that float over time. How can I do this?

Also, in general... how do i access shader parameters so I can manipulate them?

Thanks <3
Technical Game Designer
www.GamerPET.com

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Modify a shader's parameters
« Reply #1 on: August 23, 2017, 01:05:52 PM »
You are going to need to write a playmaker action custom script to access them. If you are comfortable with C#, you can check out some of my actions which access shaders. It is for textmesh pro, which has its own shaders.

You can get the actions here (look under the shaders folder) https://github.com/dumbgamedev/TextMeshPro_Playmaker

And textmesh pro the asset is free on the unity asset store. Hopefully that should give you a starting point.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Modify a shader's parameters
« Reply #2 on: August 24, 2017, 02:55:54 AM »
Hi,

I think you don't need a custom action actually, the action "Set MAterial Float" should give you access to any float properties define on a shader.

 have you tried it?

 Open the shader in a script editor to know exactly the property name related to your Dissolve Amount as you can't have typos..

Bye,

 Jean

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Modify a shader's parameters
« Reply #3 on: August 24, 2017, 10:59:10 PM »
Great, I did not know that was possible~ !