Render to cubemaps demo

Blitz3D Forums/Blitz3D Userlibs/Render to cubemaps demo

Tom(Posted 2006) [#1]
www.tomspeed.com/render_to_cubemap.zip

w,s,a,d & mouse to move about, hold space to use renderable method, 1&2 to change texture size.

I'm getting noticable speed increases when using 256/512 res textures. (255 fps > 370fps @ 512x512)

Where you would normaly do this when updating each cubemap face:
SetCubeFace tex,0
RotateEntity cam,0,90,0
RenderWorld
CopyRect 0,0,size,size,0,0,BackBuffer(),TextureBuffer(t)


You can now do this:
SetCubemapRenderTarget(tex,0)
RotateEntity cam,0,90,0
RenderWorld


I'll up a new DLL tomorrow after I put in some 'sanity checks' as Mark calls them :)


Zmatrix(Posted 2006) [#2]
wow.
even on this system with crappy onboard vid.
22 up to 37 (over 30%)

good one Tom :)

Sam


Mustang(Posted 2006) [#3]
Goodies just keep coming this morning! Soon I will run out of clean pants... ok, tried this with my laptop, fps was around ten 10 with every resolution. Got garbled ball when I decreased the resolution with "1", but rendering it with "space" got the ball looking normal again. Should this happen? It might just be me integrated crap that's causing it.


Bobysait(Posted 2006) [#4]
my pc crashed using 16*16 texture size ... don't know if it's due to the program or anything else, but, lat time my pc crashed was about next year ... hazardious ?
=> got blue screen ( bsod ) that mentioned page fault in area ... etc... generally, it happen when a bad entry comes into graphics memory.


OJay(Posted 2006) [#5]
i dont get THAT speed boosts (~10%, 145=>160), but what is a big advantage is, is that your cubemaps can be larger than your actual screen resolution!


t3K|Mac(Posted 2006) [#6]
tom, could you make a complete version of your dx7.dll? where all this fancy stuff runs with (anisotropical filtering + render 2 texture + render to cubemap + dds read/writepixel + what else to come ;-) )
with the newer dll versions my old anisotropical filtering gives me an error in the editor...


MCP(Posted 2006) [#7]
great work tom - do you think we could get 3d lines and pixels?


markcw(Posted 2006) [#8]
i get increases of around 10 fps when pressing space at 256/512 texture size, doesn't look like it works at 1024.
ati radeon ve/win98se/dx8.1


Tom(Posted 2006) [#9]
3d pixels? :)


MCP(Posted 2006) [#10]
3d points then!! hehe


AdsAdamJ(Posted 2006) [#11]
I was really impressed with the demo for this, but is it ever going to be released?


bytecode77(Posted 2006) [#12]
how about publishing the entire code?


t3K|Mac(Posted 2006) [#13]
tom, could you please give us the code for working anisotropical filtering? with the new lib the old filtering code wont run anymore. i get a "moo" at:

If Not SetSystemProperties(d3d,dev7,draw7,hwnd,instance) Then TextureFilter "",9:anistropicallowed=0:RuntimeError "moo"


with the older version of your lib this worked fine.


bytecode77(Posted 2006) [#14]
you have to initialize the latest lib.
see my shadow system in my signature.
initshadows() should explain how to init the dx7 lib!
cya