2022-04-04 19:44:25 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "../defines.hpp"
|
2022-06-30 12:39:10 +02:00
|
|
|
#include <unordered_map>
|
2022-04-04 19:44:25 +02:00
|
|
|
|
2025-05-08 00:07:35 +02:00
|
|
|
struct SShader {
|
|
|
|
|
~SShader();
|
2022-08-11 20:33:35 +02:00
|
|
|
|
2023-06-14 13:29:12 +02:00
|
|
|
GLuint program = 0;
|
|
|
|
|
GLint proj = -1;
|
|
|
|
|
GLint color = -1;
|
2023-11-04 13:10:52 +00:00
|
|
|
GLint alphaMatte = -1;
|
2025-03-14 02:15:18 +03:00
|
|
|
GLint texType = -1;
|
2025-03-29 03:19:35 +03:00
|
|
|
GLint skipCM = -1;
|
2025-03-14 02:15:18 +03:00
|
|
|
GLint sourceTF = -1;
|
|
|
|
|
GLint targetTF = -1;
|
2025-04-29 22:29:40 +03:00
|
|
|
GLint srcTFRange = -1;
|
|
|
|
|
GLint dstTFRange = -1;
|
2025-03-14 02:15:18 +03:00
|
|
|
GLint targetPrimaries = -1;
|
|
|
|
|
GLint maxLuminance = -1;
|
|
|
|
|
GLint dstMaxLuminance = -1;
|
|
|
|
|
GLint dstRefLuminance = -1;
|
|
|
|
|
GLint sdrSaturation = -1; // sdr -> hdr saturation
|
|
|
|
|
GLint sdrBrightness = -1; // sdr -> hdr brightness multiplier
|
2025-04-29 22:29:40 +03:00
|
|
|
GLint convertMatrix = -1;
|
2023-06-14 13:29:12 +02:00
|
|
|
GLint tex = -1;
|
|
|
|
|
GLint alpha = -1;
|
|
|
|
|
GLint posAttrib = -1;
|
|
|
|
|
GLint texAttrib = -1;
|
2023-11-04 13:10:52 +00:00
|
|
|
GLint matteTexAttrib = -1;
|
2023-06-14 13:29:12 +02:00
|
|
|
GLint discardOpaque = -1;
|
|
|
|
|
GLint discardAlpha = -1;
|
|
|
|
|
GLfloat discardAlphaValue = -1;
|
|
|
|
|
|
2025-05-11 18:36:20 +02:00
|
|
|
GLuint shaderVao = 0;
|
|
|
|
|
GLuint shaderVboPos = 0;
|
|
|
|
|
GLuint shaderVboUv = 0;
|
|
|
|
|
|
2023-06-14 13:29:12 +02:00
|
|
|
GLint topLeft = -1;
|
|
|
|
|
GLint bottomRight = -1;
|
|
|
|
|
GLint fullSize = -1;
|
|
|
|
|
GLint fullSizeUntransformed = -1;
|
|
|
|
|
GLint radius = -1;
|
2023-10-19 14:04:50 +01:00
|
|
|
GLint radiusOuter = -1;
|
2025-01-05 12:38:49 -06:00
|
|
|
GLfloat roundingPower = -1;
|
2023-06-14 13:29:12 +02:00
|
|
|
|
|
|
|
|
GLint thick = -1;
|
|
|
|
|
|
|
|
|
|
GLint halfpixel = -1;
|
|
|
|
|
|
2023-11-04 13:10:52 +00:00
|
|
|
GLint range = -1;
|
|
|
|
|
GLint shadowPower = -1;
|
|
|
|
|
GLint useAlphaMatte = -1; // always inverted
|
2023-06-14 13:29:12 +02:00
|
|
|
|
|
|
|
|
GLint applyTint = -1;
|
|
|
|
|
GLint tint = -1;
|
|
|
|
|
|
2024-12-03 18:58:24 +00:00
|
|
|
GLint gradient = -1;
|
|
|
|
|
GLint gradientLength = -1;
|
|
|
|
|
GLint angle = -1;
|
|
|
|
|
GLint gradient2 = -1;
|
|
|
|
|
GLint gradient2Length = -1;
|
|
|
|
|
GLint angle2 = -1;
|
|
|
|
|
GLint gradientLerp = -1;
|
2023-06-14 13:29:12 +02:00
|
|
|
|
2024-07-16 21:03:10 +01:00
|
|
|
float initialTime = 0;
|
|
|
|
|
GLint time = -1;
|
|
|
|
|
GLint distort = -1;
|
|
|
|
|
GLint wl_output = -1;
|
2023-03-05 15:05:30 +01:00
|
|
|
|
2023-11-06 20:49:03 +02:00
|
|
|
// Blur prepare
|
|
|
|
|
GLint contrast = -1;
|
2023-08-03 15:11:10 +02:00
|
|
|
|
2023-11-06 20:49:03 +02:00
|
|
|
// Blur
|
|
|
|
|
GLint passes = -1; // Used by `vibrancy`
|
|
|
|
|
GLint vibrancy = -1;
|
|
|
|
|
GLint vibrancy_darkness = -1;
|
2022-06-30 12:39:10 +02:00
|
|
|
|
2023-11-06 20:49:03 +02:00
|
|
|
// Blur finish
|
|
|
|
|
GLint brightness = -1;
|
|
|
|
|
GLint noise = -1;
|
|
|
|
|
|
2025-05-11 18:36:20 +02:00
|
|
|
void createVao();
|
2023-11-06 20:49:03 +02:00
|
|
|
void destroy();
|
2024-07-16 21:03:10 +01:00
|
|
|
};
|