I am currently testing my “game” on windows and get this exotic error:
RenderTexture.Create failed: width and height must be smaller than max Render Texture size
UnityEngine.Graphics:Internal_BlitMaterial(Texture, RenderTexture, Material, Int32)
[...]
Thankfully Unity is being specific. But where do I check for the max render texture size?
The windows machine has a GeForce 7300 GT running with DX 9.0c. Image Effects are supported. My shaders are supported.
how large is the texture? Your hardware supports up to 2048x2048 given there is enough VRAM left for it to be generated, for sure. 4096 can depend a bit on the graphics driver as old drivers used to enforce a max size close to the backbuffer size. also 4096 requires often more vram on its own than a 7300GS has at max.
Actually i am using CrossFadePro script available on UnifyCommunity and in that script there is a code which is creating Texture at runtime.
Is this issue related with the platform as I am targeting iOS but i’m getting this error in the editor.
iOS is very RAM limited, so there you can run up into such limitations rather fast (you have about 100mb at max on a non-iphone4 but 3GS+ device)
Also I’m unsure if the rendertexture create function
a) works
b) does not suffer the same memory bug the texture2d.loadimage function has
Any idea how to resolve this issue cuz i am getting stuck only at this point. I want to achieve a functionality something similar to No Human for iOS(if you have played)
I think that issue has been resolved since i am not getting an error in the editor when i changed the size of the GameScene window to iPod wide.
But now another problem has raised, now i am getting another error saying RenderTexture.Create failed.
Same here, I’m trying to create a RenderTexture in the editor so I can render a preview of a camera created by the editor that the user can move around in the scene while changing its orthoSize just so he knows how the camera will zoom in/out in the game without actually moving the real camera in the scene. I’m having the exact same error : RenderTexture.Create failed
There’s a very stupid “feature” of Unity that tries to force you to keep your textures under a size. The “max size” is (I think) the square root of the total pixels, so a 100 pixel square image = “size” 10.
Of course, anyone who works with any significant HD images is going to blow way past the default setting, so unless you have a reason to constrain the size, just set it to the maximum available to make the error go away.
Shame on Unity, once again, for letting its “features” get in the way of intelligent adult engineering.