当前位置: 首页>>代码示例>>C#>>正文


C# Xen.SetGlobalVector2方法代码示例

本文整理汇总了C#中Xen.SetGlobalVector2方法的典型用法代码示例。如果您正苦于以下问题:C# Xen.SetGlobalVector2方法的具体用法?C# Xen.SetGlobalVector2怎么用?C# Xen.SetGlobalVector2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Xen的用法示例。


在下文中一共展示了Xen.SetGlobalVector2方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BeginImpl

		/// <summary>Bind the shader, 'ic' indicates the shader instance has changed and 'ec' indicates the extension has changed.</summary><param name="state"/><param name="ic"/><param name="ec"/><param name="ext"/>
		protected override void BeginImpl(Xen.Graphics.ShaderSystem.ShaderSystemBase state, bool ic, bool ec, Xen.Graphics.ShaderSystem.ShaderExtension ext)
		{
			// if the device changed, call Warm()
			if ((state.DeviceUniqueIndex != RgbmDecode.gd))
			{
				this.WarmShader(state);
				ic = true;
			}
			// Force updating if the instance has changed
			this.vreg_change = (this.vreg_change | ic);
			this.preg_change = (this.preg_change | ic);
			this.vbreg_change = (this.vbreg_change | ic);
			this.vireg_change = (this.vireg_change | ic);
			// Set the value for attribute 'worldViewProj'
			this.vreg_change = (this.vreg_change | state.SetWorldViewProjectionMatrix(ref this.vreg[0], ref this.vreg[1], ref this.vreg[2], ref this.vreg[3], ref this.sc0));
			// Set the value for global 'BloomScaleThreshold'
			this.preg_change = (this.preg_change | state.SetGlobalVector2(ref this.preg[1], RgbmDecode.gid0, ref this.gc0));
			// Set the value for global 'LensExposure'
			this.preg_change = (this.preg_change | state.SetGlobalSingle(ref this.preg[2], RgbmDecode.gid1, ref this.gc1));
			// Set the value for global 'RgbmImageRenderScale'
			this.preg_change = (this.preg_change | state.SetGlobalVector2(ref this.preg[0], RgbmDecode.gid2, ref this.gc2));
			// Assign pixel shader textures and samplers
			if ((ic | this.ptc))
			{
				state.SetPixelShaderSamplers(this.ptx, this.pts);
				this.ptc = false;
			}
			if ((this.vreg_change == true))
			{
				RgbmDecode.fx.vs_c.SetValue(this.vreg);
				this.vreg_change = false;
				ic = true;
			}
			if ((this.preg_change == true))
			{
				RgbmDecode.fx.ps_c.SetValue(this.preg);
				this.preg_change = false;
				ic = true;
			}
			if ((ext == Xen.Graphics.ShaderSystem.ShaderExtension.Blending))
			{
				ic = (ic | state.SetBlendMatricesDirect(RgbmDecode.fx.vsb_c, ref this.sc1));
			}
			if ((ext == Xen.Graphics.ShaderSystem.ShaderExtension.Instancing))
			{
				this.vireg_change = (this.vireg_change | state.SetViewProjectionMatrix(ref this.vireg[0], ref this.vireg[1], ref this.vireg[2], ref this.vireg[3], ref this.sc2));
				if ((this.vireg_change == true))
				{
					RgbmDecode.fx.vsi_c.SetValue(this.vireg);
					this.vireg_change = false;
					ic = true;
				}
			}
			// Finally, bind the effect
			if ((ic | ec))
			{
				state.SetEffect(this, ref RgbmDecode.fx, ext);
			}
		}
开发者ID:shadarath,项目名称:Wirtualna-rzeczywistosc,代码行数:60,代码来源:Composite.fx.cs

