예제 #1
0
 public ShadowMappingEffect(Device device, HashTableSettings settings, ushort lod)
     : base("Shadow Map", device, settings, 0, 3, lod)
 {
     efxType  = EffectType.Shading;
     oReqs[0] = new OutputRequirements(DeviceType.Hardware, true, new Version(1, 1), new Version(1, 1));
     oReqs[1] = new OutputRequirements(DeviceType.Hardware, true, new Version(1, 1), new Version(2, 0));
 }
예제 #2
0
        private void DoChangeEffect(Effect effect)
        {
            currentEffect = effect;

            uiEffectPropGroup.Enabled = (effect != null && effect.available);
            if (effect != null)
            {
                // load reqs
                OutputRequirements[] oReqs = effect.effect.GetDeviceRequirements();
                OutputRequirements   oReq  = effect.effect.GetDeviceRequirements(effect.settings);
                int reqMaxIdx = oReqs.Length - 1;

                uiEfxVSReqs.MinReqValue = oReqs[0].VertexShader.Major;
                uiEfxVSReqs.MaxReqValue = oReqs[reqMaxIdx].VertexShader.Major;
                uiEfxVSReqs.ActualValue = oReq.VertexShader.Major;
                uiEfxVSReqs.UpdateLayout();

                uiEfxPSReqs.MinReqValue = oReqs[0].PixelShader.Major;
                uiEfxPSReqs.MaxReqValue = oReqs[reqMaxIdx].PixelShader.Major;
                uiEfxPSReqs.ActualValue = oReq.PixelShader.Major;
                uiEfxPSReqs.UpdateLayout();

                if (effect.available)
                {
                    // load settings
                    uiEffectPropGroup.Enabled = true;
                    uiEffectLOD.SetupValues(effect.effect.LODRange, effect.effect.LOD);
                }
            }
        }
 public PPixelLightEffect(Device device, HashTableSettings settings, ushort lod)
     : base("Adv. Lighting", device, settings, 0, 1, lod)
 {
     efxType  = EffectType.Shading;
     oReqs[0] = new OutputRequirements(DeviceType.Hardware, true, new Version(1, 1), new Version(1, 1));
     oReqs[1] = new OutputRequirements(DeviceType.Hardware, true, new Version(1, 1), new Version(2, 0));
 }
예제 #4
0
//        Texture testTexture;

        public BloomEffect(Device device, HashTableSettings settings)
            : base("Bloom", device, settings, 0, 0, 0)
        {
            efxType  = EffectType.Shading;
            oReqs[0] = new OutputRequirements(DeviceType.Hardware, true, new Version(2, 0), new Version(1, 1));

            this.numPasses = 4;
        }
예제 #5
0
        public RenderingContext3DDX9(Control targetRenderArea, OutputRequirements oRequirements,
                                     OutputRequirements oMinReqs, CommonDeviceInterface cdi)
        {
            isDeviceLost = false;
            isActive     = false;
            hasFocus     = false;

            this.targetRenderArea = targetRenderArea;
            outReqs    = oRequirements;
            outMinReqs = oMinReqs;
            log        = cdi.GeneralLog;

            presentParams = new PresentParameters();
            outCaps       = cdi.DeviceCaps;

            layers = new LayerStack();

            InitializeEnvironment(cdi);

            view3D = new RenderingView3DPer(Matrix.Identity, Matrix.Identity);
        }
예제 #6
0
        private void FillRequirements(Scheme scheme)
        {
            if (scheme == null)
            {
                requirementGague1.Enabled = false;
                requirementGague2.Enabled = false;
            }
            else
            {
                RequirementsCompatibility rComp = scheme.compatibility;
                OutputRequirements        oReqs = scheme.scheme.DeviceRequirements;

                if (oReqs.VertexShader != null)
                {
                    requirementGague1.MinReqValue = oReqs.VertexShader.Major;
                    requirementGague1.MaxReqValue = oReqs.VertexShader.Major;
                    requirementGague1.ActualValue = outCaps.VertexShaderVersion.Major;
                    requirementGague1.Enabled     = true;
                    requirementGague1.UpdateLayout();
                }
                else
                {
                    requirementGague1.Enabled = false;
                }

                if (oReqs.PixelShader != null)
                {
                    requirementGague2.MaxReqValue = oReqs.PixelShader.Major;
                    requirementGague2.MaxReqValue = oReqs.PixelShader.Major;
                    requirementGague2.ActualValue = outCaps.FragmentShaderVersion.Major;
                    requirementGague2.Enabled     = true;
                    requirementGague2.UpdateLayout();
                }
                else
                {
                    requirementGague2.Enabled = false;
                }
            }
        }
 public PerlinImprovedNoiseEffect(Device device, HashTableSettings settings)
     : base("Perlin Noise", device, settings, 0, 0, 0)
 {
     efxType  = EffectType.Shading;
     oReqs[0] = new OutputRequirements(DeviceType.Hardware, true, new Version(1, 1), new Version(2, 1));
 }