A DESCRIPTION OF THE PROBLEM :
I'm sorry if this is the wrong place to ask, but I figured it might be worth trying.
I'm currently creating a concept for a potentially infinitely scrolling map. The trivial approach would be to just calculate how many instances of this map would be visible on the screen and create new instances if necessary and render them each at their respective coordinates.
However because all instances would show the exact same content, this would for one create an unnecessary memory and performance overhead and make managing those instances unnecessarily complicated.
So I came up with a different approach (that has its own issues) that automatically deals with the wrapping.
Basically you wouldn't add the node graph you want to render into the "real" scene at all, but instead you'd create a MeshView with a mesh that is the size of the screen (updated when the screen size changes of course), so that any texture this mesh will be given is streched over the whole screen.
But here's the catch: Whenever the node graph we use to render the actual content of the map gets updated, we do a snapshot of the graph, and use the resulting image as texture for our mesh plane.
Whenever the user now scrolls all we need to do is to update the UV coordinates of the Mesh, and the graphics card will do the automatic wrapping of the texture for us.
This makes this thing far less complex and scales well with even 8k screens, but depending on the update frequency of the map, this might not be responsive enough (haven't actually tried it out so far, but currently I'm only creating the concept).
So here's the other idea I had:
Before actually trying the approach above, I was hoping to find an effect that would do this for me. Unfortunately there doesn't seem to be an effect that does exactly that, even if in theory it would be so simple to implement:
From my limited understanding Effects are basically shaders, so in my understanding all that would be required for this is a pixel-/fragmentshader that uses the pixel of itself modulo a user defined width/height and the whole wrapping thing would work out of the box.
I'm not sure how well this works in combination with transforms, but ideally you'd still be able to apply translations and scaling to the node without having to update the effect separately.
TL;DR: I'm basically asking for an effect that copies a given area from a node and replicates it to fill the rest of the node like a texture. I know that this is a pretty niche request and I would code it myself if Effects were actually extensible public API, but they are not so that's why I'm posting here.
Of course maybe I missed something and there's actually a way to achieve this by combining multiple effects or something, but I'd really like to hear your thoughts on this one.
I'm sorry if this is the wrong place to ask, but I figured it might be worth trying.
I'm currently creating a concept for a potentially infinitely scrolling map. The trivial approach would be to just calculate how many instances of this map would be visible on the screen and create new instances if necessary and render them each at their respective coordinates.
However because all instances would show the exact same content, this would for one create an unnecessary memory and performance overhead and make managing those instances unnecessarily complicated.
So I came up with a different approach (that has its own issues) that automatically deals with the wrapping.
Basically you wouldn't add the node graph you want to render into the "real" scene at all, but instead you'd create a MeshView with a mesh that is the size of the screen (updated when the screen size changes of course), so that any texture this mesh will be given is streched over the whole screen.
But here's the catch: Whenever the node graph we use to render the actual content of the map gets updated, we do a snapshot of the graph, and use the resulting image as texture for our mesh plane.
Whenever the user now scrolls all we need to do is to update the UV coordinates of the Mesh, and the graphics card will do the automatic wrapping of the texture for us.
This makes this thing far less complex and scales well with even 8k screens, but depending on the update frequency of the map, this might not be responsive enough (haven't actually tried it out so far, but currently I'm only creating the concept).
So here's the other idea I had:
Before actually trying the approach above, I was hoping to find an effect that would do this for me. Unfortunately there doesn't seem to be an effect that does exactly that, even if in theory it would be so simple to implement:
From my limited understanding Effects are basically shaders, so in my understanding all that would be required for this is a pixel-/fragmentshader that uses the pixel of itself modulo a user defined width/height and the whole wrapping thing would work out of the box.
I'm not sure how well this works in combination with transforms, but ideally you'd still be able to apply translations and scaling to the node without having to update the effect separately.
TL;DR: I'm basically asking for an effect that copies a given area from a node and replicates it to fill the rest of the node like a texture. I know that this is a pretty niche request and I would code it myself if Effects were actually extensible public API, but they are not so that's why I'm posting here.
Of course maybe I missed something and there's actually a way to achieve this by combining multiple effects or something, but I'd really like to hear your thoughts on this one.