I have a question related to the Single Pass Instanced mode and setting material texture properties.
I have a property in a shader defined like this:
_OverlayTex (“Overlay (RGB)”, 2D) = “black” {}
The uniform itself is defined properly as
UNITY_DECLARE_SCREENSPACE_TEXTURE(_OverlayTex);
However when going into play mode, I got a console error:
“Error assigning 2D texture to texarray texture property ‘_OverlayTex’: Dimensions must match”
It works fine though and if I remove the property declaration (and keep just the uniform), the console error goes away as well. However we prefer to declare the property otherwise Unity loses the reference and the effect when the script gets initialized do not look properly in Editor.
btw, regarding Single Pass Instanced rendering, I have noticed that simple Blit operations between TwoEye flagged render textures do not honour this setting:
RenderTexture rt1, rt2; // both are TwoEye flagged
Graphics.Blit (r1, rt2); // <-- do not work
But using a simple vertex/frag shader that uses the appropriate macros for instancing and sampling texture works.
Shader error in …: Unexpected token ‘;’. Expected one of: typedef const void inline uniform nointerpolation extern shared static volatile row_major column_major struct or a user-defined type at line 40
Hi, I’m running into the same issue as @jjxtra using an asset from the Asset Store, Aquas Lite. The shaders that provide this error are AQUAS-Lite_Frontface.shader and AQUAS-Lite_Backface.shader. The shaders use UNITY_DECLARE_SCREENSPACE_TEXTURE without a semicolon, which also provides an error. Adding the semicolon gives the same error as @jjxtra . I’m running Unity 2022.3.20f1.