Friday, August 28, 2009

the simple cuda test

The refactoring and rewriting of luxinia's internals goes on, prior open sourcing the full project (cleaning up code and trying to apply some of what was learned). On the side to have some fun, further dx10 features (ogl equivalents) are added. So more of GL's bufferobjects features are made accessible on the Lua side.
A result was a small sample of coding up a lua extension dll, which runs a cuda kernel on a vertexbuffer. I never played with Cuda before, and kinda missed the built-in vector types of Cg, ie that float3*flaot must be done via operator overloading in cuda... means the compiler has to do vectorizing himself (but he can, compared to Cg). I've modified the simpleGL nvidia sample to make use of custom vertex color attribute. It's really nice that cuda supports the datatypes, transform feedback wouldnt allow you to store back to smaller datatypes.
Next comes up adding transform feedback, so that you can specify output streams in a shaderpass and streamobject will be a resource like a texture, assignable to material instances. First will only do for nvidia profiles. I still use Cg runtime quite a bit, so doing it for their GLSL profiles is a bit ugly at the moment. Not sure yet if I stick to Cg runtime, or just use it for compilation and do parameter and program creation all myself, would be a bit "what you want is what you get", but also more work now.

Tuesday, August 11, 2009

the new siggraph stuff

just looking at the various stuff coming from siggraph (check Atom blog for some onsite info)

light propagation (first bounce GI) in CryEngine3

And more links from siggraph at beyond3d and another interesting slides by Epic's Tim Sweeney

on a side-note, I did not go for the GC in C, but use a more simple refcounter similar to boost's shared/weak pointers with a dedicated allocator.

Saturday, August 8, 2009

the idtech5 virtual texturing

just saw this on gamedev, some slides about the virtual texturing in idtech5 (Rage).
Other recent things I stumbled upon were of course the OpenGL 3.2 specs (yeah they finally get some momentum and turned "compatibility" into a profile, not that ugly giant extension). I am currently looking into C hashing libs and a garbagecollector for C. Reason is I want to better split the luxinia GC system from Lua, so that we can move on to using SWIG, ie providing a proper C api (and not just the Lua binding) but keep the reference system working. Smart pointers are not an option as it's too much of an issue to prevent cycles and in general I want to keep the core engine Ansi C.