Index_R-S

R-S

r0 register, for single color output, 281

ray tracing, 5

rcp (reciprocal) instruction, 256-257, 322-323

real-time computer graphics, traditional approach in, 38

"real" vertex shader, writing for a particular FVF, 129

reciprocal, computing for an element of the source register, 256-257, 322-323

reciprocal square root, computing, 260-261, 323-324

reference rasterizer, 114-115

reflectance, simulating from light traveling through a dielectric, 76

reflected angle, of light, 70

reflected colors, 25, 26-27

reflected light, perceiving detail from, 23

reflected ray, of light, 58

reflection

anisotropic, 78-80

of a light wave, 59

reflection coefficients, 39

reflection direction, of specular light, 46

reflection vector

computing for Phong's specular light equation, 46-47, 48

creating, 349, 351

specular light's intensity follows, 44, 45

refracted ray, of light, 58

refraction, 59-64

indices of, 60

spectrum spreading effect of, 62-63

refractive index

of a diamond, 61

temperature correction for, 64

refrast, 114-115

register combiners, programming on NVIDIA hardware, 140

register masks, 268-269

register names, case sensitivity of, 193

registers

automatic element-by-element reference to, 268

declaring the usage of, in PS 2.0, 287

linear interpolation between two, 236-237, 304-305

multiplying two and adding a third, 246-247, 312, 313

normalizing all elements of, 254-255, 318-319

precision of, in pixel shaders, 276, 278-279

selecting all elements from 1, 357

setting both a single register and an array, 134

setting vertex constant, 133

subtracting one from another, 266-267

RegisterSoftwareDevice() function, devices previously registered with, 114

render primitive call, 128

loading vertex streams into vertex registers, 129

setting values of the constant registers prior to, 197

render states, effecting texture sampling stage registers, 287

rendering, 136-137

nonphotorealistic, 81-87

rendering functions, calling, 136

RenderMan, 3

RenderMonkey shader tool, 139-140

included with this book, 6

rep-endrep block

indicating the start of, 258-259

termination point for, 219

rep instruction, 258-259

compared to loop, 234

ret instruction, 259

creating a shader subroutine terminating with, 207

retroreflection, 54

revision history

by DirectX version, 193

of pixel shaders, 279-281

of vertex shaders, 196

Reynolds, Craig, 81

rgb colors, 22-23

filtering out specific, 30

rgb values

assigning to a range of wavelengths, 62

of lights, 33

rgb vectors, color calculations on, 24-25

rgba colors, 22-23

rgba vectors, color calculations on, 24-25

right-hand rule

computing the three-component cross product, 209-210

followed by the cross product, 18-19

rn. See temporary registers

rough diffuse reflecting surfaces, 54, 56, 57

rough surfaces

backscattering effect exhibited by, 54

efforts to better model, 55-58

roughness distribution function, 75-76

roughness, of a surface, 36

rsq (reciprocal square root) instruction, 260-261, 323-324

s-polarized component, 65

sampler registers, declaring, 296

SamplerState, in DirectX 9,287

sampling stage register, 286-287

sampling unit, identified by a sampling stage register, 286-287

sapphire, index of refraction as a function of wavelength for, 62, 63

_sat modifier, 270, 367, 368

cannot be used with the sincos macro, 325

with the dp3 instruction, 299

with the dp4 instruction, 300

not supported in mova, 252

saturate modifier, 367

saturated colors, 26-27

saturation, shifting color values to maintain, 28-29

saturation instruction modifier, 270

scalar argument, computing the sine and cosine values for, 264

scalar mask, 364

scalar pipe, 93

scalar pipeline, 369

scalar processing (alpha), 370

scalar product. See dot product

scalar triple product, 20, 21

scalar values

computing power functions for, 255

computing the base two logarithm of, 303-304

raising to a power, 320-321

scalars, 10

scale by two modifier, 359

scaled color values, 27

scenes

eliminating bright areas in, 30

making darker with colored light, 26

Schlick's simplification, for the specular exponential term, 51-53

Schwab, John, 142

scuff map, 174, 175, 176, 177

scuff texture, applying, 175

sensitivity, of the human eye to color graduations and edge detection, 23

serial register, setting more than one, 133

SetDestinationRegisters() section, of the pseudocode with each vertex instruction, 192

SetFVF() function, in DirectX 9, 129, 132, 133

SetPixelShader() function, calling, 132, 133

SetPixelShaderConstants() function, 136

calling, 297

setting pixel shader constant registers, 284

SetShaderConstant() function, in DirectX 8, 133

SetSourceRegisters() section, of the pseudocode with each vertex instruction, 192

SetStreamSource() function, 101

