载入中...
搜索中...
未找到
Exposure.h
浏览该文件的文档.
1#pragma once
2
3#include <glm/vec3.hpp>
4
5namespace eve::graphics {
6
7class Canvas;
8class Graphics;
9class Shader;
10class Texture;
11
13class Exposure {
14public:
16 explicit Exposure(Graphics *gfx);
17
38 Texture *apply(Texture *source, float manualExposure, bool automatic, float minEV,
39 float maxEV, const glm::vec3& colorFilter, const glm::vec3& lift,
40 const glm::vec3& inverseGamma, const glm::vec3& gain, float vignette,
41 float vignetteSmoothness, float lensDistortion, float lensScale,
42 Texture *meterSource = nullptr,
43 float deltaSeconds = 1.f / 60.f);
44
46 void invalidateHistory() { historyValid_ = false; }
47
48private:
49 void ensureTargets(int width, int height);
50
51 Graphics *gfx_ = nullptr;
52 Shader *meterShader_ = nullptr;
53 Shader *adaptShader_ = nullptr;
54 Shader *applyShader_ = nullptr;
55 Canvas *meter_ = nullptr;
56 Canvas *historyA_ = nullptr;
57 Canvas *historyB_ = nullptr;
58 Canvas *historyRead_ = nullptr;
59 Canvas *historyWrite_ = nullptr;
60 Canvas *output_ = nullptr;
61 int width_ = 0;
62 int height_ = 0;
63 bool historyValid_ = false;
64};
65
66} // namespace eve::graphics
std::uint32_t height
std::uint32_t width
const UnitySourceAsset & source
Canvas public API.
Definition Canvas.h:17
GPU percentile metering, eye adaptation, and linear HDR pre-exposure.
Definition Exposure.h:13
void invalidateHistory()
Invalidate eye-adaptation history, for camera cuts and mode changes.
Definition Exposure.h:46
Texture * apply(Texture *source, float manualExposure, bool automatic, float minEV, float maxEV, const glm::vec3 &colorFilter, const glm::vec3 &lift, const glm::vec3 &inverseGamma, const glm::vec3 &gain, float vignette, float vignetteSmoothness, float lensDistortion, float lensScale, Texture *meterSource=nullptr, float deltaSeconds=1.f/60.f)
Apply manual and optional automatic exposure to a linear HDR source.
Definition Exposure.cpp:93
Custom GPU program.
Definition Shader.h:39
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:18
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25