{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.stfform.at/stf.texture.schema.json",
	"title": "STF Texture",
	"description": "Information on how an image is to be converted into a GPU texture.",
	"stfImplementations": {
		"blender": {
			"representingType": "`stf.texture` STF Component on Blender Image",
			"link": "https://codeberg.org/stf_format/stf_blender/src/branch/master/stfblender/stf_resources/stf/stf_texture/stf_texture.py"
		},
		"godot": {
			"representingType": "PortableCompressedTexture2D",
			"link": "https://codeberg.org/stf_format/stf_godot/src/branch/master/addons/stf_godot/resources/stf/STF_Texture.gd"
		},
		"unity": {
			"representingType": "Texture2D",
			"link": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Runtime/Resources/Resources_STF/STF_Texture.cs",
			"extra_links": {
				"Default Processor": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Runtime/Processors/Processors_STF/STF_Texture_Processor.cs"
			}
		}
	},
	"allOf": [{ "$ref": "https://schema.stfform.at/stf.schema.json#/$defs/stf_component_resource" }],
	"properties": {
		"type": {
			"const": "stf.texture"
		},
		"width": {
			"type": "integer",
			"minimum": 1,
			"description": "Width in pixels of the resulting GPU texture."
		},
		"height": {
			"type": "integer",
			"minimum": 1,
			"description": "Height in pixels of the resulting GPU texture."
		},
		"downscale_priority": {
			"type": "integer",
			"minimum": 0,
			"description": "In case of an enforced memory limit, how quickly should the resolution of the resulting GPU texture reduced."
		},
		"quality": {
			"type": "number",
			"minimum": 0,
			"maximum": 1,
			"description": "Indicate how much the GPU texture can be compressed. Value range is from 0 to 1. 1 means not compression should be used."
		},
		"mipmaps": {
			"type": "boolean",
			"default": true,
			"description": "Whether to generate mipmaps."
		}
	},
	"required": [
		"type",
		"width",
		"height",
		"downscale_priority",
		"quality",
		"mipmaps"
	],
	"additionalProperties": false,
	"examples": [
		{
			"type": "stf.texture",
			"width": 1024,
			"height": 1024,
			"downscale_priority": 1,
			"quality": 0.5,
			"mipmaps": true
		}
	]
}