RUS New site

Site menu
Login form

Search
Donate
Our poll
What would you most like to see in the next version of SpaceEngine?
Total answers: 53797
Statistics


Now on site:
Total online: 15
Guests: 14
Users: 1

Today visited:

Blog

Main » 2012 » November » 9 » Color banding artefact fix
14:50
Color banding artefact fix
Fixed color banding artefact on landscape and especially on the water. Normal-and-height textures now store more precise height and less precise normals, but changes in lighting is not noticeable. Texture format now is:

R - normal X
G - normal Y
B - height low byte
A - height up byte

Normal Z component is reconstructed on-the-fly from the XY components by simple formula: Z = sqrt(1.0 - X*X - Y*Y) (keep in mind that normal vectors are always have the unit length). Using sqrt() function in the fragment shader on modern hardware doesn't affect the performance.

Height now have 16 bit precision, it calculated from two bytes very simply: h = B + A / 256. Having 16-bit height precision in the fragment shader fixes many artefacts, the most noticeable of which is a color banding on the shallow water. Before and after:





The banding on mountains was less noticeable (look at the green areas), but now it is fixed at all:



Views: 623 | Added by: SpaceEngineer | Rating: 5.0/1
Total comments: 0
Only registered users can add comments.
[ Registration | Login ]