2021-10-12 16:22:30 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								<?xml version="1.0" encoding="UTF-8" ?>  
						 
					
						
							
								
									
										
										
										
											2023-07-06 10:08:05 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								<class  name= "GradientTexture2D"  inherits= "Texture2D"  xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation= "../class.xsd" >  
						 
					
						
							
								
									
										
										
										
											2021-10-12 16:22:30 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									<brief_description > 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-24 13:19:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										A 2D texture that creates a pattern with colors obtained from a [Gradient].
							 
						 
					
						
							
								
									
										
										
										
											2021-10-12 16:22:30 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									</brief_description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									<description > 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-08 11:56:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										A 2D texture that obtains colors from a [Gradient] to fill the texture data. This texture is able to transform a color transition into different patterns such as a linear or a radial gradient. The texture is filled by interpolating colors starting from [member fill_from] to [member fill_to] offsets by default, but the gradient fill can be repeated to cover the entire texture.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										The gradient is sampled individually for each pixel so it does not necessarily represent an exact copy of the gradient (see [member width] and [member height]). See also [GradientTexture1D], [CurveTexture] and [CurveXYZTexture].
							 
						 
					
						
							
								
									
										
										
										
											2021-10-12 16:22:30 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									</description> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									<tutorials > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									</tutorials> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									<members > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<member  name= "fill"  type= "int"  setter= "set_fill"  getter= "get_fill"  enum= "GradientTexture2D.Fill"  default= "0" > 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-08 11:56:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											The gradient's fill type.
							 
						 
					
						
							
								
									
										
										
										
											2021-10-12 16:22:30 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										</member> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<member  name= "fill_from"  type= "Vector2"  setter= "set_fill_from"  getter= "get_fill_from"  default= "Vector2(0, 0)" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The initial offset used to fill the texture specified in UV coordinates.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</member> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<member  name= "fill_to"  type= "Vector2"  setter= "set_fill_to"  getter= "get_fill_to"  default= "Vector2(1, 0)" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The final offset used to fill the texture specified in UV coordinates.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</member> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<member  name= "gradient"  type= "Gradient"  setter= "set_gradient"  getter= "get_gradient" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The [Gradient] used to fill the texture.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</member> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<member  name= "height"  type= "int"  setter= "set_height"  getter= "get_height"  default= "64" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The number of vertical color samples that will be obtained from the [Gradient], which also represents the texture's height.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</member> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<member  name= "repeat"  type= "int"  setter= "set_repeat"  getter= "get_repeat"  enum= "GradientTexture2D.Repeat"  default= "0" > 
							 
						 
					
						
							
								
									
										
										
										
											2025-05-08 11:56:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											The gradient's repeat type.
							 
						 
					
						
							
								
									
										
										
										
											2021-10-12 16:22:30 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										</member> 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-09 01:59:49 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										<member  name= "resource_local_to_scene"  type= "bool"  setter= "set_local_to_scene"  getter= "is_local_to_scene"  overrides= "Resource"  default= "false"  /> 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-12 16:22:30 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										<member  name= "use_hdr"  type= "bool"  setter= "set_use_hdr"  getter= "is_using_hdr"  default= "false" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</member> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<member  name= "width"  type= "int"  setter= "set_width"  getter= "get_width"  default= "64" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The number of horizontal color samples that will be obtained from the [Gradient], which also represents the texture's width.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</member> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									</members> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									<constants > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<constant  name= "FILL_LINEAR"  value= "0"  enum= "Fill" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The colors are linearly interpolated in a straight line.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<constant  name= "FILL_RADIAL"  value= "1"  enum= "Fill" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The colors are linearly interpolated in a circular pattern.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-17 02:56:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										<constant  name= "FILL_SQUARE"  value= "2"  enum= "Fill" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The colors are linearly interpolated in a square pattern.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</constant> 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-12 16:22:30 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										<constant  name= "REPEAT_NONE"  value= "0"  enum= "Repeat" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The gradient fill is restricted to the range defined by [member fill_from] to [member fill_to] offsets.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<constant  name= "REPEAT"  value= "1"  enum= "Repeat" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The texture is filled starting from [member fill_from] to [member fill_to] offsets, repeating the same pattern in both directions.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										<constant  name= "REPEAT_MIRROR"  value= "2"  enum= "Repeat" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											The texture is filled starting from [member fill_from] to [member fill_to] offsets, mirroring the pattern in both directions.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										</constant> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									</constants> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								</class>