You are not logged in.
Pages: 1
I was browsing through the source code, and found a way to mess with the order in which things are rendered, but this seems out of my grasp:
would it be hard to make an object be rendered in between the background layers? maybe with a special "background_object" property, which would tell the engine that the object should be rendered in the same pass as the bg, and not the one where normally bricks and objects coexist.
before the question comes up, a zindex of 0 still renders the object over a bg layer.
usage scenario: dynamic clouds and weather, using alpha blended stuff on background, etc
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
I was browsing through the source code, and found a way to mess with the order in which things are rendered, but this seems out of my grasp:
would it be hard to make an object be rendered in between the background layers? maybe with a special "background_object" property, which would tell the engine that the object should be rendered in the same pass as the bg, and not the one where normally bricks and objects coexist.
before the question comes up, a zindex of 0 still renders the object over a bg layer.
usage scenario: dynamic clouds and weather, using alpha blended stuff on background, etc
in your scenario, i think it's much easier to create objects that behave like dynamic clouds and so on... but let's examine the rendering system:
the pass is like this, in the code (see src/scenes/level.c):
1. render background => 2. render entities => 3. render water => 4. render foreground => 5. render hud
each bg entry having zindex <= 0.5 is rendered at first step
regular objects, with zindex <= 1 are rendered at second step
bg entries having zindex > 0.5 are rendered at step 4
objects width zindex > 1 are huds, being rendered at step 5
Offline
each bg entry having zindex <= 0.5 is rendered at first step
regular objects, with zindex <= 1 are rendered at second step
my question is, how to render an object, for example, between two background layers? like this:
bg layer Z=0.3
object Z=0.4
bg layer Z=0.5
as of now, it looks impossible without changing the source code.
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
The most logical thing would be to have a negative Z index to affect the bg. -0.1 - -1.
Offline
hmm, not really possible without changing the source
Offline
Pages: 1