示例#1
0
        public FowardLightingEffect(Device device, string filename)
            : base(device, filename)
        {
            Ambient      = FX.GetTechniqueByName("Ambient");
            DepthPrePass = FX.GetTechniqueByName("DepthPrePass");
            Directional  = FX.GetTechniqueByName("Directional");
            PointLight   = FX.GetTechniqueByName("Point");

            _worldViewProj     = FX.GetVariableByName("WorldViewProjection").AsMatrix();
            _world             = FX.GetVariableByName("World").AsMatrix();
            _worldInvTranspose = FX.GetVariableByName("gWorldInvTranspose").AsMatrix();

            _ambientDown  = FX.GetVariableByName("AmbientDown").AsVector();
            _ambientRange = FX.GetVariableByName("AmbientRange").AsVector();

            _dirToLight    = FX.GetVariableByName("DirToLight").AsVector();
            _dirLightColor = FX.GetVariableByName("DirLightColor").AsVector();

            _eyePosition       = FX.GetVariableByName("EyePosition").AsVector();
            _specularExponent  = FX.GetVariableByName("specExp").AsScalar();
            _specularIntensity = FX.GetVariableByName("specIntensity").AsScalar();

            _pointLightPosition = FX.GetVariableByName("PointLightPosition").AsVector();
            _pointLightRangeRcp = FX.GetVariableByName("PointLightRangeRcp").AsScalar();
            _pointLightColor    = FX.GetVariableByName("PointLightColor").AsVector();

            _diffuseMap = FX.GetVariableByName("DiffuseTexture").AsResource();
        }
示例#2
0
 public SkyEffect(Device device, string filename)
     : base(device, filename)
 {
     SkyTech       = FX.GetTechniqueByName("SkyTech");
     WorldViewProj = FX.GetVariableByName("gWorldViewProj").AsMatrix();
     CubeMap       = FX.GetVariableByName("gCubeMap").AsResource();
 }
示例#3
0
        public TerrainEffect(Device device, string filename) : base(device, filename)
        {
            Light1Tech    = FX.GetTechniqueByName("Light1");
            Light2Tech    = FX.GetTechniqueByName("Light2");
            Light3Tech    = FX.GetTechniqueByName("Light3");
            Light1FogTech = FX.GetTechniqueByName("Light1Fog");
            Light2FogTech = FX.GetTechniqueByName("Light2Fog");
            Light3FogTech = FX.GetTechniqueByName("Light3Fog");

            Light1ShadowTech    = FX.GetTechniqueByName("Light1Shadow");
            Light2ShadowTech    = FX.GetTechniqueByName("Light2Shadow");
            Light3ShadowTech    = FX.GetTechniqueByName("Light3Shadow");
            Light1FogShadowTech = FX.GetTechniqueByName("Light1FogShadow");
            Light2FogShadowTech = FX.GetTechniqueByName("Light2FogShadow");
            Light3FogShadowTech = FX.GetTechniqueByName("Light3FogShadow");

            Light1TechNT    = FX.GetTechniqueByName("Light1NT");
            Light2TechNT    = FX.GetTechniqueByName("Light2NT");
            Light3TechNT    = FX.GetTechniqueByName("Light3NT");
            Light1FogTechNT = FX.GetTechniqueByName("Light1FogNT");
            Light2FogTechNT = FX.GetTechniqueByName("Light2FogNT");
            Light3FogTechNT = FX.GetTechniqueByName("Light3FogNT");

            NormalDepthTech        = FX.GetTechniqueByName("NormalDepth");
            TessBuildShadowMapTech = FX.GetTechniqueByName("TessBuildShadowMapTech");

            _viewProj = FX.GetVariableByName("gViewProj").AsMatrix();
            _eyePosW  = FX.GetVariableByName("gEyePosW").AsVector();

            _fogColor = FX.GetVariableByName("gFogColor").AsVector();
            _fogStart = FX.GetVariableByName("gFogStart").AsScalar();
            _fogRange = FX.GetVariableByName("gFogRange").AsScalar();

            _dirLights = FX.GetVariableByName("gDirLights");
            _mat       = FX.GetVariableByName("gMaterial");

            _minDist            = FX.GetVariableByName("gMinDist").AsScalar();
            _maxDist            = FX.GetVariableByName("gMaxDist").AsScalar();
            _minTess            = FX.GetVariableByName("gMinTess").AsScalar();
            _maxTess            = FX.GetVariableByName("gMaxTess").AsScalar();
            _texelCellSpaceU    = FX.GetVariableByName("gTexelCellSpaceU").AsScalar();
            _texelCellSpaceV    = FX.GetVariableByName("gTexelCellSpaceV").AsScalar();
            _worldCellSpace     = FX.GetVariableByName("gWorldCellSpace").AsScalar();
            _worldFrustumPlanes = FX.GetVariableByName("gWorldFrustumPlanes").AsVector();

            _layerMapArray = FX.GetVariableByName("gLayerMapArray").AsResource();
            _blendMap      = FX.GetVariableByName("gBlendMap").AsResource();
            _heightMap     = FX.GetVariableByName("gHeightMap").AsResource();

            _view            = FX.GetVariableByName("gView").AsMatrix();
            _ambientMap      = FX.GetVariableByName("gSsaoMap").AsResource();
            _viewProjTex     = FX.GetVariableByName("gViewProjTex").AsMatrix();
            _shadowTransform = FX.GetVariableByName("gShadowTransform").AsMatrix();
            _shadowMap       = FX.GetVariableByName("gShadowMap").AsResource();
            _walkMap         = FX.GetVariableByName("gWalkMap").AsResource();
            _unwalkableSRV   = FX.GetVariableByName("gUnwalkable").AsResource();
        }
