Real-Time Shader Programming

Chapter 4: Introduction to Shaders

OVERVIEW

Shaders are intended to replace the fixed matte-plastic look that has been a part of consumer level graphics programs and games for the past few years. Shaders are intended to give greater freedom to artists and programmers so they may create a unique look and style for their application. Shaders are designed to run on the hardware (assuming a suitable interface is there) in real time, with control over just how involved and complicated the shader is in the hands of the programmer and artist. With shaders you can

  • Perform basic geometry transformations

  • Warp the geometry

  • Blend or skin geometry

  • Generate color information (specular and diffuse)

  • Tween vertices between transformation matrices

  • Generate texture coordinates

  • Transform texture coordinates

  • Size point sprites

  • Use a custom illumination model

  • Perform nonphotorealistic rendering

  • Perform bump, environment, and specular mapping

  • Perform your own texture-blending operations

  • Clip pixels

In fact, your options are limited only by your ingenuity and the size of the shader buffer (which limits how complicated your shader can be).

Writing a shader is a lot like programming PCs back in the old days, when the real programmers didn't use any fancy higher-level language. They programmed in assembler. While that may cause you to groan, it really shouldn't since programming in assembly (or in shader instructions) makes programming very simple and obvious though a bit tedious at times. The nice thing is that you know exactly what's happening in your shader. Errors are fairly obvious, both in rinding them in your...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Surface Metrology Equipment
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.