reckfellENGINE

CurveTexture

A one-pixel-high data strip generated from Curve.

On this page
class CurveTextureReckfellSharpInherits Texture2D

CurveTexture generates a float texture: one value in RGBF or RF via TextureMode. Assign Curve sources and Width (32…4096). Sources are shared references whose Changed notification regenerates pixels; an absent curve supplies a zero channel. Values above 1 survive without a separate HDR flag.

Sampling uses Curve.SampleBaked(i/Width), not i/(Width−1). The final pixel does not sample exactly 1. Prepare a 0…1 Curve domain for a full-range lookup: other domains are not automatically remapped. No mipmaps are generated.

In the current implementation inherited GetImage() returns null even when GPU pixels exist. For occasional diagnostics obtain an Image through RenderingServer.Texture2DGet(texture.GetRid()); dispose the returned Image after use. Avoid per-frame GPU readbacks. Editing source BakeResolution requires EmitChanged() to refresh the texture.

GPU data, shared-source updates and resource persistence were checked in Windows Forward+/Vulkan. This run does not establish shader sampling, performance or graphics quality.

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

Constructors1

CurveTextureConstructor
# CurveTexture
C#
public CurveTexture();

Creates a width-256 strip with no Curve sources. Construction does not guarantee initialized pixels before the first update.

Properties3

CurveProperty
# Curve
C#
public Curve Curve { get; set; }

A shared Curve reference, initially null. Its Changed notification regenerates pixels. Null fills the channel with zero. Sampling always uses 0…1 even when the Curve domain differs.

TextureModeProperty
# TextureMode
C#
public CurveTexture.TextureModeEnum TextureMode { get; set; }

Rgb by default: RGBF with the same value in all three channels. Red uses single-channel RF. Float data retains values above 1; the mode does not enable glow.

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

Strip width 32…4096, initially 256; height is always 1. Samples use i/Width, so the final pixel does not reach coordinate 1. No mipmaps are generated.

Methods5

GetCurveCurve
# GetCurve
C#
public Curve GetCurve();

A shared Curve reference, initially null. Its Changed notification regenerates pixels. Null fills the channel with zero. Sampling always uses 0…1 even when the Curve domain differs.

Returns Curve

The current shared Curve or null, not a copy.

GetTextureModeCurveTexture.TextureModeEnum
# GetTextureMode
C#
public CurveTexture.TextureModeEnum GetTextureMode();

Rgb by default: RGBF with the same value in all three channels. Red uses single-channel RF. Float data retains values above 1; the mode does not enable glow.

Returns CurveTexture.TextureModeEnum

Rgb by default: RGBF with the same value in all three channels. Red uses single-channel RF. Float data retains values above 1; the mode does not enable glow.

SetCurvevoid
# SetCurve
C#
public void SetCurve(Curve curve);

A shared Curve reference, initially null. Its Changed notification regenerates pixels. Null fills the channel with zero. Sampling always uses 0…1 even when the Curve domain differs.

Parameters
NameTypeDefault
curveCurve—
curve

A shared Curve reference, initially null. Its Changed notification regenerates pixels. Null fills the channel with zero. Sampling always uses 0…1 even when the Curve domain differs.

SetTextureModevoid
# SetTextureMode
C#
public void SetTextureMode(CurveTexture.TextureModeEnum textureMode);

Rgb by default: RGBF with the same value in all three channels. Red uses single-channel RF. Float data retains values above 1; the mode does not enable glow.

Parameters
NameTypeDefault
textureModeCurveTexture.TextureModeEnum—
textureMode

Rgb by default: RGBF with the same value in all three channels. Red uses single-channel RF. Float data retains values above 1; the mode does not enable glow.

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

Strip width 32…4096, initially 256; height is always 1. Samples use i/Width, so the final pixel does not reach coordinate 1. No mipmaps are generated.

Parameters
NameTypeDefault
widthint—
width

Strip width 32…4096, initially 256; height is always 1. Samples use i/Width, so the final pixel does not reach coordinate 1. No mipmaps are generated.

CurveTexture.TextureModeEnum

ValueDescription
Red = 1

Store the curve only in the red channel. This saves video memory, but some custom shaders may not be able to work with this.

Rgb = 0

Store the curve equally across the red, green and blue channels. This uses more video memory, but is more compatible with shaders that only read the green and blue values.

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.