RenderTexture.Create failed: RenderTexture too big

My dearest forum…

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.

Any ideas?

~ce

I am really eager to find a solution to this, but I have no luck so far.

Is there anyway to check for the maximum RenderTexture resolution supported by the system?

~ce

Any luck on this?

Are you seeing this with Unity 3.x? It was reported as a bug under a previous version but was thought to be fixed in 3.0.

Yes i am getting this error in Unity 3.1.
Do you have any !dea how to resolve this issue?

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.

What size are you trying to generate?

Thank you dreamora for replying.

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.

Somebody help me please.

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

In case anyone runs into this in the future:

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.

1 Like

Is this done in the Build settings/asset import override/max texture size?
because by default it says “no override”

8948847--1228449--Screenshot 2023-04-14 141300.png

1 Like