About Me

Hi. I'm Josh Ols. Lead Graphics Developer for RUST LTD.


View Joshua Ols's profile on LinkedIn

« Materials | Main | Plan of Attack! »

Rendering Approach

Hey there adoring public! I've got an update! :p

Having had a chance to refine my plan, I now have a fairly good idea of how I want my game's renderer to behave. So without further ado, here you go!


It will utilize a hybrid of forward and deferred shading to allow some material variety, but avoid a shader combinatorial explosion. Each stage of the pipeline will be hard-coded, so it won't really be possible to arbitrarily add or remove new stages at runtime.

I'm not sure yet whether I will be using ubershaders with dynamic branching, or preprocessor definitions, to handle shader complexity. I plan to avoid writing a complex, generalized shader managment system.

As it stands, I will likely have to use a RGBA16F target for rendering, and accumulating lights. On SM 3.0 PC hardware, that is about the only way I know to allow multipass HDR lighting with linear blending. This point will be most important for alpha-blending, since I can't rely on sRGB blending for consistent behavior between DX9 and DX10 hardware.


A skylight system will handle ambient lighting and reflections, covering the vast majority of materials. This will consist of a directional light (the sun and/or moon), and an ambient light using a gradient texture. These lights are responsible for filling out the scene, so that it isn't too dark to see. This approach has the advantages of being simple, dynamic, and causing all the objects to feel integrated in the same environment.

Local lights will be handled exclusively by the deferred shading system. These will be Lambertian only, having no influence on specular reflection. For the most part, these lights are just for decorations or effects. This pass will be limited to lights that have a definite volume and extent (ie. NO directional lights).

Shadowing will only be provided for the sun directional light. Rather than darkening or going black, it will simply remove the sun's contribution from the skylight, while leaving the the ambient contribution. This way, detail will not be lost in the shadowed areas.

In the case of materials that need a custom BRDF (ex. Hair, car paint), the sun directional light will be used. The result will then augment or replace the reflections provided by the skylight.


More to follow in the journal entry. ;)

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
All HTML will be escaped. Hyperlinks will be created for URLs automatically.