Beispiel #1
0
 public TextureWrapper this[DefaultTexture textureType]
 {
     get
     {
         return textures[textureType];
     }
 }
 private void SetTextureWithDefault(string channelName, string widthName, string heightName, Texture2D texture, DefaultTexture defaultTex)
 {
     if (texture == null)
     {
         if (defaultTex == DefaultTexture.DefaultWhite)
         {
             compute.SetTexture(kernel, channelName, Texture2D.whiteTexture);
             compute.SetFloat(widthName, Texture2D.whiteTexture.width);
             compute.SetFloat(heightName, Texture2D.whiteTexture.height);
         }
         else
         {
             compute.SetTexture(kernel, channelName, Texture2D.blackTexture);
             compute.SetFloat(widthName, Texture2D.blackTexture.width);
             compute.SetFloat(heightName, Texture2D.blackTexture.height);
         }
     }
     else
     {
         compute.SetTexture(kernel, channelName, texture);
         compute.SetFloat(widthName, texture.width);
         compute.SetFloat(heightName, texture.height);
     }
 }
Beispiel #3
0
 /// <summary>
 ///     The Indexer.
 /// </summary>
 /// <param name="textureType">
 ///     The Texture Type.
 /// </param>
 /// <returns>
 ///     The <see cref="TextureWrapper" />.
 /// </returns>
 public TextureWrapper this[DefaultTexture textureType] => this.textures[textureType];
 /// <summary>
 ///     The Indexer.
 /// </summary>
 /// <param name="textureType">
 ///     The Texture Type.
 /// </param>
 /// <returns>
 ///     The <see cref="TextureWrapper" />.
 /// </returns>
 public TextureWrapper this[DefaultTexture textureType] => this.textures[textureType];