载入中...
搜索中...
未找到
ProceduralDecal.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4#include "common/Result.h"
5
6#include <array>
7#include <cstdint>
8#include <string_view>
9#include <vector>
10
11namespace eve::decal {
12
14enum class DecalPattern : std::uint8_t {
15 Spots,
16 Cracks,
17 Streaks,
18 Puddle,
19 Grunge,
20};
21
29 bool enabled = true;
31 std::uint32_t seed = 1;
33 bool invertMask = false;
34 float amount = 0.65f;
35 float scale = 5.f;
36 float rotation = 0.f;
37 float blur = 0.08f;
38 float contrast = 1.4f;
39 std::array<float, 3> color{0.35f, 0.12f, 0.06f};
40 float colorVariation = 0.15f;
41 float hueVariation = 0.f;
42 float roughness = 0.7f;
43 float roughnessVariation = 0.1f;
44 float metallic = 0.f;
45 float emissive = 0.f;
46 float normalStrength = 2.f;
47 float normalSoftness = 0.08f;
48 float normalTrim = 0.f;
49 float normalThickness = 1.f;
50 int normalStyle = 0;
51 float height = 0.5f;
52};
53
59 static constexpr std::uint32_t kSchemaVersion = 2;
61 int width = 256;
62 int height = 256;
63 std::uint32_t seed = 1;
66 float layerHeightBlend = 0.5f;
67 float layerBalance = 0.5f;
69 float opacity = 1.f;
70};
71
81 int width = 0;
82 int height = 0;
83 std::vector<std::uint8_t> albedo;
84 std::vector<std::uint8_t> normal;
85 std::vector<std::uint8_t> params;
86};
87
98 std::uint32_t seed = 1);
99
110
120
121} // namespace eve::decal
#define EVENGINE_API_WORLD
Definition Export.h:109
std::string name
std::uint32_t seed
Definition PointSet.cpp:807
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Result< ProceduralDecalBake > bakeProceduralDecal(const ProceduralDecalRecipe &recipe)
Bake a two-layer decal recipe into renderer-ready texture bytes.
Result< ProceduralDecalRecipe > proceduralDecalPreset(std::string_view name, std::uint32_t seed)
Build a deterministic preset recipe.
DecalPattern
Built-in procedural masks used by a procedural decal layer.
Result< ProceduralDecalRecipe > importProceduralDecalSbsprs(std::string_view xml)
Import one Substance .sbsprs preset into the native version-two recipe.
Owning, renderer-neutral output of one decal bake.
std::vector< std::uint8_t > albedo
std::vector< std::uint8_t > params
std::vector< std::uint8_t > normal
One independently art-directed layer of a procedural decal recipe.
Versioned two-layer authoring recipe analogous to Procedural Decal's Standard graph and material-inst...
static constexpr std::uint32_t kSchemaVersion