示例#4
0
        public DebugTexEffect(Device device, string filename) : base(device, filename)
        {
            ViewArgbTech  = FX.GetTechniqueByName("ViewArgbTech");
            ViewRedTech   = FX.GetTechniqueByName("ViewRedTech");
            ViewGreenTech = FX.GetTechniqueByName("ViewGreenTech");
            ViewBlueTech  = FX.GetTechniqueByName("ViewBlueTech");
            ViewAlphaTech = FX.GetTechniqueByName("ViewAlphaTech");

            _texture = FX.GetVariableByName("gTexture").AsResource();
            _wvp     = FX.GetVariableByName("gWorldViewProj").AsMatrix();
        }
        public SsaoBlurEffect(Device device, string filename) : base(device, filename)
        {
            HorzBlurTech = FX.GetTechniqueByName("HorzBlur");
            VertBlurTech = FX.GetTechniqueByName("VertBlur");

            _texelWidth  = FX.GetVariableByName("gTexelWidth").AsScalar();
            _texelHeight = FX.GetVariableByName("gTexelHeight").AsScalar();

            _normalDepthMap = FX.GetVariableByName("gNormalDepthMap").AsResource();
            _inputImage     = FX.GetVariableByName("gInputImage").AsResource();
        }
示例#6
0
        public ExtendedNormalMapEffect(Device device, string filename)
            : base(device, filename)
        {
            TweenFactor0 = FX.GetVariableByName("gTweenFactor0").AsScalar();

            MorphTech = FX.GetTechniqueByName("MorphTech");
            SelectedSubmeshMorphTech = FX.GetTechniqueByName("SelectedSubmeshMorphTech");
            NormalsTech         = FX.GetTechniqueByName("NormalsTech");
            BonesTech           = FX.GetTechniqueByName("BonesTech");
            SelectedSubmeshTech = FX.GetTechniqueByName("SelectedSubmeshTech");
        }
        public SsaoNormalDepthEffect(Device device, string filename) : base(device, filename)
        {
            NormalDepthTech          = FX.GetTechniqueByName("NormalDepth");
            NormalDepthAlphaClipTech = FX.GetTechniqueByName("NormalDepthAlphaClip");

            _worldView             = FX.GetVariableByName("gWorldView").AsMatrix();
            _worldInvTransposeView = FX.GetVariableByName("gWorldInvTransposeView").AsMatrix();
            _worldViewProj         = FX.GetVariableByName("gWorldViewProj").AsMatrix();
            _texTransform          = FX.GetVariableByName("gTexTransform").AsMatrix();
            _diffuseMap            = FX.GetVariableByName("gDiffuseMap").AsResource();
        }
        public InstancedNormalMapEffect(Device device, string filename) : base(device, filename)
        {
            Light1Tech    = FX.GetTechniqueByName("Light1");
            Light3TexTech = FX.GetTechniqueByName("Light3Tex");

            _viewProj     = FX.GetVariableByName("gViewProj").AsMatrix();
            _texTransform = FX.GetVariableByName("gTexTransform").AsMatrix();
            _eyePosW      = FX.GetVariableByName("gEyePosW").AsVector();

            _dirLights  = FX.GetVariableByName("gDirLights");
            _mat        = FX.GetVariableByName("gMaterial");
            _diffuseMap = FX.GetVariableByName("gDiffuseMap").AsResource();
            _normalMap  = FX.GetVariableByName("gNormalMap").AsResource();
        }
