Click or drag to resize
Ab4d.SharpEngine logo

TextureFactoryCreateGradientTexture(VulkanDevice, Color4, Color4, Int32, Boolean, String) Method

Create a texture with color gradient between two specified colors.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntax
C#
public static GpuImage CreateGradientTexture(
	VulkanDevice gpuDevice,
	Color4 startColor,
	Color4 endColor,
	int textureSize = 256,
	bool isHorizontal = true,
	string? name = null
)

Parameters

gpuDevice  VulkanDevice
Target GPU device.
startColor  Color4
First color of the color gradient.
endColor  Color4
Second color of the color gradient.
textureSize  Int32  (Optional)
Width (when isHorizontal is true) or Height (when isHorizontal is false) of the generated texture.
isHorizontal  Boolean  (Optional)
true to create a horizontal texture (size: textureSize x 1); false to create a vertical texture (size: 1 x textureSize).
name  String  (Optional)
Optional name.

Return Value

GpuImage
Generated texture.
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.TextureFactory.CreateGradientTexture(Ab4d.SharpEngine.Vulkan.VulkanDevice,Ab4d.SharpEngine.Common.Color4,Ab4d.SharpEngine.Common.Color4,System.Int32,System.Boolean,System.String)"]

See Also