Hi all,
I create some RenderTextures and Materials on runtime (using Kinect) and have a CommandBuffer on the camera which updates some intermediate RenderTextures using new Kinect input per-frame.
I’m using several CommandBuffer.Blits with the Materials I mention above in the CommandBuffer to achieve that. Some ops don’t use _MainTex so they have src null. Bindings to RTs or Tex2Ds are mostly set up prior to CommandBuffer construction.
I also have an Editor script which exposes all RTs and Materials so that I can mess with the tilings, offsets and other shader properties on runtime.
Problem is in Unity 5.4.3 all the above worked. I could also mess with material properties on runtime and see instant results to RenderTexture previews. I still had a problem with applying changes of _MainTex_ST property, but I used a different float4 to achieve that.
Now upgraded to 5.6.2 and none of Unity’s Tiling/Offsets work. Basically, the only TRANSFORM_TEX calls that do work are the ones using a regular float4 instead of a <texture_name>_ST.
By the way, if I try to mess with the material’s own Inspector instead from the custom editor script, I see changes to the preview but they don’t affect the Blits to the RenderTextures.
Is this a MaterialEditor Inspector problem? A Shader problem? A CommandBuffer problem? All the above?!
Ideas?
PS : When I say the only TRANSFORM_TEX calls are the ones where I use a regular float, I mean I’ve provided my own version of the macro where instead of the tex name, I give the float4 directly as input.