private Internal_CreateRenderTexture ( [ rt ) : void | ||
rt | [ | |
Résultat | void |
/// <summary> /// <para>Creates a new RenderTexture object.</para> /// </summary> /// <param name="width">Texture width in pixels.</param> /// <param name="height">Texture height in pixels.</param> /// <param name="depth">Number of bits in depth buffer (0, 16 or 24). Note that only 24 bit depth has stencil buffer.</param> /// <param name="format">Texture color format.</param> /// <param name="readWrite">How or if color space conversions should be done on texture read/write.</param> public RenderTexture(int width, int height, int depth) { RenderTexture.Internal_CreateRenderTexture(this); this.width = width; this.height = height; this.depth = depth; this.format = RenderTextureFormat.Default; RenderTexture.Internal_SetSRGBReadWrite(this, QualitySettings.activeColorSpace == ColorSpace.Linear); }
public RenderTexture(RenderTexture textureToCopy) { if (textureToCopy == null) { throw new ArgumentNullException("textureToCopy"); } RenderTexture.ValidateRenderTextureDesc(textureToCopy.descriptor); RenderTexture.Internal_CreateRenderTexture(this); this.SetRenderTextureDescriptor(textureToCopy.descriptor); }
/// <summary> /// <para>Creates a new RenderTexture object.</para> /// </summary> /// <param name="width">Texture width in pixels.</param> /// <param name="height">Texture height in pixels.</param> /// <param name="depth">Number of bits in depth buffer (0, 16 or 24). Note that only 24 bit depth has stencil buffer.</param> /// <param name="format">Texture color format.</param> /// <param name="readWrite">How or if color space conversions should be done on texture read/write.</param> public RenderTexture(int width, int height, int depth, RenderTextureFormat format, RenderTextureReadWrite readWrite) { RenderTexture.Internal_CreateRenderTexture(this); this.width = width; this.height = height; this.depth = depth; this.format = format; bool sRGB = readWrite == RenderTextureReadWrite.sRGB; if (readWrite == RenderTextureReadWrite.Default) { sRGB = (QualitySettings.activeColorSpace == ColorSpace.Linear); } RenderTexture.Internal_SetSRGBReadWrite(this, sRGB); }
public RenderTexture(RenderTextureDescriptor desc) { RenderTexture.ValidateRenderTextureDesc(desc); RenderTexture.Internal_CreateRenderTexture(this); this.SetRenderTextureDescriptor(desc); }