public void SetSceneBlending(SceneBlendType blendType)
 {
     // load each pass
     for (int i = 0; i < passes.Count; i++)
     {
         ((Pass)passes[i]).SetSceneBlending(blendType);
     }
 }
 public void SetSceneBlending(SceneBlendType blendType)
 {
     // load each technique
     for (int i = 0; i < techniques.Count; i++)
     {
         ((Technique)techniques[i]).SetSceneBlending(blendType);
     }
 }
Example #3
0
 public void setSceneBlending(SceneBlendType sbt)
 {
     OgrePINVOKE.MaterialPtr_setSceneBlending__SWIG_0(swigCPtr, (int)sbt);
     if (OgrePINVOKE.SWIGPendingException.Pending)
     {
         throw OgrePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #4
0
 public void setSeparateSceneBlending(SceneBlendType sbt, SceneBlendType sbta)
 {
     OgrePINVOKE.Technique_setSeparateSceneBlending__SWIG_0(swigCPtr, (int)sbt, (int)sbta);
     if (OgrePINVOKE.SWIGPendingException.Pending)
     {
         throw OgrePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Example #5
0
        /// <summary>
        /// Add ground pass (Use for atmospheric scattering effect on the terrain)
        /// </summary>
        /// <param name="groundPass">Ground pass</param>
        /// <param name="atmosphereRadius">Atmosphere radius (far carmera clip plane, or needed)</param>
        /// <param name="sbt">Scene blend type</param>
        public void AddGroundPass(Pass groundPass, float atmosphereRadius, SceneBlendType sbt)
        {
            groundPass.SetVertexProgram("SkyX_Ground_VP");
            if (this.SkyX.LightingMode == LightingMode.Ldr)
            {
                groundPass.SetFragmentProgram("SkyX_Ground_LDR_FP");
            }
            else
            {
                groundPass.SetFragmentProgram("SkyX_Ground_HDR_FP");
            }
            groundPass.GetVertexProgramParameters().SetNamedConstant("uSkydomeRadius",
                                                                     ((atmosphereRadius == 0) ? this.SkyX.MeshManager.SkydomeRadius : atmosphereRadius) * 10);

            groundPass.LightingEnabled   = false;
            groundPass.DepthCheckEnabled = true;
            groundPass.DepthWriteEnabled = false;

            groundPass.SetSceneBlending(sbt);

            ///TODO
            _groundPasses.Add(groundPass);
            this.SkyX.AtmosphereManager.Update(this.SkyX.AtmosphereManager.Options, true);
        }
Example #6
0
 public void setSceneBlending(SceneBlendType sbt)
 {
     Material_setSceneBlending(resource, sbt);
 }
Example #7
0
		public void SetSceneBlending( SceneBlendType blendType )
		{
			// load each pass
			for ( var i = 0; i < this._passes.Count; i++ )
			{
				this._passes[ i ].SetSceneBlending( blendType );
			}
		}
Example #8
0
 private static extern void Material_setSeparateSceneBlending(IntPtr material, SceneBlendType sbt, SceneBlendType sbta);
Example #9
0
 public void setSceneBlending(SceneBlendType sbt)
 {
     Technique_setSceneBlending(technique, sbt);
 }
Example #10
0
        /// <summary>
        /// Add ground pass (Use for atmospheric scattering effect on the terrain)
        /// </summary>
        /// <param name="groundPass">Ground pass</param>
        /// <param name="atmosphereRadius">Atmosphere radius (far carmera clip plane, or needed)</param>
        /// <param name="sbt">Scene blend type</param>
        public void AddGroundPass(Pass groundPass, float atmosphereRadius, SceneBlendType sbt)
        {
            groundPass.SetVertexProgram("SkyX_Ground_VP");
            if (this.SkyX.LightingMode == LightingMode.Ldr)
            {
                groundPass.SetFragmentProgram("SkyX_Ground_LDR_FP");
            }
            else
            {
                groundPass.SetFragmentProgram("SkyX_Ground_HDR_FP");
            }
            groundPass.GetVertexProgramParameters().SetNamedConstant("uSkydomeRadius",
                ((atmosphereRadius == 0) ? this.SkyX.MeshManager.SkydomeRadius : atmosphereRadius) * 10);

            groundPass.LightingEnabled = false;
            groundPass.DepthCheckEnabled = true;
            groundPass.DepthWriteEnabled = false;

            groundPass.SetSceneBlending(sbt);

            ///TODO
            _groundPasses.Add(groundPass);
            this.SkyX.AtmosphereManager.Update(this.SkyX.AtmosphereManager.Options, true);
        }
Example #11
0
		public void SetSeparateSceneBlending( SceneBlendType sbt, SceneBlendType sbta )
		{
			// Convert types into blend factors
			SceneBlendFactor source;
			SceneBlendFactor dest;
			GetBlendFlags( sbt, out source, out dest );

			SceneBlendFactor sourceAlpha;
			SceneBlendFactor destAlpha;
			GetBlendFlags( sbta, out sourceAlpha, out destAlpha );

			// Set blend factors
			SetSeparateSceneBlending( source, dest, sourceAlpha, destAlpha );
		}
Example #12
0
		public void SetSceneBlending( SceneBlendType type )
		{
			// Convert type into blend factors
			SceneBlendFactor source;
			SceneBlendFactor dest;
			GetBlendFlags( type, out source, out dest );

			// Set blend factors
			SetSceneBlending( source, dest );
		}
Example #13
0
		protected void GetBlendFlags( SceneBlendType type, out SceneBlendFactor source, out SceneBlendFactor dest )
		{
			switch ( type )
			{
				case SceneBlendType.TransparentAlpha:
					source = SceneBlendFactor.SourceAlpha;
					dest = SceneBlendFactor.OneMinusSourceAlpha;
					break;

				case SceneBlendType.TransparentColor:
					source = SceneBlendFactor.SourceColor;
					dest = SceneBlendFactor.OneMinusSourceColor;
					break;

				case SceneBlendType.Modulate:
					source = SceneBlendFactor.DestColor;
					dest = SceneBlendFactor.Zero;
					break;

				case SceneBlendType.Add:
					source = SceneBlendFactor.One;
					dest = SceneBlendFactor.One;
					break;

				case SceneBlendType.Replace:
					source = SceneBlendFactor.One;
					dest = SceneBlendFactor.Zero;
					break;

				default:
					throw new AxiomException( "Invalid SceneBlendType {0}", type );
			}
		}
Example #14
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pass"></param>
        /// <param name="atmosphereRadius"></param>
        /// <param name="blendType"></param>
        public void AddGroundPass(Pass pass, float atmosphereRadius, SceneBlendType blendType)
        {
            IntPtr nativePassHandle = ReflectionHelper.GetFieldPointer(pass, "_native");

            GPUManager_AddGroundPass(NativeHandle, nativePassHandle, atmosphereRadius, blendType);
        }
Example #15
0
 public void setSeparateSceneBlending(SceneBlendType sbt, SceneBlendType sbta)
 {
     Material_setSeparateSceneBlending(resource, sbt, sbta);
 }
Example #16
0
 private static extern void Material_setSceneBlending(IntPtr material, SceneBlendType sbt);
Example #17
0
 public void setSeparateSceneBlending(SceneBlendType sbt, SceneBlendType sbta)
 {
     Technique_setSeparateSceneBlending(technique, sbt, sbta);
 }
Example #18
0
 private static extern void Technique_setSeparateSceneBlending(IntPtr technique, SceneBlendType sbt, SceneBlendType sbta);
Example #19
0
 public void setSceneBlending(SceneBlendType sbt)
 {
     Pass_setSceneBlending(pass, sbt);
 }
Example #20
0
		public void SetSeparateSceneBlending( SceneBlendType sbt, SceneBlendType sbta )
		{
			for ( var i = 0; i < this._passes.Count; i++ )
			{
				this._passes[ i ].SetSeparateSceneBlending( sbt, sbta );
			}
		}
Example #21
0
 public void setSeparateSceneBlending(SceneBlendType sbt, SceneBlendType sbta)
 {
     Pass_setSeparateSceneBlending(pass, sbt, sbta);
 }
Example #22
0
		public void SetSceneBlending( SceneBlendType blendType )
		{
			// load each pass
			for ( int i = 0; i < _passes.Count; i++ )
			{
				( (Pass)_passes[ i ] ).SetSceneBlending( blendType );
			}
		}
Example #23
0
 private static extern void Pass_setSceneBlending(IntPtr pass, SceneBlendType sbt);
Example #24
0
		public void addMaterial( string mat,
									 ColorEx clr,
									 SceneBlendType sbt )
		{
			if ( init )
				return;
			else
				init = true;

			Material matptr = (Material)MaterialManager.Instance.Create( mat, "General" );
			matptr.ReceiveShadows = false;
			matptr.GetTechnique( 0 ).LightingEnabled = true;
			matptr.GetTechnique( 0 ).GetPass( 0 ).Diffuse = clr;
			matptr.GetTechnique( 0 ).GetPass( 0 ).Ambient = clr;
			matptr.GetTechnique( 0 ).GetPass( 0 ).SelfIllumination = clr;
			matptr.GetTechnique( 0 ).GetPass( 0 ).SetSceneBlending( sbt );
			matptr.GetTechnique( 0 ).GetPass( 0 ).LightingEnabled = false;
			matptr.GetTechnique( 0 ).GetPass( 0 ).VertexColorTracking = TrackVertexColor.Diffuse;
		}
Example #25
0
 private static extern void Pass_setSeparateSceneBlending(IntPtr pass, SceneBlendType sbt, SceneBlendType sbta);
Example #26
0
		/// <summary>
		///    Sets the kind of blending this pass has with the existing contents of the scene.
		/// </summary>
		/// <remarks>
		///    Whereas the texture blending operations seen in the TextureUnitState class are concerned with
		///    blending between texture layers, this blending is about combining the output of the Pass
		///    as a whole with the existing contents of the rendering target. This blending therefore allows
		///    object transparency and other special effects. If all passes in a technique have a scene
		///    blend, then the whole technique is considered to be transparent.
		///    <p/>
		///    This method allows you to select one of a number of predefined blending types. If you require more
		///    control than this, use the alternative version of this method which allows you to specify source and
		///    destination blend factors.
		///    <p/>
		///    This method is applicable for both the fixed-function and programmable pipelines.
		/// </remarks>
		/// <param name="type">One of the predefined SceneBlendType blending types.</param>
		public void SetSceneBlending( SceneBlendType type )
		{
			// convert canned blending types into blending factors
			switch ( type )
			{
				case SceneBlendType.Add:
					SetSceneBlending( SceneBlendFactor.One, SceneBlendFactor.One );
					break;
				case SceneBlendType.TransparentAlpha:
					SetSceneBlending( SceneBlendFactor.SourceAlpha, SceneBlendFactor.OneMinusSourceAlpha );
					break;
				case SceneBlendType.TransparentColor:
					SetSceneBlending( SceneBlendFactor.SourceColor, SceneBlendFactor.OneMinusSourceColor );
					break;
				case SceneBlendType.Modulate:
					SetSceneBlending( SceneBlendFactor.DestColor, SceneBlendFactor.Zero );
					break;
			}
		}
 public void SetSceneBlending(SceneBlendType blendType)
 {
     // load each technique
     for(int i = 0; i < techniques.Count; i++) {
         ((Technique)techniques[i]).SetSceneBlending(blendType);
     }
 }