|
325 | 325 | <method name="linear_to_srgb"> |
326 | 326 | <return type="void" /> |
327 | 327 | <description> |
328 | | - Converts the entire image from the linear colorspace to the sRGB colorspace. Only works on images with [constant FORMAT_RGB8] or [constant FORMAT_RGBA8] formats. |
| 328 | + Converts the entire image from linear encoding to nonlinear sRGB encoding by using a lookup table. Only works on images with [constant FORMAT_RGB8] or [constant FORMAT_RGBA8] formats. |
329 | 329 | </description> |
330 | 330 | </method> |
331 | 331 | <method name="load"> |
|
450 | 450 | <method name="rgbe_to_srgb"> |
451 | 451 | <return type="Image" /> |
452 | 452 | <description> |
453 | | - Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. |
| 453 | + Converts a standard linear RGBE (Red Green Blue Exponent) image to an image that uses nonlinear sRGB encoding. |
454 | 454 | </description> |
455 | 455 | </method> |
456 | 456 | <method name="rotate_90"> |
|
618 | 618 | <method name="srgb_to_linear"> |
619 | 619 | <return type="void" /> |
620 | 620 | <description> |
621 | | - Converts the raw data from the sRGB colorspace to a linear scale. Only works on images with [constant FORMAT_RGB8] or [constant FORMAT_RGBA8] formats. |
| 621 | + Converts the raw data from nonlinear sRGB encoding to linear encoding using a lookup table. Only works on images with [constant FORMAT_RGB8] or [constant FORMAT_RGBA8] formats. |
| 622 | + [b]Note:[/b] The 8-bit formats required by this method are not suitable for storing linearly encoded values; a significant amount of color information will be lost in darker values. To maintain image quality, this method should not be used. |
622 | 623 | </description> |
623 | 624 | </method> |
624 | 625 | </methods> |
|
648 | 649 | </constant> |
649 | 650 | <constant name="FORMAT_RGB8" value="4" enum="Format"> |
650 | 651 | OpenGL texture format [code]RGB[/code] with three components, each with a bitdepth of 8. |
651 | | - [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. |
| 652 | + [b]Note:[/b] When creating an [ImageTexture], a nonlinear sRGB to linear encoding conversion is performed. |
652 | 653 | </constant> |
653 | 654 | <constant name="FORMAT_RGBA8" value="5" enum="Format"> |
654 | 655 | OpenGL texture format [code]RGBA[/code] with four components, each with a bitdepth of 8. |
655 | | - [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. |
| 656 | + [b]Note:[/b] When creating an [ImageTexture], a nonlinear sRGB to linear encoding conversion is performed. |
656 | 657 | </constant> |
657 | 658 | <constant name="FORMAT_RGBA4444" value="6" enum="Format"> |
658 | 659 | OpenGL texture format [code]RGBA[/code] with four components, each with a bitdepth of 4. |
|
689 | 690 | </constant> |
690 | 691 | <constant name="FORMAT_DXT1" value="17" enum="Format"> |
691 | 692 | The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. |
692 | | - [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. |
| 693 | + [b]Note:[/b] When creating an [ImageTexture], a nonlinear sRGB to linear encoding conversion is performed. |
693 | 694 | </constant> |
694 | 695 | <constant name="FORMAT_DXT3" value="18" enum="Format"> |
695 | 696 | The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. |
696 | | - [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. |
| 697 | + [b]Note:[/b] When creating an [ImageTexture], a nonlinear sRGB to linear encoding conversion is performed. |
697 | 698 | </constant> |
698 | 699 | <constant name="FORMAT_DXT5" value="19" enum="Format"> |
699 | 700 | The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparent gradients compared to DXT3. |
700 | | - [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. |
| 701 | + [b]Note:[/b] When creating an [ImageTexture], a nonlinear sRGB to linear encoding conversion is performed. |
701 | 702 | </constant> |
702 | 703 | <constant name="FORMAT_RGTC_R" value="20" enum="Format"> |
703 | 704 | Texture format that uses [url=https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression]Red Green Texture Compression[/url], normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. |
|
707 | 708 | </constant> |
708 | 709 | <constant name="FORMAT_BPTC_RGBA" value="22" enum="Format"> |
709 | 710 | Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned normalized RGBA components. |
710 | | - [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. |
| 711 | + [b]Note:[/b] When creating an [ImageTexture], a nonlinear sRGB to linear encoding conversion is performed. |
711 | 712 | </constant> |
712 | 713 | <constant name="FORMAT_BPTC_RGBF" value="23" enum="Format"> |
713 | 714 | Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with signed floating-point RGB components. |
|
732 | 733 | </constant> |
733 | 734 | <constant name="FORMAT_ETC2_RGB8" value="30" enum="Format"> |
734 | 735 | [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8[/code] variant), which is a follow-up of ETC1 and compresses RGB888 data. |
735 | | - [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. |
| 736 | + [b]Note:[/b] When creating an [ImageTexture], a nonlinear sRGB to linear encoding conversion is performed. |
736 | 737 | </constant> |
737 | 738 | <constant name="FORMAT_ETC2_RGBA8" value="31" enum="Format"> |
738 | 739 | [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGBA8[/code]variant), which compresses RGBA8888 data with full alpha support. |
739 | | - [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. |
| 740 | + [b]Note:[/b] When creating an [ImageTexture], a nonlinear sRGB to linear encoding conversion is performed. |
740 | 741 | </constant> |
741 | 742 | <constant name="FORMAT_ETC2_RGB8A1" value="32" enum="Format"> |
742 | 743 | [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8_PUNCHTHROUGH_ALPHA1[/code] variant), which compresses RGBA data to make alpha either fully transparent or fully opaque. |
743 | | - [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. |
| 744 | + [b]Note:[/b] When creating an [ImageTexture], a nonlinear sRGB to linear encoding conversion is performed. |
744 | 745 | </constant> |
745 | 746 | <constant name="FORMAT_ETC2_RA_AS_RG" value="33" enum="Format"> |
746 | 747 | [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGBA8[/code] variant), which compresses RA data and interprets it as two channels (red and green). See also [constant FORMAT_ETC2_RGBA8]. |
|
831 | 832 | Source texture (before compression) is a regular texture. Default for all textures. |
832 | 833 | </constant> |
833 | 834 | <constant name="COMPRESS_SOURCE_SRGB" value="1" enum="CompressSource"> |
834 | | - Source texture (before compression) is in sRGB space. |
| 835 | + Source texture (before compression) uses nonlinear sRGB encoding. |
835 | 836 | </constant> |
836 | 837 | <constant name="COMPRESS_SOURCE_NORMAL" value="2" enum="CompressSource"> |
837 | 838 | Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). |
|
0 commit comments