示例#9
0
        public ForwardLightingEffect(Device device, string filename)
            : base(device, filename)
        {
            Ambient = FX.GetTechniqueByName("Ambient");

            _worldViewProj     = FX.GetVariableByName("WorldViewProjection").AsMatrix();
            _world             = FX.GetVariableByName("World").AsMatrix();
            _worldInvTranspose = FX.GetVariableByName("gWorldInvTranspose").AsMatrix();

            _ambientDown  = FX.GetVariableByName("AmbientDown").AsVector();
            _ambientRange = FX.GetVariableByName("AmbientRange").AsVector();

            _diffuseMap = FX.GetVariableByName("DiffuseTexture").AsResource();
        }
示例#10
0
        public SsaoEffect(Device device, string filename) : base(device, filename)
        {
            SsaoTech = FX.GetTechniqueByName("Ssao");

            _viewToTexSpace     = FX.GetVariableByName("gViewToTexSpace").AsMatrix();
            _offsetVectors      = FX.GetVariableByName("gOffsetVectors").AsVector();
            _frustumCorners     = FX.GetVariableByName("gFrustumCorners").AsVector();
            _occlusionRadius    = FX.GetVariableByName("gOcclusionRadius").AsScalar();
            _occlusionFadeStart = FX.GetVariableByName("gOcclusionFadeStart").AsScalar();
            _occlusionFadeEnd   = FX.GetVariableByName("gOcclusionFadeEnd").AsScalar();
            _surfaceEpsilon     = FX.GetVariableByName("gSurfaceEpsilon").AsScalar();

            _normalDepthMap = FX.GetVariableByName("gNormalDepthMap").AsResource();
            _randomVecMap   = FX.GetVariableByName("gRandomVecMap").AsResource();
        }
示例#11
0
        public TreeSpriteEffect(Device device, string filename) : base(device, filename)
        {
            Light3Tech                = FX.GetTechniqueByName("Light3");
            Light3TexAlphaClipTech    = FX.GetTechniqueByName("Light3TexAlphaClip");
            Light3TexAlphaClipFogTech = FX.GetTechniqueByName("Light3TexAlphaClipFog");

            _viewProj            = FX.GetVariableByName("gViewProj").AsMatrix();
            _eyePosW             = FX.GetVariableByName("gEyePosW").AsVector();
            _fogColor            = FX.GetVariableByName("gFogColor").AsVector();
            _fogStart            = FX.GetVariableByName("gFogStart").AsScalar();
            _fogRange            = FX.GetVariableByName("gFogRange").AsScalar();
            _dirLights           = FX.GetVariableByName("gDirLights");
            _mat                 = FX.GetVariableByName("gMaterial");
            _treeTextureMapArray = FX.GetVariableByName("gTreeMapArray").AsResource();
        }
