コード例 #1
0
 /// <summary>Set a shader sampler of type 'TextureSamplerState' by global unique ID, see <see cref="Xen.Graphics.ShaderSystem.ShaderSystemBase.GetNameUniqueID"/> for details.</summary><param name="state"/><param name="id"/><param name="value"/>
 protected override bool SetSamplerStateImpl(Xen.Graphics.ShaderSystem.ShaderSystemBase state, int id, Xen.Graphics.TextureSamplerState value)
 {
     if ((AlphaWrite.gd != state.DeviceUniqueIndex))
     {
         this.WarmShader(state);
     }
     if ((id == AlphaWrite.sid0))
     {
         this.DisplayTextureSampler = value;
         return true;
     }
     return false;
 }
コード例 #2
0
 /// <summary>Set a shader sampler of type 'TextureSamplerState' by global unique ID, see <see cref="Xen.Graphics.ShaderSystem.ShaderSystemBase.GetNameUniqueID"/> for details.</summary><param name="state"/><param name="id"/><param name="value"/>
 protected override bool SetSamplerStateImpl(Xen.Graphics.ShaderSystem.ShaderSystemBase state, int id, Xen.Graphics.TextureSamplerState value)
 {
     if ((Triplanar.gd != state.DeviceUniqueIndex))
     {
         this.WarmShader(state);
     }
     if ((id == Triplanar.sid0))
     {
         this.BottomColorSampler = value;
         return true;
     }
     if ((id == Triplanar.sid1))
     {
         this.BottomNormalSampler = value;
         return true;
     }
     if ((id == Triplanar.sid2))
     {
         this.SideColorSampler = value;
         return true;
     }
     if ((id == Triplanar.sid3))
     {
         this.SideNormalSampler = value;
         return true;
     }
     if ((id == Triplanar.sid4))
     {
         this.TopColorSampler = value;
         return true;
     }
     if ((id == Triplanar.sid5))
     {
         this.TopNormalSampler = value;
         return true;
     }
     return false;
 }