载入中...
搜索中...
未找到
ColorRamp.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include <cstdint>
6#include <vector>
7
8namespace eve::procgen {
9
11struct Rgba8 {
12 uint8_t r = 0, g = 0, b = 0, a = 255;
13};
14
18 struct Stop {
19 float t = 0.f;
21 };
22
23 std::vector<Stop> stops;
24
26 void add(float t, uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255);
28 Rgba8 sample(float t) const;
30 Rgba8 sampleBanded(float t, int bands) const;
31};
32
33} // namespace eve::procgen
#define EVENGINE_API_DOMAINS
Definition Export.h:110
tensor::Graph g
Definition GpuGraph.cpp:7
double r
MeleePoint3 b
Definition MeleeHit.cpp:41
MeleePoint3 a
Definition MeleeHit.cpp:40
float t
double sample(const Heightmap &map, double u, double v)
Sample.
Piecewise-linear color ramp in t∈[0,1], with optional hard banding.
Definition ColorRamp.h:16
std::vector< Stop > stops
Definition ColorRamp.h:23
Rgba8 public API.
Definition ColorRamp.h:11