public RenderTexture(RenderTexture textureToCopy) { if (textureToCopy == null) { throw new ArgumentNullException("textureToCopy"); } RenderTexture.ValidateRenderTextureDesc(textureToCopy.descriptor); RenderTexture.Internal_Create(this); this.SetRenderTextureDescriptor(textureToCopy.descriptor); }
public RenderTexture(int width, int height, int depth, [UnityEngine.Internal.DefaultValue("RenderTextureFormat.Default")] RenderTextureFormat format, [UnityEngine.Internal.DefaultValue("RenderTextureReadWrite.Default")] RenderTextureReadWrite readWrite) { RenderTexture.Internal_Create(this); this.width = width; this.height = height; this.depth = depth; this.format = format; bool flag = QualitySettings.activeColorSpace == ColorSpace.Linear; this.SetSRGBReadWrite((readWrite != RenderTextureReadWrite.Default) ? (readWrite == RenderTextureReadWrite.sRGB) : flag); }
public RenderTexture(int width, int height, int depth, GraphicsFormat format) { bool flag = !base.ValidateFormat(format, FormatUsage.Render); if (!flag) { RenderTexture.Internal_Create(this); this.width = width; this.height = height; this.depth = depth; this.graphicsFormat = format; this.SetSRGBReadWrite(GraphicsFormatUtility.IsSRGBFormat(format)); } }
public RenderTexture(RenderTextureDescriptor desc) { RenderTexture.ValidateRenderTextureDesc(desc); RenderTexture.Internal_Create(this); this.SetRenderTextureDescriptor(desc); }