Updating the lighting

Not much, I made the renderer plug-able for our shaders, add a better lighting support (see screenshots). I added a fourth Render Target. The surface type is D3DFMT_A8R8G8B8, it stores the specular intensity, specular power, and occlusion factor (not computed actually). I also tried to palletize the Material settings. I made the whole dynamic system which stores all the materials’ settings into a texture, with a look up index stored per pixel in the MRT. Everything went fine and smooth, but I dropped it because I don’t have the feeling it’s something necessary. Read many papers on subsurface scattering, ambient occlusion and parallax mapping. I had to make sure everything could fit in the current architecture! Screenshots: Deferred Shading renderer version! I like this!!! 🙂 The point light is red, has short range and a high power, the specular highlight looks great. And it’s hundred times better when you can move the camera and lights in real-time! 🙂 Standard Renderer version. The floor is a dumb square, so forget about specular lighting. The Point light (at the left) has a small range, that’s it does absolutely nothing on the floor. Screenshots of the intermediate buffers: Final Render Final without Tonemap […]

First shot of the renderer

I’ve spent too much time the last few days to make D3DX working with Irion. The library is static, and doesn’t like our custom new/delete operators. The bug is not solved yet (appears to be a problem on the Microsoft’s side), but I temporary bypassed it. Big big thank to Greeg Peeper from Microsoft for his help and support! HLSL and D3D .FX roxx It eases and speeds the work so much. I had several problems (still the mysterious D3DX bug) to compile/open a .fx file in my project, but I guess it only happens to me… So I started a new Renderer project (IrionSM3Renderer) Ripped a lot of the code from the IrionDX9Renderer one (Vertex Buffer and other D3D resources creation and maintenance). Let’s go for the Deferred Shading. 1) Created three Rendering Targets, 32bits wide each. The first is D3DFMT_A8R8G8B8 to store the albedo. The second is D3DFMT_R32F to store the pixel’s Z. The third is D3DFMT_G16R16F to store the X and Y components of the pixel’s normal. I think I’ll need a fourth one later to add material properties. 2) Program the following rendering passes: • Rendering into the MRTs. Nothing complex, except a little detail I […]

SM3 Renderer

Ok, I have my new GeForce 6800 GT, the latest beta of the DirectX 9.0c SDK, the latest beta of nVidia’s drivers (SM3 enabled). Let’s start! I read many papers, watched some samples, I’m getting back in the 3D programming slowly as I spent the past month working on 3D Editor and game logic. Few words come to my mind: Perspective Shadow Mapping, Parallax Mapping, Ambient Occlusion, HDR, and Deferred Shading. The most critical part of the brainstorming was: should I go for the Deferred Shading? I mean the whole technique is really appealing: • It’s suited for hardware like the R300 and NV40 (good precision, Multiple Rendering Targets). • Come on, true per-pixel lighting! • Distinct stages for the rending process: albedo computation/MRT setup, lighting, post process (HDR, Blur, Fog, Glow …), which means high plugability! • Perspective Shadow Mapping should work nicely with. • It should only get better and faster on next hardware. But: • Hum…transparency? How? Where? • Antialising…not so much, but we can walk round this. • Can’t use complex Materials such as the ones for SH lighting. • High pixel power is needed, can this technique run a great game scene at a suitable […]