So I just noticed the landscape renderer crashes when the surface is >8192 pixels. Are there any technical reasons why this is nontrivial to fix?
What kind of crash? I certainly didn't build it with any sort of limitation in mind, but the graphics driver might have other ideas.
The update function updates only the first texture of a surface; but wide surfaces consist of multiple textures.
Just create a wide landscpe (e.g. 1200 pixels at map zoom 8) and run the engine. You will get an access violation in the offending update function, where it tries to access memory outside the texture range.
That one would be relatively easy to fix. I'm just wondering if there are additional, more fundamental problems with it (such as that it can only work if the whole landscape resides in a single texture).
Just create a wide landscpe (e.g. 1200 pixels at map zoom 8) and run the engine. You will get an access violation in the offending update function, where it tries to access memory outside the texture range.
That one would be relatively easy to fix. I'm just wondering if there are additional, more fundamental problems with it (such as that it can only work if the whole landscape resides in a single texture).
Well yes, the shader does some local lookups, so you can't simply tile it without special preparation. I wasn't aware that it starts tiling at 8192 - I thought I disabled that? Where is the code that causes that?
You mean the maximum texture size for your GPU?
Well, in case we really want to support bigger landscapes, we could either only keep parts of the landscape in a texture and move the covered rectangle as required - which would probably cause lag if you scrolled quickly from one side of the landscape to the other. The other alternative would be to tile it, and add a few context pixels on each side so the shader has enough information.
Well, in case we really want to support bigger landscapes, we could either only keep parts of the landscape in a texture and move the covered rectangle as required - which would probably cause lag if you scrolled quickly from one side of the landscape to the other. The other alternative would be to tile it, and add a few context pixels on each side so the shader has enough information.
8192 is OK for now I guess, but it's not that large either. I do have to modify my scenario for this :(
Large textures used to be a performance problem, as you would access large ranges of memory even when reading just a small square within the texture. I don't know whether this is still true on modern GPUs though, but it might be worth profiling this.
Also, other GPUs might have different restrictions.
Large textures used to be a performance problem, as you would access large ranges of memory even when reading just a small square within the texture. I don't know whether this is still true on modern GPUs though, but it might be worth profiling this.
Also, other GPUs might have different restrictions.
I have the same restriction (or at least the crash) on a modern gpu (gtx 580).
I don't see the need why the landscape has to be that large for what you have in mind, the player can also be forced to move in circles, or other shapes.
I don't see the need why the landscape has to be that large for what you have in mind, the player can also be forced to move in circles, or other shapes.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill