OpenGL Headline News

Color-based per-pixel blending of detail textures with GLSL code

Category: Developers

Nov 18, 2011

This paper describes a method for blending detail textures over terrain. Instead of using masks to define how much each texture to blend into a given fragment of the terrain the color of the base texture is used. A color is assigned to each detail map used, for example some shade of green for grass, a shade of brown for soil, gray for rock and so on. Then, when rendering the terrain, at each output fragment each detail map is blended with a contribution inversely proportional to the ‘distance’ of the base texture color from the color assigned to the detail map in question. This paper comes with GLSL code samples.

Read more OpenGL news

temperature-friend