Skybox (and please get rid of this 10 chars min limitation for topics! ;-))
2 posters
Skybox (and please get rid of this 10 chars min limitation for topics! ;-))
You showed how to create a simple skybox in one video. Now I'd like to have one which a) doesn't write to the z-buffer, b) isn't affected by fog and c) always remains at the same position. What would be the best way to do this with SIO2?
Best,
Matt
Best,
Matt
Re: Skybox (and please get rid of this 10 chars min limitation for topics! ;-))
Create another .sio2 with your skybox then when render
1.
glDisable( GL_DEPTH_TEST );
glDepthMask( GL_FALSE );
2.
skybox->dst = 1.0f;
sio2ObjectRender( yourskybox );
glEnable( GL_DEPTH_TEST );
glDepthMask( GL_TRUE );
3.
turn on the fog
...
...
sio2ResourceCull(...);
skybox->dst = 0.0f;
sio2ResourceRender( ... );
1.
glDisable( GL_DEPTH_TEST );
glDepthMask( GL_FALSE );
2.
skybox->dst = 1.0f;
sio2ObjectRender( yourskybox );
glEnable( GL_DEPTH_TEST );
glDepthMask( GL_TRUE );
3.
turn on the fog
...
...
sio2ResourceCull(...);
skybox->dst = 0.0f;
sio2ResourceRender( ... );
Re: Skybox (and please get rid of this 10 chars min limitation for topics! ;-))
Is there any particular reason why I should use a separate SIO2 file?
Best,
Matt
Best,
Matt
Re: Skybox (and please get rid of this 10 chars min limitation for topics! ;-))
No not really... just a suggestion for a question of clarity, you can always extract your skybox handle when you load load the .sio2 and then reuse it in the same fashion described above...
Permissions in this forum:
You cannot reply to topics in this forum