示例#12
0
        public ParticleEffect(Device device, string filename) : base(device, filename)
        {
            StreamOutTech = FX.GetTechniqueByName("StreamOutTech");
            DrawTech      = FX.GetTechniqueByName("DrawTech");

            _viewProj = FX.GetVariableByName("gViewProj").AsMatrix();
            _gameTime = FX.GetVariableByName("gGameTime").AsScalar();
            _timeStep = FX.GetVariableByName("gTimeStep").AsScalar();

            _eyePosW  = FX.GetVariableByName("gEyePosW").AsVector();
            _emitPosW = FX.GetVariableByName("gEmitPosW").AsVector();
            _emitDirW = FX.GetVariableByName("gEmitDirW").AsVector();

            _texArray  = FX.GetVariableByName("gTexArray").AsResource();
            _randomTex = FX.GetVariableByName("gRandomTex").AsResource();
        }
示例#13
0
        public InstancedBasicEffect(Device device, string filename) : base(device, filename)
        {
            Light1Tech = FX.GetTechniqueByName("Light1");
            Light2Tech = FX.GetTechniqueByName("Light2");
            Light3Tech = FX.GetTechniqueByName("Light3");

            Light0TexTech = FX.GetTechniqueByName("Light0Tex");
            Light1TexTech = FX.GetTechniqueByName("Light1Tex");
            Light2TexTech = FX.GetTechniqueByName("Light2Tex");
            Light3TexTech = FX.GetTechniqueByName("Light3Tex");

            Light0TexAlphaClipTech = FX.GetTechniqueByName("Light0TexAlphaClip");
            Light1TexAlphaClipTech = FX.GetTechniqueByName("Light1TexAlphaClip");
            Light2TexAlphaClipTech = FX.GetTechniqueByName("Light2TexAlphaClip");
            Light3TexAlphaClipTech = FX.GetTechniqueByName("Light3TexAlphaClip");

            Light1FogTech = FX.GetTechniqueByName("Light1Fog");
            Light2FogTech = FX.GetTechniqueByName("Light2Fog");
            Light3FogTech = FX.GetTechniqueByName("Light3Fog");

            Light0TexFogTech = FX.GetTechniqueByName("Light0TexFog");
            Light1TexFogTech = FX.GetTechniqueByName("Light1TexFog");
            Light2TexFogTech = FX.GetTechniqueByName("Light2TexFog");
            Light3TexFogTech = FX.GetTechniqueByName("Light3TexFog");

            Light0TexAlphaClipFogTech = FX.GetTechniqueByName("Light0TexAlphaClipFog");
            Light1TexAlphaClipFogTech = FX.GetTechniqueByName("Light1TexAlphaClipFog");
            Light2TexAlphaClipFogTech = FX.GetTechniqueByName("Light2TexAlphaClipFog");
            Light3TexAlphaClipFogTech = FX.GetTechniqueByName("Light3TexAlphaClipFog");

            _viewProj     = FX.GetVariableByName("gViewProj").AsMatrix();
            _texTransform = FX.GetVariableByName("gTexTransform").AsMatrix();
            _eyePosW      = FX.GetVariableByName("gEyePosW").AsVector();

            _fogColor = FX.GetVariableByName("gFogColor").AsVector();
            _fogStart = FX.GetVariableByName("gFogStart").AsScalar();
            _fogRange = FX.GetVariableByName("gFogRange").AsScalar();

            _dirLights  = FX.GetVariableByName("gDirLights");
            _mat        = FX.GetVariableByName("gMaterial");
            _diffuseMap = FX.GetVariableByName("gDiffuseMap").AsResource();
        }
