public PSSMShadowCameraSetup __deref__() { global::System.IntPtr cPtr = OgrePINVOKE.PSSMShadowCameraSetupPtr___deref__(swigCPtr); PSSMShadowCameraSetup ret = (cPtr == global::System.IntPtr.Zero) ? null : new PSSMShadowCameraSetup(cPtr, false); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PSSMShadowCameraSetup obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
void SetupShadows() { sceneMgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED; sceneMgr.SetShadowTextureCountPerLightType(Light.LightTypes.LT_DIRECTIONAL, 3); sceneMgr.ShadowTextureCount = 3; sceneMgr.SetShadowTextureConfig(0, 1024, 1024, PixelFormat.PF_FLOAT32_R); sceneMgr.SetShadowTextureConfig(1, 512, 512, PixelFormat.PF_FLOAT32_R); sceneMgr.SetShadowTextureConfig(2, 512, 512, PixelFormat.PF_FLOAT32_R); sceneMgr.ShadowTextureSelfShadow = true; sceneMgr.ShadowCasterRenderBackFaces = false; sceneMgr.ShadowFarDistance = 150; sceneMgr.SetShadowTextureCasterMaterial("PSSM/shadow_caster"); sceneMgr.SetShadowTextureFadeStart(0.3f); PSSMShadowCameraSetup pssm = new PSSMShadowCameraSetup(); pssm.SplitPadding = 1f; pssm.CalculateSplitPoints(3, 0.0000001f, sceneMgr.ShadowFarDistance); pssm.SetOptimalAdjustFactor(0, 2); pssm.SetOptimalAdjustFactor(1, 1); pssm.SetOptimalAdjustFactor(2, 0.5f); pssm.UseSimpleOptimalAdjust = false; sceneMgr.SetShadowCameraSetup(new ShadowCameraSetupPtr(pssm)); }