Hi everyone !
So in my project I have a custom renderer feature that in a custom pass use a material to create a texture, that texture represent a mask but actually whatever the texture represent is not very important, the thing is that my mask will change at runtime, this is controlled in my shader by a float property, is this float changed, my mask changes too !
Of course if I put my material inside a renderer and set the float property in my script, it works, not surprised here, but when I reference my material used in my custom pass, it seems that Material.SetFloat does nothing and I guess you can replace SetFloat by whatever method that set a property in the mat it will not work
DrawingSettings drawSettings = RenderingUtils.CreateDrawingSettings(
_shaderTagIdList,
universalRenderingData,
cameraData,
lightData,
sortFlags
);
_material.SetFloat("_CurrenColumn", 1); // this is not working
drawSettings.overrideMaterial = _material;
here is a showcase video of what happen in editor
here is in the video I toggle on/off the renderer feature, you can see that my renderer with the material get updated as excepted (script running in editor that does both the renderer.material.SetFloat and render pass material’s SetFloat) but the mask generated by the render pass is not
Do you know how we can change the material properties of the material that we pass to DrawSettings for the command buffer DrawRendererList method ???
Thanks in advance !