SetTexture() function, 108, 287

SetTextureStage() function, 291

SetTextureStageState() function, 108

setup codes, for vertex shaders, 150-153

SetVertexDeclaration() function, 122, 133

SetVertexShader() function, 128

calling, 132

calling with a null argument, 132

calling with the shader interface from CreateVertexShader(), 133

SetVertexShaderConstant() function, 100, 198

SetVertexShaderConstantF() function, for DirectX 9, 100

sge instruction, 261-262

sgn macro, 263

shader buffer, size of, 89

shader buffet, 149-189

shader constants

in DirectX 9, 134

setting, 133-136, 212

Shader Debugger, from NVIDIA, 140-141, 142

shader handle, creating a token array into, 130

shader language

commands in, 173

single-instruction multiple-data nature of, 268

shader reference, 191-371

online version of, 192

shader register window, of Shader Studio, 142, 144

shader registers, 106

shader revision history, by DirectX version, 193

shader source, placing in memory, 130

Shader Studio, 142, 144

shader token arrays, 130

shader version declaration, 274

ShaderLab tool, 139

shaders, 3

assembling, 130-132

basics of getting ready to use, 113-114

capabilities of, 89

checking for supported versions of, 116-117

creating, 130

existing graphics pipeline and, 90-92

flavors of, 90

loading, 132

optimizing, 90

philosophy of, 204

programming, 90

setting, 132

using in conjunction with the FFP, 95

shading, 35, 50

shading languages

era of, 4

higher level, 90

shadowed rays, of the Cook-Torrance model, 74

shift left modifier, 367

shift right modifier, 367

"shininess" parameter, 162

"shininess" value, 46

Siggraph conference, 146

signed scaling modifier, 358

signed textures, 339

signs, computing for each element in a register, 263

silhouette edge shader, 178-180

simulated Fresnel term, adding with minimal effort, 187

sincos macro, 264, 324-325

sine and cosine, computing for a scalar value, 324-325

sine value, computing for a scalar argument, 264

single-instruction multiple data nature, of the shader language, 268

singly tiled texture, texture coordinates for, 203

sketching style, 82, 83

slope distribution function, 75

slope distribution, Gaussian distribution modeling, 75

slt instruction, 265-266

Snell's law, 59-60

software vertex processing, specifying, 115

solid color objects, generating, 153

source absolute value, 270

source bias, 357-358

source colors, adding two, 288-289

source invert, 357

source negation, 270-271, 356-357

source registers

corrupted after using texbem, 329, 330

multiplying, 316-317

multiplying element by element, 253

negating entire, 270-271, 356-357

storing into destination registers, 250-251, 315

subtracting two, 326, 327

swizzling, 361-362

source replication/selection, with pixel shaders, 360

source scale 2X, 359

source signed scaling, 358-359

source swizzle, 269

source texture register modifiers, 362-363

source texture register selectors, 361-362

sparkling, 99

spectrum spreading effect, of refraction, 62-63

specular and diffuse lighting coefficients, computing, 227-229

specular color, 34

added by pixel shaders, 95

specular exponential term, Schlick's simplification for, 51-53

specular highlights, varying with the eye direction, 352

specular light, 44-49

specular light reflection, power term approximating the distribution of, 46

specular lighting, 34

Phong's equation for, 45-48

specular lighting term, generating, 162

specular reflection and environment mapping performing, 348-350

performing assuming a nonconstant view direction, 351-352

specular reflection, parts of, 78

specular term

for a light shining on a vertex, 172

using multiple, 37

specular vector component, FVF vertex shader register mapping order, 199

sprites, generating z value for, 343

static data, vertex buffer strategies for, 125

stride, of the vertex stream, 119

stride value, specifying for a DirectX 9 stream, 127

stylized rendering, 84, 85

sub instruction, 266-267, 326, 327

subroutine, indicating the end of, 259

subtraction, notation for, 11

surface boundary, interation of light with, 34

surface models, physically based, 74-76

surface normals, affine transformation of, 103

surface reflections, in the Cook-Torrance surface model, 75

surface roughness parameter, of the Oren-Nayar model, 57

surfaces

calculating the color reflected off of, 35

interaction with light, 36-38

interaction with light sources, 25

minimizing the shininess of, 34

swizzle modifier

with m3x2, 238

with m3x3, 240

with m3x4, 241

with m4x3, 243

with m4x4, 245

swizzles, 269



Real-Time Shader Programming(c) Covering Directx 9. 0
Real-Time Shader Programming (The Morgan Kaufmann Series in Computer Graphics)
ISBN: 1558608532
EAN: 2147483647
Year: 2005
Pages: 104
Authors: Ron Fosner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net