载入中...
搜索中...
未找到
ShaderResources.h
浏览该文件的文档.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <memory>
6#include <span>
7#include <vector>
8#include "common/Result.h"
10
11namespace eve::graphics {
12
15 R8,
16 RG8,
17 R16,
18 RGBA8,
19 BGRA8,
22 BC1,
23 BC1Srgb,
24 BC3,
25 BC3Srgb,
26 BC7,
27 BC7Srgb,
31};
34
43 std::uint32_t binding = 0;
46 std::uint32_t width = 0, height = 0, layers = 1, mipLevels = 1;
48 std::span<const std::byte> bytes;
53 std::shared_ptr<const void> contentOwner;
58 std::uint32_t depth = 1;
59};
60
68 std::span<const ShaderImageInput> images;
69 std::span<const std::byte> constants;
75 std::span<const std::byte> instanceMatrices;
76};
77
82[[nodiscard]] EVENGINE_API_BACKENDS Result<std::uint32_t> shaderInstanceMatrixCount(std::span<const std::byte> bytes);
83
86 std::uint32_t layer = 0, mip = 0, width = 0, height = 0;
87 std::size_t offset = 0, size = 0;
89 std::uint32_t depth = 1;
90};
91
98 const ShaderImageInput& image);
99
100} // namespace eve::graphics
#define EVENGINE_API_BACKENDS
Definition Export.h:108
std::uint64_t bytes
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
ShaderImageFormat
Explicit sampled-image storage; sRGB conversion never affects alpha.
ShaderImageDimension
Sampled image view dimension; arrays retain all authored layers.
Result< std::uint32_t > shaderInstanceMatrixCount(std::span< const std::byte > bytes)
Validate packed instance records without GPU access; returns the record count.
Result< std::vector< ShaderImageRegion > > shaderImageRegions(const ShaderImageInput &image)
Validate layout, dimensions, sampler compatibility and exact payload size.
Synchronous borrowed input for one immutable shader image. @ownership The caller owns bytes; upload c...
std::uint32_t depth
Base Z extent for Image3D; other dimensions require one. Volume bytes are mip-major,...
std::span< const std::byte > bytes
std::shared_ptr< const void > contentOwner
Optional immutable byte snapshot identity for upload deduplication. @ownership Shared owner of the ex...
One validated byte region for an image's layer/mip upload.
std::uint32_t depth
Z extent of this mip; one for non-volume image regions.
Inputs for descriptor set 1 of a resource mesh program.
std::span< const std::byte > instanceMatrices
Optional immutable column-major float32 affine mat4 records, set 1 binding 33. @ownership Caller byte...
std::span< const ShaderImageInput > images
std::span< const std::byte > constants
Sampler state for a Texture (filter, wrap, mip LOD, anisotropy). Defaults match historical engine beh...