示例#14
0
        public BuildShadowMapEffect(Device device, string filename) : base(device, filename)
        {
            BuildShadowMapTech              = FX.GetTechniqueByName("BuildShadowMapTech");
            BuildShadowMapAlphaClipTech     = FX.GetTechniqueByName("BuildShadowMapAlphaClipTech");
            TessBuildShadowMapTech          = FX.GetTechniqueByName("TessBuildShadowMapTech");
            TessBuildShadowMapAlphaClipTech = FX.GetTechniqueByName("TessBuildShadowMapAlphaClipTech");

            _heightScale     = FX.GetVariableByName("gHeightScale").AsScalar();
            _maxTessDistance = FX.GetVariableByName("gMaxTessDistance").AsScalar();
            _minTessDistance = FX.GetVariableByName("gMinTessDistance").AsScalar();
            _minTessFactor   = FX.GetVariableByName("gMinTessFactor").AsScalar();
            _maxTessFactor   = FX.GetVariableByName("gMaxTessFactor").AsScalar();
            _viewProj        = FX.GetVariableByName("gViewProj").AsMatrix();

            _normalMap  = FX.GetVariableByName("gNormalMap").AsResource();
            _diffuseMap = FX.GetVariableByName("gDiffuseMap").AsResource();

            _worldViewProj     = FX.GetVariableByName("gWorldViewProj").AsMatrix();
            _world             = FX.GetVariableByName("gWorld").AsMatrix();
            _worldInvTranspose = FX.GetVariableByName("gWorldInvTranspose").AsMatrix();
            _texTransform      = FX.GetVariableByName("gTexTransform").AsMatrix();
            _eyePosW           = FX.GetVariableByName("gEyePosW").AsVector();
        }