示例2: BeginImpl

 /// <summary>Bind the shader, 'ic' indicates the shader instance has changed and 'ec' indicates the extension has changed.</summary><param name="state"/><param name="ic"/><param name="ec"/><param name="ext"/>
 protected override void BeginImpl(Xen.Graphics.ShaderSystem.ShaderSystemBase state, bool ic, bool ec, Xen.Graphics.ShaderSystem.ShaderExtension ext)
 {
     // if the device changed, call Warm()
     if ((state.DeviceUniqueIndex != Character.gd))
     {
         this.WarmShader(state);
         ic = true;
     }
     // Force updating if the instance has changed
     this.vreg_change = (this.vreg_change | ic);
     this.preg_change = (this.preg_change | ic);
     this.vbreg_change = (this.vbreg_change | ic);
     this.vireg_change = (this.vireg_change | ic);
     // Set the value for attribute 'viewPoint'
     this.vreg_change = (this.vreg_change | state.SetViewPointVector4(ref this.vreg[12], ref this.sc0));
     // Set the value for attribute 'world'
     this.vreg_change = (this.vreg_change | state.SetWorldMatrix(ref this.vreg[8], ref this.vreg[9], ref this.vreg[10], ref this.vreg[11], ref this.sc1));
     // Set the value for attribute 'worldViewProj'
     this.vreg_change = (this.vreg_change | state.SetWorldViewProjectionMatrix(ref this.vreg[4], ref this.vreg[5], ref this.vreg[6], ref this.vreg[7], ref this.sc2));
     // Set the value for global 'ShadowMapProjection'
     this.vreg_change = (this.vreg_change | state.SetGlobalMatrix4(ref this.vreg[0], ref this.vreg[1], ref this.vreg[2], ref this.vreg[3], Character.gid0, ref this.gc0));
     // Set the value for global 'AmbientDiffuseSpecularScale'
     this.preg_change = (this.preg_change | state.SetGlobalVector3(ref this.preg[15], Character.gid1, ref this.gc1));
     // Set the value for global 'EnvironmentSH'
     this.preg_change = (this.preg_change | state.SetGlobalVector4(this.preg, 0, 9, Character.gid2, ref this.gc2));
     // Set the value for global 'RgbmImageRenderScale'
     this.preg_change = (this.preg_change | state.SetGlobalVector2(ref this.preg[9], Character.gid3, ref this.gc3));
     // Set the value for global 'ShadowMapSize'
     this.preg_change = (this.preg_change | state.SetGlobalVector2(ref this.preg[10], Character.gid4, ref this.gc4));
     // Set the value for global 'SkinLightScatter'
     this.preg_change = (this.preg_change | state.SetGlobalVector3(ref this.preg[11], Character.gid5, ref this.gc5));
     // Set the value for global 'SunDirection'
     this.preg_change = (this.preg_change | state.SetGlobalVector3(ref this.preg[13], Character.gid6, ref this.gc6));
     // Set the value for global 'SunRgbIntensity'
     this.preg_change = (this.preg_change | state.SetGlobalVector4(ref this.preg[12], Character.gid7, ref this.gc7));
     // Set the value for global 'SunSpecularPowerIntensity'
     this.preg_change = (this.preg_change | state.SetGlobalVector2(ref this.preg[14], Character.gid8, ref this.gc8));
     // Set the value for global 'UseAlbedoOcclusionShadow'
     this.preg_change = (this.preg_change | state.SetGlobalVector3(ref this.preg[16], Character.gid9, ref this.gc9));
     // Assign global textures
     this.CubeRgbmTexture = state.GetGlobalTextureCube(Character.tid0);
     this.ShadowTexture = state.GetGlobalTexture2D(Character.tid1);
     // Assign pixel shader textures and samplers
     if ((ic | this.ptc))
     {
         state.SetPixelShaderSamplers(this.ptx, this.pts);
         this.ptc = false;
     }
     if ((this.vreg_change == true))
     {
         Character.fx.vs_c.SetValue(this.vreg);
         this.vreg_change = false;
         ic = true;
     }
     if ((this.preg_change == true))
     {
         Character.fx.ps_c.SetValue(this.preg);
         this.preg_change = false;
         ic = true;
     }
     if ((ext == Xen.Graphics.ShaderSystem.ShaderExtension.Blending))
     {
         ic = (ic | state.SetBlendMatricesDirect(Character.fx.vsb_c, ref this.sc3));
     }
     if ((ext == Xen.Graphics.ShaderSystem.ShaderExtension.Instancing))
     {
         this.vireg_change = (this.vireg_change | state.SetViewProjectionMatrix(ref this.vireg[0], ref this.vireg[1], ref this.vireg[2], ref this.vireg[3], ref this.sc4));
         if ((this.vireg_change == true))
         {
             Character.fx.vsi_c.SetValue(this.vireg);
             this.vireg_change = false;
             ic = true;
         }
     }
     // Finally, bind the effect
     if ((ic | ec))
     {
         state.SetEffect(this, ref Character.fx, ext);
     }
 }
开发者ID:apeape,项目名称:Xen-Game-Client,代码行数:81,代码来源:Character.fx.cs


注:本文中的Xen.SetGlobalVector2方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。