Graphics is a large subject and one on which the rest of an engine stands or falls. Therefore, this area is presented as a list of important features only. It can be taken for granted that Raz0r is brimming with “standard” features that should be present in any engine and therefore do not need listing here specifically.
Raz0r Feature Overview Graphics
Shaders
Raz0r has its own shading language that is basically a hybrid of
a few industry standard methods, tweaked in such a way as to allow
them to be compiled for any platform. We call this language HLSL+.
One key thing our shader language does is to decouple the pixel
generation from the lighting and shading aspect. Many engines fall
down by requiring the shader author to add lighting to their shaders,
even if this just means calling library functions, which is error
prone and also technically redundant. HLSL+, which has no game
dependencies, allows for blisteringly fast game developement through
the re-use of our extensive library of effects.
Lighting
Raz0r uses per-pixel lighting throughout. Whilst vertex colouring
is also an option, any dynamic lighting is performed in the pixel
shader, as this is both the most visually appealing and technically
accurate place to do it.
The following basic light types are supported:
- Omni (Point)
- Planar Omni (Omni with a clipping plane)
- Directional
- Planar Directional (Directional with a clipping plane)
- Simple Spot (fast with no fall-offs)
- Full Spot
- Projection Spot (casts a texture instead of just light)
Razor combines all lighting contributions into one large shader, allowing all materials to be rendered in a single pass, this brings a numerous amount of benefits, all of which related to performance.
Please note, on the PC platform, video cards below shader model 2 are not supported, as Raz0r is designed to be a next-generation engine.
Shadows
Currently, Raz0r employs the tried and trusted stencil volume
shadowing technique. Due to the single-pass lighting pipeline,
shadows are rendered to textures during scene graph correlation, so
that each object can cast shadows from more than one light.
There is presently a limit of four shadows per object, which are
taken from the four most prominent light sources in situations where
there are more than four lights shining on that object.
Soft shadows add a lot of depth and realism to a scene, but these
are not strictly compatible with the hard-edged ones generated by
the stencil technique. Raz0r implements a compromise between realism
and rendering speed by Gaussian blurring the shadow textures to
feather the edges, before they are applied to the lit materials. In
practice, this is a surprisingly effective and visually pleasing
technique.