Determining Color by Blending Textures

In the real world, not very many applications will use simple pseudo-randomly generated colors when rendering models. Models are normally generated with highly detailed textures, and occasionally quite a few of them. What if there were a scenario where you needed to blend two or more textures for your model? Sure, you could do that with the fixed-function pipeline, but what if the model was something like “tiny.x”, which most of the code in this book uses? This model only uses a single texture, so how will you use two textures blended together?

UNDERSTANDING THE PIXEL SHADER INSTRUCTION SET LIMIT

Since you will be manipulating a pixel shader in this code, one thing you may notice is that the amount of available ...

Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.