NaN Wrote:I'd like to have soft particles(spherical billboard), multiple lights and HDR rendering(no I don't mean bloom). => I'd like to have a decent deferred renderer.
VDrift already does HDR rendering (I don't mean bloom), but it uses a very simple tonemapping that's local to the pixel. It could definitely be improved. I was looking at implementing Wolfgang Engel's light pre-pass renderer. It allows for easier antialiasing than most other types of deferred renderers. See:
http://diaryofagraphicsprogrammer.blogsp...derer.html
What sort of other light types and sources do you think we need? For night time driving there are several, but I can't really think of anything to add for daytime driving, except maybe in tunnels.
I think a better material system is needed too. Right now there are a few parameters set in the texture, but they just aren't general enough to work for many surface types (as MirceaKitsune has found).
Quote:Right now we have things like SetSmoke(), SetSkybox(). What if I have an alternative particle/skybox implementation/shader. How do I integrate it into the scene graph?
If you look at my sky rendering integration in the bullet branch. It's an ugly hack right now. I still haven't figured out how to add it to the scene graph in a clean way.
The scene graph system needs a little bit of work, but it's a pretty good base. Here's how integrating something like your dynamic skybox would work:
* load your new shader in GRAPHICS_SDLGL::EnableShaders
* add a new shader type in the GRAPHICS_SDLGL::RENDER_INPUT_SCENE::SHADER_TYPE enum
* add a property to the DRAWABLE class if needed (we already flag skyboxes so you may not need to do anything for the case of your skybox code)
* make sure your DRAWABLE instance gets marked with the property you added (for skyboxes, this happens via the track's objects/list.txt file and the code in TRACK::OBJECTLOADER::ContinueObjectLoad)
* in GRAPHICS_SDLGL:
rawScene call renderscene.SetShader(RENDER_INPUT_SCENE::MY_SHADER_TYPE, shadermap["my_shader_name"]);
* upload any per-frame parameters to the shader in GRAPHICS_SDLGL::RENDER_INPUT_SCENE::Render
* add code to GRAPHICS_SDLGL::RENDER_INPUT_SCENE::SelectAppropriateShader to enable your shader based on the DRAWABLE property you added
I want to fiddle with the code some to make it easier to manage shader types, render passes, and shader constants. Also, right now there are a lot of really huge function bodies that I'd like to simplify.