SinglePass Dynamic CubeMap gen and Extended Buffers

Hi :slight_smile:
I think it would be a good idea if dynamic cube-map generation could be completed in a single pass, this could be achieved if the cube is created in world-coordinates, so you could

  1. setup the cube coordinates

  2. render the scene, letting the gpu calculate the projected vectors from the center of the cube to the scenes vertices (only a simple sub required) and with using the same currently implemented face determining formula will be able to write the texels to the correct location and face (it’s just the same as drawing a cube with vectors lookups for the texture coordinates but in reverse).

with pbuffer support (although it is a pain setting up) depth can still be stored and tested.

an added advantage could be realized by means of

glEnable(GL_WORLD_CUBE_CREATION) - mmm somthing like this

glEnable(GL_CUBE_HIDDEN_SURFACE) - reflective (would require however a glstate to hold eye coordinates)

or

glDisable(GL_CUBE_HIDDEN_SURFACE)

glBlend(GL_CUBE_HIDDEN) - could be used for refractive blends

would require glstate for refractive index to be stored however

but if GL_USER_BUFFERn was added to the pixel format (as huge video memory is available) similar to depth buffer (which could by default be GL_USER BUFFER0), could be extended to the fragment program for writing to or more conventionally in the glBegin/End pair something like

glBufferf(GL_USER_BUFFER1,val)

or for a range of buffers if pixelformat excepted GL_USER_BUFFER1= rgb8,rgb16 or r32 etc (creating 1->n buffers)

glBuffer3f(GL_USER_BUFFER1 (base buffer),a,b,c) writes to buffers 1->3

this would greatly increase gl flexibility for programmers, ie you could store the refracted index while the scene is being drawn or suchlike.

their are a few more advantages to world cube creation, one being any stationary static objects do not require transformation, there is also no need for a projection matrix, only model and texture possibly required, and as only one pass is required, fps is automatically increased.

few exhausted

seasons greets

dasraiser

You’re too late :slight_smile:

http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=7;t=000513

hi

your right (i didnt search as i found this search engine painfull), doh but i didnt see the solution i presented, just simply using the cube to vertex ray for the cube look up using its existing hardware face selector, quite a simple method with out any culling/projection requirements

regards

Originally posted by dasraiser:
[b]

[…] just simply using the cube to vertex ray for the cube look up using its existing hardware face selector, quite a simple method with out any culling/projection requirements

[/b]
Uhm, having the ability to look up an arbitary cubemap texel doesn’t necessarily mean that you’re able to write into arbitary texels. However, I agree that such functionality would make things alot easier, and even if I don’t know whether a highly parallelized solution with projection & stuff or just writing into the cubemap would be better (in the long run, we’d need both, thinking about geometry programs and some image based techniques) I hope we get it soon :slight_smile:

Regards