1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add dynamic exposure correction (#12959)

* Add uniform for frame delta time
* Adjust exposure in logarithmic (EV) space
* Add network support and LUA API
* Add testing mod
This commit is contained in:
x2048 2023-01-06 22:33:25 +01:00 committed by GitHub
parent 2715cc8bf6
commit 6d45c243f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 567 additions and 71 deletions

View file

@ -101,6 +101,16 @@ void TextureBuffer::reset(PipelineContext &context)
RenderSource::reset(context);
}
void TextureBuffer::swapTextures(u8 texture_a, u8 texture_b)
{
assert(m_definitions[texture_a].valid && m_definitions[texture_b].valid);
video::ITexture *temp = m_textures[texture_a];
m_textures[texture_a] = m_textures[texture_b];
m_textures[texture_b] = temp;
}
bool TextureBuffer::ensureTexture(video::ITexture **texture, const TextureDefinition& definition, PipelineContext &context)
{
bool modify;
@ -230,6 +240,16 @@ void SetRenderTargetStep::run(PipelineContext &context)
step->setRenderTarget(target);
}
SwapTexturesStep::SwapTexturesStep(TextureBuffer *_buffer, u8 _texture_a, u8 _texture_b)
: buffer(_buffer), texture_a(_texture_a), texture_b(_texture_b)
{
}
void SwapTexturesStep::run(PipelineContext &context)
{
buffer->swapTextures(texture_a, texture_b);
}
RenderSource *RenderPipeline::getInput()
{
return &m_input;