载入中...
搜索中...
未找到
TextureRecipe.h
浏览该文件的文档.
24using TextureRecipeFn = std::function<std::unique_ptr<image::ImageData>(const Params ¶ms, std::string &error)>;
98[[nodiscard]] std::unique_ptr<image::ImageData> heightToNormalImage(const std::vector<float> &height, int w, int h,
@ ImageData
Definition AvatarInstance.h:25
Definition EvpackPointGraphLoader.h:12
std::function< std::unique_ptr< image::ImageData >(const Params ¶ms, std::string &error)> TextureRecipeFn
Recipe returns a newly owned RGBA8 image, or null on failure.
Definition TextureRecipe.h:24
RecipeDescriptor makeTextureRecipeDescriptor(const TextureRecipeDef &definition)
Build editable metadata for a texture definition.
Definition TextureRecipe.cpp:88
const std::vector< TextureRecipeDef > & builtinTextureDefs()
All built-in texture definitions (albedo + PBR). Populated lazily.
Definition BuiltinTextures.cpp:940
void paintHeightToImage(image::ImageData &img, const std::vector< float > &height, int w, int h, const ColorRamp &ramp, int bands, int pixelSize)
Paint height to image.
Definition TextureRecipe.cpp:128
void fillHeightField(const TextureGenContext &ctx, const std::function< float(float, float, const NoiseField &)> &fn, std::vector< float > &height)
Sample a height function over the full [w×h] grid into height (clamped to [0,1]).
Definition TextureRecipe.cpp:108
std::unique_ptr< image::ImageData > heightToNormalImage(const std::vector< float > &height, int w, int h, float strength, bool seamless)
Builds a normal-map image and transfers its unique ownership to the caller.
Definition TextureRecipe.cpp:148
Piecewise-linear color ramp in t∈[0,1], with optional hard banding.
Definition ColorRamp.h:16
Deterministic value-noise helpers for pixel textures. When periodX/periodY > 0, lattice wraps for sea...
Definition NoiseField.h:13
PBR surface defaults for a generated material. Every map in a PBR set is derived from the same displa...
Definition TextureRecipe.h:105
Complete metadata and parameter schema shared by every procgen recipe family.
Definition ParamSchema.h:52
static TextureGenContext fromParams(const Params ¶ms)
From params.
Definition TextureRecipe.cpp:63
A procedural texture is fully described by an albedo ramp + a displacement field + PBR knobs....
Definition TextureRecipe.h:122