Shader attributes preprocessing

Hi guys, I’ve been wondering for quite time if there is an option to preprocess shader variable, for example texture, in shader code. In this case i need to preprocess texture and create another texture, that shader will use as map for some calculations. Some piece of shader code that will be called just once when shader is initialized. Is there built-in option to do that in shader code, or do i need to write script to create extra input variables for shader?

Thanks in advance.

You will need to create a script for that. Probably multiple scripts as we also have it in our import setup:

  1. A component that recognizes the incoming texture and creates a filtered copy.
  2. A component that assigns additional variables when a material is assigned.

Have you looked into Command Buffers?

Not yet but from what i read now, it’s not available for android opengl