Direct3D HLSL Programming using RenderMonkey IDE
Direct3D HLSL Programming using RenderMonkey IDE Direct3D HLSL Programming using RenderMonkey IDE
Diffusely Reflective Marble • Blend between vein color and base solid color using turbulence coefficient • Multiply resulting color by diffusely reflected light lerp ( ) Game Developer Conference, San Jose, CA, March 7 th 2003 =
Diffusely Reflective Marble Blending between two colors using a blending factor: float4 mix(float4 a, float4 b, float blendFactor) { // a * blendFactor + b * (1-blendFactor) return lerp(b, a, blendFactor);} } Computing diffuse material color: // Get the blended color (pre-diffuse): float4 Ct = mix (vein_color, base_color,turbulenceFactor); // Compute diffuse and ambient contributions: float4 DiffuseMarble = light_color * (Ct * ( Ka*ambient + Kd * soft_diffuse(Neye, Peye) Game Developer Conference, San Jose, CA, March 7 th 2003
- Page 1 and 2: Direct3D® High Level Shader Langua
- Page 3 and 4: RenderMonkey Addresses the Needs of
- Page 5 and 6: Program Your Shaders Using Our Intu
- Page 7 and 8: High Level Shading Language • Int
- Page 9 and 10: Creating an HLSL-based Effect Using
- Page 11 and 12: HLSL Shader Editor Plug-in • Allo
- Page 13 and 14: Diffuse Lighting Effect: Pixel Shad
- Page 15 and 16: Specular Lighting: Vertex Shader st
- Page 17 and 18: Advanced Shader Examples • Marble
- Page 19 and 20: Veined Marble Shader • Based on t
- Page 21 and 22: Veined Marble Shader Algorithm: Bas
- Page 23: Vein Turbulence • Compute vein tu
- Page 27 and 28: Anisotropic Metal Shader Game Devel
- Page 29 and 30: RenderMonkey Anisotropic Metal Exam
- Page 31 and 32: Determining Direction of Anisotropy
- Page 33 and 34: Computing Anisotropic Lighting: Ver
- Page 35 and 36: Assembling The Final Look • Ring
- Page 37 and 38: Translucent Iridescent Shader: Butt
- Page 39 and 40: RenderMonkey Butterfly Wings Shader
- Page 41 and 42: Translucent Iridescent Shader: Vert
- Page 43 and 44: Diffuse Illumination For Translucen
- Page 45 and 46: Making Butterly Wings Iridescent Ir
- Page 47 and 48: Example of Translucent Iridescent S
- Page 49 and 50: Generate Better PS_1_x Code Through
- Page 51 and 52: Summary • Use HLSL for your shade
Diffusely Reflective Marble<br />
• Blend between vein color and base solid color <strong>using</strong><br />
turbulence coefficient<br />
• Multiply resulting color by diffusely reflected light<br />
lerp ( )<br />
Game Developer Conference, San Jose, CA, March 7 th 2003<br />
=