示例#15
0
        public BasicEffect(Device device, string filename)
            : base(device, filename)
        {
            Light1Tech = FX.GetTechniqueByName("Light1");
            Light2Tech = FX.GetTechniqueByName("Light2");
            Light3Tech = FX.GetTechniqueByName("Light3");

            Light0TexTech = FX.GetTechniqueByName("Light0Tex");
            Light1TexTech = FX.GetTechniqueByName("Light1Tex");
            Light2TexTech = FX.GetTechniqueByName("Light2Tex");
            Light3TexTech = FX.GetTechniqueByName("Light3Tex");

            Light0TexAlphaClipTech = FX.GetTechniqueByName("Light0TexAlphaClip");
            Light1TexAlphaClipTech = FX.GetTechniqueByName("Light1TexAlphaClip");
            Light2TexAlphaClipTech = FX.GetTechniqueByName("Light2TexAlphaClip");
            Light3TexAlphaClipTech = FX.GetTechniqueByName("Light3TexAlphaClip");

            Light1FogTech = FX.GetTechniqueByName("Light1Fog");
            Light2FogTech = FX.GetTechniqueByName("Light2Fog");
            Light3FogTech = FX.GetTechniqueByName("Light3Fog");

            Light0TexFogTech = FX.GetTechniqueByName("Light0TexFog");
            Light1TexFogTech = FX.GetTechniqueByName("Light1TexFog");
            Light2TexFogTech = FX.GetTechniqueByName("Light2TexFog");
            Light3TexFogTech = FX.GetTechniqueByName("Light3TexFog");

            Light0TexAlphaClipFogTech = FX.GetTechniqueByName("Light0TexAlphaClipFog");
            Light1TexAlphaClipFogTech = FX.GetTechniqueByName("Light1TexAlphaClipFog");
            Light2TexAlphaClipFogTech = FX.GetTechniqueByName("Light2TexAlphaClipFog");
            Light3TexAlphaClipFogTech = FX.GetTechniqueByName("Light3TexAlphaClipFog");

            Light1ReflectTech = FX.GetTechniqueByName("Light1Reflect");
            Light2ReflectTech = FX.GetTechniqueByName("Light2Reflect");
            Light3ReflectTech = FX.GetTechniqueByName("Light3Reflect");

            Light0TexReflectTech = FX.GetTechniqueByName("Light0TexReflect");
            Light1TexReflectTech = FX.GetTechniqueByName("Light1TexReflect");
            Light2TexReflectTech = FX.GetTechniqueByName("Light2TexReflect");
            Light3TexReflectTech = FX.GetTechniqueByName("Light3TexReflect");

            Light0TexAlphaClipReflectTech = FX.GetTechniqueByName("Light0TexAlphaClipReflect");
            Light1TexAlphaClipReflectTech = FX.GetTechniqueByName("Light1TexAlphaClipReflect");
            Light2TexAlphaClipReflectTech = FX.GetTechniqueByName("Light2TexAlphaClipReflect");
            Light3TexAlphaClipReflectTech = FX.GetTechniqueByName("Light3TexAlphaClipReflect");

            Light1FogReflectTech = FX.GetTechniqueByName("Light1FogReflect");
            Light2FogReflectTech = FX.GetTechniqueByName("Light2FogReflect");
            Light3FogReflectTech = FX.GetTechniqueByName("Light3FogReflect");

            Light0TexFogReflectTech = FX.GetTechniqueByName("Light0TexFogReflect");
            Light1TexFogReflectTech = FX.GetTechniqueByName("Light1TexFogReflect");
            Light2TexFogReflectTech = FX.GetTechniqueByName("Light2TexFogReflect");
            Light3TexFogReflectTech = FX.GetTechniqueByName("Light3TexFogReflect");

            Light0TexAlphaClipFogReflectTech = FX.GetTechniqueByName("Light0TexAlphaClipFogReflect");
            Light1TexAlphaClipFogReflectTech = FX.GetTechniqueByName("Light1TexAlphaClipFogReflect");
            Light2TexAlphaClipFogReflectTech = FX.GetTechniqueByName("Light2TexAlphaClipFogReflect");
            Light3TexAlphaClipFogReflectTech = FX.GetTechniqueByName("Light3TexAlphaClipFogReflect");

            // skinned techs
            Light1SkinnedTech = FX.GetTechniqueByName("Light1Skinned");
            Light2SkinnedTech = FX.GetTechniqueByName("Light2Skinned");
            Light3SkinnedTech = FX.GetTechniqueByName("Light3Skinned");

            Light0TexSkinnedTech = FX.GetTechniqueByName("Light0TexSkinned");
            Light1TexSkinnedTech = FX.GetTechniqueByName("Light1TexSkinned");
            Light2TexSkinnedTech = FX.GetTechniqueByName("Light2TexSkinned");
            Light3TexSkinnedTech = FX.GetTechniqueByName("Light3TexSkinned");

            Light0TexAlphaClipSkinnedTech = FX.GetTechniqueByName("Light0TexAlphaClipSkinned");
            Light1TexAlphaClipSkinnedTech = FX.GetTechniqueByName("Light1TexAlphaClipSkinned");
            Light2TexAlphaClipSkinnedTech = FX.GetTechniqueByName("Light2TexAlphaClipSkinned");
            Light3TexAlphaClipSkinnedTech = FX.GetTechniqueByName("Light3TexAlphaClipSkinned");

            Light1FogSkinnedTech = FX.GetTechniqueByName("Light1FogSkinned");
            Light2FogSkinnedTech = FX.GetTechniqueByName("Light2FogSkinned");
            Light3FogSkinnedTech = FX.GetTechniqueByName("Light3FogSkinned");

            Light0TexFogSkinnedTech = FX.GetTechniqueByName("Light0TexFogSkinned");
            Light1TexFogSkinnedTech = FX.GetTechniqueByName("Light1TexFogSkinned");
            Light2TexFogSkinnedTech = FX.GetTechniqueByName("Light2TexFogSkinned");
            Light3TexFogSkinnedTech = FX.GetTechniqueByName("Light3TexFogSkinned");

            Light0TexAlphaClipFogSkinnedTech = FX.GetTechniqueByName("Light0TexAlphaClipFogSkinned");
            Light1TexAlphaClipFogSkinnedTech = FX.GetTechniqueByName("Light1TexAlphaClipFogSkinned");
            Light2TexAlphaClipFogSkinnedTech = FX.GetTechniqueByName("Light2TexAlphaClipFogSkinned");
            Light3TexAlphaClipFogSkinnedTech = FX.GetTechniqueByName("Light3TexAlphaClipFogSkinned");

            Light1ReflectSkinnedTech = FX.GetTechniqueByName("Light1ReflectSkinned");
            Light2ReflectSkinnedTech = FX.GetTechniqueByName("Light2ReflectSkinned");
            Light3ReflectSkinnedTech = FX.GetTechniqueByName("Light3ReflectSkinned");

            Light0TexReflectSkinnedTech = FX.GetTechniqueByName("Light0TexReflectSkinned");
            Light1TexReflectSkinnedTech = FX.GetTechniqueByName("Light1TexReflectSkinned");
            Light2TexReflectSkinnedTech = FX.GetTechniqueByName("Light2TexReflectSkinned");
            Light3TexReflectSkinnedTech = FX.GetTechniqueByName("Light3TexReflectSkinned");

            Light0TexAlphaClipReflectSkinnedTech = FX.GetTechniqueByName("Light0TexAlphaClipReflectSkinned");
            Light1TexAlphaClipReflectSkinnedTech = FX.GetTechniqueByName("Light1TexAlphaClipReflectSkinned");
            Light2TexAlphaClipReflectSkinnedTech = FX.GetTechniqueByName("Light2TexAlphaClipReflectSkinned");
            Light3TexAlphaClipReflectSkinnedTech = FX.GetTechniqueByName("Light3TexAlphaClipReflectSkinned");

            Light1FogReflectSkinnedTech = FX.GetTechniqueByName("Light1FogReflectSkinned");
            Light2FogReflectSkinnedTech = FX.GetTechniqueByName("Light2FogReflectSkinned");
            Light3FogReflectSkinnedTech = FX.GetTechniqueByName("Light3FogReflectSkinned");

            Light0TexFogReflectSkinnedTech = FX.GetTechniqueByName("Light0TexFogReflectSkinned");
            Light1TexFogReflectSkinnedTech = FX.GetTechniqueByName("Light1TexFogReflectSkinned");
            Light2TexFogReflectSkinnedTech = FX.GetTechniqueByName("Light2TexFogReflectSkinned");
            Light3TexFogReflectSkinnedTech = FX.GetTechniqueByName("Light3TexFogReflectSkinned");

            Light0TexAlphaClipFogReflectSkinnedTech = FX.GetTechniqueByName("Light0TexAlphaClipFogReflectSkinned");
            Light1TexAlphaClipFogReflectSkinnedTech = FX.GetTechniqueByName("Light1TexAlphaClipFogReflectSkinned");
            Light2TexAlphaClipFogReflectSkinnedTech = FX.GetTechniqueByName("Light2TexAlphaClipFogReflectSkinned");
            Light3TexAlphaClipFogReflectSkinnedTech = FX.GetTechniqueByName("Light3TexAlphaClipFogReflectSkinned");

            _worldViewProj     = FX.GetVariableByName("gWorldViewProj").AsMatrix();
            _world             = FX.GetVariableByName("gWorld").AsMatrix();
            _worldInvTranspose = FX.GetVariableByName("gWorldInvTranspose").AsMatrix();
            _texTransform      = FX.GetVariableByName("gTexTransform").AsMatrix();
            _eyePosW           = FX.GetVariableByName("gEyePosW").AsVector();

            _fogColor = FX.GetVariableByName("gFogColor").AsVector();
            _fogStart = FX.GetVariableByName("gFogStart").AsScalar();
            _fogRange = FX.GetVariableByName("gFogRange").AsScalar();

            _dirLights  = FX.GetVariableByName("gDirLights");
            _mat        = FX.GetVariableByName("gMaterial");
            _diffuseMap = FX.GetVariableByName("gDiffuseMap").AsResource();
            _shadowMap  = FX.GetVariableByName("gShadowMap").AsResource();
            _cubeMap    = FX.GetVariableByName("gCubeMap").AsResource();

            _boneTransforms = FX.GetVariableByName("gBoneTransforms").AsMatrix();

            _shadowTransform = FX.GetVariableByName("gShadowTransform").AsMatrix();

            _ssaoMap = FX.GetVariableByName("gSsaoMap").AsResource();

            _worldViewProjTex = FX.GetVariableByName("gWorldViewProjTex").AsMatrix();
        }
示例#16
0
 public ColorEffect(Device device, string filename) : base(device, filename)
 {
     ColorTech = FX.GetTechniqueByName("ColorTech");
     _wvp      = FX.GetVariableByName("gWorldViewProj").AsMatrix();
 }