1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <title>ReflectanceRSampler</title> 7 <link rel="stylesheet" href="../css/mainpage.css" type="text/css" /> 8 </head> 9 <body> 10 <h1><ReflectanceRSampler></h1> 11 <h2>Description</h2> 12 <p> 13This is used with lookup tables for reflection components (Reflection R|Reflection G|Reflection B|Distribution 0|Distribution 1|Fresnel).<BR> <br> Hardware limitations affect the values that can be taken on by various attributes.<br> See documentation on basic graphics.<br> <br> This element takes <ReferenceLookupTableCtr> (representing a lookup table) and <NullLookupTableCtr> (when there are no settings) as children.<br> 14 </p> 15 <h2>Attributes</h2> 16 <table class="arguments"> 17<thead><tr><td>Type</td><td>Attributes</td><td>Description</td></tr></thead><tr><td>LightingLookupTableInput</td><th>Input</th><td> 18 Input value for accessing lookup table. 19 </td></tr><tr><td /><th>IsAbs</th><td> 20 Flag for making an absolute value of the input value for accessing lookup table. 21 </td></tr><tr><td>LightingLookupTableScale</td><th>Scale</th><td> 22 Scale value by which to multiply the value output from the lookup table. 23 </td></tr></table> 24 <h2><CODE>LightingLookupTableInput</CODE> Enumerated Type</h2> 25 <table class="arguments"> 26<thead><tr><td>Value</td><td>Description</td></tr></thead><tr><th>CosNormalHalf</th><td>The cosine of the angle formed from the normal and the half vector.</td></tr><tr><th>CosViewHalf</th><td>The cosine value of the angle formed from the normal vector and the half vector.</td></tr><tr><th>CosNormalView</th><td>The cosine value of the angle formed from the normal and the view vector.</td></tr><tr><th>CosLightNormal</th><td>The cosine value of the angle formed from the light vector and the normal.</td></tr><tr><th>CosLightSpot</th><td>The cosine value of the angle formed from the light vector and the spot direction vector.</td></tr><tr><th>CosPhi</th><td>The cosine value of the angle formed from the half vector's tangent projection vector and the tangent vector.</td></tr></table> 27 <h2><CODE>LightingLookupTableScale</CODE> Enumerated Type</h2> 28 <table class="arguments"> 29<thead><tr><td>Value</td><td>Description</td></tr></thead><tr><th>Quarter</th><td>0.25x scale.</td></tr><tr><th>Half</th><td>0.5x scale.</td></tr><tr><th>One</th><td>1x scale.</td></tr><tr><th>Two</th><td>2x scale.</td></tr><tr><th>Four</th><td>4x scale.</td></tr><tr><th>Eight</th><td>8x scale.</td></tr></table> 30 31<h2>Example Output</h2> 32 33<table> 34<tr> 35<td><pre> 36<Materials><br> 37 <MaterialCtr Name="lambert2" IsCompressible="true" IsFragmentLightEnabled="true" IsVertexLightEnabled="false" IsHemiSphereLightEnabled="false" IsHemiSphereOcclusionEnabled="false" IsFogEnabled="false" TextureCoordinateConfig="Config0120" TranslucencyKind="Opaque" ShaderProgramDescriptionIndex="-1" ShaderBinaryKind="Default"><br> 38 <ShaderReference /><br> 39 <MaterialColor VertexColorScale="1"><br> 40 <Emission R="0" G="0" B="0" A="0" /><br> 41 <Ambient R="1" G="1" B="1" A="0" /><br> 42 <Diffuse R="1" G="1" B="1" A="1" /><br> 43 <Specular0 R="1" G="1" B="1" A="0" /><br> 44 <Specular1 R="0" G="0" B="0" A="0" /><br> 45 <Constant0 R="0" G="0" B="0" A="1" /><br> 46 <Constant1 R="0" G="0" B="0" A="1" /><br> 47 <Constant2 R="0" G="0" B="0" A="1" /><br> 48 <Constant3 R="0" G="0" B="0" A="1" /><br> 49 <Constant1 R="0" G="0" B="0" A="1" /><br> 50 <Constant5 R="0" G="0" B="0" A="1" /><br> 51 </MaterialColor><br> 52 <Rasterization CullingMode="BackFace" IsPolygonOffsetEnabled="false" PolygonOffsetFactor="0" PolygonOffsetUnit="0" /><br> 53 <TextureCoordinators><br> 54 <TextureCoordinatorCtr SourceCoordinate="0" MappingMethod="UvCoordinateMap" ReferenceCamera="0" MatrixMode="DccMaya" ScaleS="1" ScaleT="1" Rotate="0" TranslateS="0" TranslateT="0" /><br> 55 </TextureCoordinators><br> 56 <TextureMappers><br> 57 <PixelBasedTextureMapperCtr><br> 58 <TextureReference>Textures["Number.1"]@file:Textures/Number.1.ctex</TextureReference><br> 59 <StandardTextureSamplerCtr MinFilter="Linear" MagFilter="Linear" WrapS="Repeat" WrapT="Repeat" MinLod="0" LodBias="0"><br> 60 <BorderColor R="0" G="0" B="0" A="1" /><br> 61 </StandardTextureSamplerCtr><br> 62 </PixelBasedTextureMapperCtr><br> 63 </TextureMappers><br> 64 <FragmentShader LayerConfig="ConfigurationType0"><br> 65 <BufferColor R="0" G="0" B="0" A="1" /><br> 66 <FragmentBump BumpTextureIndex="Texture0" BumpMode="NotUsed" IsBumpRenormalize="false" /><br> 67 <FragmentLighting FresnelConfig="No" IsClampHighLight="false" IsDistribution0Enabled="false" IsDistribution1Enabled="false" IsGeometricFactor0Enabled="false" IsGeometricFactor1Enabled="false" IsReflectionEnabled="false" /><br> 68 <FragmentLightingTable><br> 69 <strong><ReflectanceRSampler IsAbs="true" Input="CosNormalHalf" Scale="One"></strong><br> 70 <ReferenceLookupTableCtr TableName="LookupTable_1"><br> 71 <LookupTableSetContentReferenceCtr>LookupTableSetContents["LookupTableSetContentCtr1"]@file:LookupTableSetContentCtr1.clts</LookupTableSetContentReferenceCtr><br> 72 </ReferenceLookupTableCtr><br> 73 <strong></ReflectanceRSampler></strong><br> 74 <ReflectanceGSampler IsAbs="true" Input="CosNormalHalf" Scale="One"><br> 75 <NullLookupTableCtr /><br> 76 </ReflectanceGSampler><br> 77 <ReflectanceBSampler IsAbs="true" Input="CosNormalHalf" Scale="One"><br> 78 <NullLookupTableCtr /><br> 79 </ReflectanceBSampler><br> 80 <Distribution0Sampler IsAbs="true" Input="CosNormalHalf" Scale="One"><br> 81 <NullLookupTableCtr /><br> 82 </Distribution0Sampler><br> 83 <Distribution1Sampler IsAbs="true" Input="CosNormalHalf" Scale="One"><br> 84 <NullLookupTableCtr /><br> 85 </Distribution1Sampler><br> 86 <FresnelSampler IsAbs="true" Input="CosNormalHalf" Scale="One"><br> 87 <NullLookupTableCtr /><br> 88 </FresnelSampler><br> 89 </FragmentLightingTable><br> 90 <TextureCombiners><br> 91 <TextureCombinerCtr CombineRgb="Modulate" CombineAlpha="Modulate" ScaleRgb="One" ScaleAlpha="One" Constant="Constant0" BufferInputRgb="PreviousBuffer" BufferInputAlpha="PreviousBuffer"><br> 92 <SourceRgb Source0="FragmentPrimaryColor" Source1="Texture0" Source2="Constant" /><br> 93 <OperandRgb Operand0="Color" Operand1="Color" Operand2="Color" /><br> 94 <SourceAlpha Source0="PrimaryColor" Source1="Texture0" Source2="Constant" /><br> 95 <OperandAlpha Operand0="Alpha" Operand1="Alpha" Operand2="Alpha" /><br> 96 </TextureCombinerCtr><br> 97 </TextureCombiners><br> 98 <AlphaTest IsTestEnabled="false" TestFunction="Always" TestReference="0" /><br> 99 </FragmentShader><br> 100 <FragmentOperation><br> 101 <DepthOperation IsTestEnabled="true" TestFunction="Less" IsMaskEnabled="true" /><br> 102 <BlendOperation Mode="NotUsed" LogicOperation="Copy"><br> 103 <RgbParameter BlendFunctionSource="SourceAlpha" BlendFunctionDestination="OneMinusSourceAlpha" BlendEquation="FuncAdd" /><br> 104 <AlphaParameter BlendFunctionSource="One" BlendFunctionDestination="Zero" BlendEquation="FuncAdd" /><br> 105 <BlendColor R="0" G="0" B="0" A="1" /><br> 106 </BlendOperation><br> 107 </FragmentOperation><br> 108 </MaterialCtr><br> 109</Materials><br> 110</pre></td> 111</tr></table> 112 <hr><p>CONFIDENTIAL</p></body> 113</html>