FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

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

2 posters

Go down

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

Post  matt 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

http://elfrun.net

Back to top Go down

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

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

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

http://sio2interactive.com

Back to top Go down

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

Post  matt 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

http://elfrun.net

Back to top Go down

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

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

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

http://sio2interactive.com

Back to top Go down

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

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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