mirror of
https://github.com/TomHarte/CLK.git
synced 2026-03-13 02:42:08 +00:00
42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
//
|
|
// CopyShader.hpp
|
|
// Clock Signal Kiosk
|
|
//
|
|
// Created by Thomas Harte on 29/01/2026.
|
|
// Copyright © 2026 Thomas Harte. All rights reserved.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include "Outputs/OpenGL/Primitives/Shader.hpp"
|
|
|
|
#include <optional>
|
|
|
|
namespace Outputs::Display::OpenGL {
|
|
|
|
/*!
|
|
Copies a source texture in its entirety to a destination, optionally applying
|
|
a change in brightness and a gamma adjustment.
|
|
|
|
This always copies the entirety of the source texture to the entirety of the
|
|
target surface; hence no inputs are required to the vertex program. Simply
|
|
issue a four-vertex triangle strip.
|
|
|
|
TODO: consider colour adaptations beyond mere brightness.
|
|
I want at least a 'tint' and am considering a full-on matrix application for any
|
|
combination of tint, brightness and channel remapping — e.g. imagine a
|
|
handheld console in which the native red pixels are some colour other than
|
|
pure red.
|
|
|
|
(would need support in the ScanTarget modals and therefore also a correlated
|
|
change in the other scan targets)
|
|
*/
|
|
Shader copy_shader(
|
|
API,
|
|
const GLenum source_texture_unit,
|
|
std::optional<float> brightness, // Optionally: multiply all input
|
|
std::optional<float> gamma
|
|
);
|
|
|
|
}
|