Shaders

From Planetside Software Wiki
Jump to: navigation, search

Shaders are a familiar concept in computer graphics and are used in many 3D applications. Fundamentally, a shader controls the appearance of a surface. In computer graphics terminology, a “shader” is the set of instructions that dictate how a particular surface will be shaded, including aspects like diffuse color, luminosity, specularity and reflectivity, transparency, displacement, and much more. Shaders often act on input from other elements of the scene such as light sources, and determine the final color of the surface by combining lighting effects with base surface properties.

Terragen provides a set of built-in shaders that allow you to create many kinds of surfaces. These can be combined to create a wide variety of natural looking scenes. For users with more specialized requirements, however, Terragen also includes the ability to use function nodes to create more specific and customized results.

A shader is a program or set of instructions used in 3D computer graphics to determine the final surface properties of an object or image. This can include arbitrarily complex descriptions of light absorption and diffusion, texture mapping, reflection and refraction, shadowing, surface displacement and post-processing effects. In Terragen 2 shaders are used to construct and modify almost every element of a scene.

Literally, to change the position of something. In graphics terminology to displace a surface is to modify its geometric (3D) structure using reference data of some kind. For example, a grayscale image might be taken as input, with black areas indicating no displacement of the surface, and white indicating maximum displacement. In Terragen 2 displacement is used to create all terrain by taking heightfield or procedural data as input and using it to displace the normally flat sphere of the planet.