Show
Ignore:
Timestamp:
12/10/07 12:34:21 (1 year ago)
Author:
phill
Message:

o Bringing bump depth setting into line with game.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/x42view.net/Gui/ModelWindow.Preview.Shaded.cs

    r489 r492  
    216216                } 
    217217 
    218                 EffectHandle ehInvBumpDepth
     218                EffectHandle ehBumpUnpack
    219219 
    220220                EffectHandle ehAmbient; 
     
    268268                        shaderLights = ShaderLight.GetLights( shadedEffect ); 
    269269 
    270                         ehInvBumpDepth = shadedEffect.GetParameterBySemantic( null, "INVBUMPDEPTH" ); 
     270                        ehBumpUnpack = shadedEffect.GetParameterBySemantic( null, "BUMPUNPACK" ); 
    271271 
    272272                        defaultDiffuse = TextureLoader.FromFile( device, Path.Combine( Application.StartupPath, "Media/DefaultDiffuse.bmp" ), 
     
    291291                private void UnloadSurfaceShaders() 
    292292                { 
    293                         ehInvBumpDepth = null; 
     293                        ehBumpUnpack = null; 
    294294                        shaderLights = null; 
    295295                        ehAmbient = null; 
     
    313313                private void SetupLightingRig() 
    314314                { 
    315                         float invBumpDepth = (1 - pnPreviewOpts.BumpDepth); 
    316                         shadedEffect.SetValue( ehInvBumpDepth, new Vector4( invBumpDepth, 0, 0, 1 ) ); 
     315                        shadedEffect.SetValue( ehBumpUnpack, pnPreviewOpts.BumpUnpack ); 
    317316 
    318317                        Vector3 amb = pnPreviewOpts.AmbientLightColor;