- Home /
Question by
DevilZ1976 · Feb 25, 2019 at 09:16 AM ·
shaderstexture2dclipping
Texture2D shader clips texture when moving away
Hey ya'll,
This happens when camera moving away. And the further camera is the less of texture is visible. So my question would be how to fix this? My shader code is very basic. You can view it here (first code example) Material is added on 3d Mesh
Also from time to time I get this error:
Error assigning texarray texture to 2D texture property '_MainTex': Dimensions must match
Where _MainTex is 2DArray type in shader.
I couldn't find any answer or similar problems.
Thanks for any help.
capture.png
(37.4 kB)
Comment
Best Answer
Answer by DevilZ1976 · Feb 25, 2019 at 09:36 AM
In case anyone has similar problem here is the solution that worked for me: When you create text2Array asset in your method initialize it using this:
text2Arr = new Texture2DArray(texList[0].width, texList[0].height, texList.Count, texList[0].format, false, true);
My fail was that I used true, true in the last arguments where mipChain argument was supposed to be false.
Here lies my wasted days of productivity. RIP.