Hallo,
need help.How can i set oder get shader property by rendering with RenderWithShader().I try in OnWillRenderObject() to get material,but get main material and not replacement shader.
Thanks for antworts.
1 Like
The replacement shader will get all the properties from the original material. So if original material had _MainTex texture (for example), it will be set in the replacement shader.
If you need to have some other values in your replacement shader (some that are not in the original material), best bet is to use global values (Shader.SetGlobalTexture etc.)
1 Like
Thank you,that is what i searched
Hi, is this the same with the new URP renderer feature “Render Objects” ?
If i want to grab the texture and color will it be grabbed directly if in the replacement material i add “_BaseMap” and “_BaseColor” for example ?
Thanks