Blog Archives

Another Indoor Test Level

I have done a quick video by request. Check it out. 🙂

Normal Mapping with Partial Derivatives

I have added normal mapping support recently. It is not perfect, but works well with some new models I have obtained from ShareCG (thank you, Nobiax). The model loader still lacks of tangent and binormal processing support (still relying on lowly OBJ files), so I am using partial derivatives to reconstruct T and B from GBuffer and shader parameters.

I have extended the deferred light combiner shader to handle multiple BRDFs with many parameters (diffuse, specular, environment reflection, etc.). The BRDF parameters are organized in a table that is indexed by a field in the GBuffer. Different objects can have different BRDFs, the particular index is an effect parameter. Deferred light combiner shader handles backside lighting (e.g. the sunlight shines through the leaves), controlled by a diffuse parameter in the BRDF table.

Here are some images produced by the current state of the renderer.

This slideshow requires JavaScript.

Advertisement

Porting Back to Linux II.

This post is the second part of another I posted earlier.

The detection of uninitialized class members is one of  of my recurring problems with C++. The language standard does not guarantee anything about member variables so I should initialize them myself. Unfortunately, VC++ compiler does not warn me if I forget to initialize a class member variable, even if I set the highest warning level. GCC detects this kind of sloppiness and reports them to me keenly, making great improvements in code quality. Furthermore, GCC goes one step beyond and warns me if the initialization order differs from the declaration order (see Effective C++ about this).
Read the rest of this entry

Effects, Passes, Shaders and Parameters

As I promised in an earlier post, this is a short overview about shader support in the engine. Currently Merlin3D supports OpenGL and GLSL. DirectX support is not implemented yet.

Merlin3D uses its own effect files, that describes a particular shader set for the different rendering passes (it has some similarities to .fx files in DirectX, but in OpenGL world there is no effect file support at all). Effect files are in XML format. Each visible scene object has exactly one effect required to render the object in different rendering passes. Multiple scene objects can use the same effect. Anyway, it is the recommended way of effect usage, because the engine tries to group objects by the associated effects to reduce OpenGL state changes.
Read the rest of this entry

Faster Deferred Shading

In the last two late evenings I have worked on the elimination of the 3D position from the geometry buffer, making some improvements on shader parameter passing and not surprisingly, hunting bugs down. The results are the following: Read the rest of this entry

A Good Old Demo Video

I have moved an old demo video about the engine to the dedicated YouTube channel. This was a project at the university, showing the new capabilities of the shader support just added to the engine.