reckfellENGINE

GradientTexture1D

A gradient strip represented by a one-pixel-high Texture2D.

On this page
class GradientTexture1DReckfellSharpInherits Texture2D

Assign Gradient and Width to generate a Texture2D strip with height 1. A new C# instance has Width=256, UseHdr=false and Gradient=null; pixels have not been generated. Use Width of at least 2 for an interpolated strip because sampling uses i/(Width−1).

Changing the shared Gradient automatically queues strip regeneration. GetImage processes a pending update and returns independent data; do not use per-frame GPU readbacks instead of ordinary Texture2D rendering. Increasing Width increases strip sampling resolution, not the Gradient point count. No mipmaps are generated.

UseHdr switches RGBA8 to RGBAF and does not enable scene glow. Assigning Gradient=null does not clear existing generated pixels: assign a valid gradient of the intended color or create a new resource.

Pixels, regeneration, HDR/LDR and RID continuity were checked in Forward+/Vulkan. Shader sampling, Width=1 interpolation, visual quality and performance were not established by this run.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

GradientTexture1DConstructor
# GradientTexture1D
C#
public GradientTexture1D();

Creates a texture with no assigned Gradient and no generated pixels. Default parameter values do not mean an image already exists.

Properties3

GradientProperty
# Gradient
C#
public Gradient Gradient { get; set; }

Color source, null in the C# constructor by default. This is a shared reference, not a copy. Gradient changes queue pixel regeneration; GetImage synchronously handles a pending update. Assigning null disconnects the source but does not clear pixels already created.

UseHdrProperty
# UseHdr
C#
public bool UseHdr { get; set; }

False by default: RGBA8 pixels with 0…1 clamping and quantization. True selects RGBAF and retains extended range, including values above 1. This controls texture data format; it does not independently enable glow or HDR window output.

WidthProperty
# Width
C#
public int Width { get; set; }

Width in pixels, initially 256; height is always 1. The setter accepts 1…16384. Use at least 2 for an interpolated strip: the implementation samples i/(Width−1). This run did not accept Width=1 interpolation.

Methods5

GetGradientGradient
# GetGradient
C#
public Gradient GetGradient();

Returns the value of GradientTexture1D.Gradient.

Returns Gradient

The current Gradient source, or null when unassigned. This is a shared reference, not a copy.

IsUsingHdrbool
# IsUsingHdr
C#
public bool IsUsingHdr();

Returns the value of GradientTexture1D.UseHdr.

Returns bool

The current GradientTexture1D.UseHdr value.

SetGradientvoid
# SetGradient
C#
public void SetGradient(Gradient gradient);

Assigns the value of GradientTexture1D.Gradient.

Parameters
NameTypeDefault
gradientGradient—
gradient

A shared Gradient or null. Null does not remove previously generated pixels.

SetUseHdrvoid
# SetUseHdr
C#
public void SetUseHdr(bool enabled);

Assigns the value of GradientTexture1D.UseHdr.

Parameters
NameTypeDefault
enabledbool—
enabled

True for RGBAF, false for clamped and quantized RGBA8.

SetWidthvoid
# SetWidth
C#
public void SetWidth(int width);

Assigns the value of GradientTexture1D.Width.

Parameters
NameTypeDefault
widthint—
width

Width in pixels within the accepted range; use at least 2 for a GradientTexture1D transition.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.