Shading Technique - Gloss Mapping

From Horde3D Wiki
Revision as of 05:15, 6 August 2008 by Darkangel (talk | contribs) (Draft layout)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I'm still writing this article, based on this forum post

Overview

Defining a gloss map: a texture that describes whether a surface area is matte or gloss. This texture is used as a mask for specular highlights.

Why might you want to use this technique?
- On materials that visibly vary in "shininess", such as reflective metal that is partially dirty.

Requirements:
- RGBA Color Map, with the alpha channel representing the gloss map
- Bright areas in the gloss map will by shiny, dark areas will be matte

The Technique

Seeing as specular lighting is already present in the shaders that are bundled with a new Horde3D installation, adding in a specular mask is exceedingly simple. In theory this is all we need:

GLSL Code
todo

Description of what's going on in the above code

Here is an example of Horde3D's original parallax shader, with the above modifications applied:

Full GLSL Fragment Shader
Todo

Example Result

Insert image here

To-Do List for this Article

- Add pictures
- Finish writing the descriptions ;) - this is a draft

Technique - Gloss mapping
File:Todo.jpg
Using an alpha channel to mask specular highlights.
Version: 1.0
Compatible with Horde3D: 1.0 beta
Release date: 2008-08-06
Author(s): DarkAngel