Skybox (and please get rid of this 10 chars min limitation for topics! ;-))

View previous topic View next topic Go down

Skybox (and please get rid of this 10 chars min limitation for topics! ;-))

Post  matt on Thu Oct 23, 2008 3:40 pm

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

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Skybox (and please get rid of this 10 chars min limitation for topics! ;-))

Post  sio2interactive on Thu Oct 23, 2008 5:07 pm

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( ... );
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Skybox (and please get rid of this 10 chars min limitation for topics! ;-))

Post  matt on Thu Oct 23, 2008 5:12 pm

Is there any particular reason why I should use a separate SIO2 file?

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Skybox (and please get rid of this 10 chars min limitation for topics! ;-))

Post  sio2interactive on Thu Oct 23, 2008 5:45 pm

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...
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Skybox (and please get rid of this 10 chars min limitation for topics! ;-))

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum