Added new shaders
Some checks failed
CI / Native Windows Build And Tests (push) Has been cancelled
CI / React UI Build (push) Has been cancelled
CI / Windows Release Package (push) Has been cancelled

This commit is contained in:
2026-05-05 22:36:52 +10:00
parent 119e49aec1
commit ce5905373a
32 changed files with 882 additions and 78 deletions

View File

@@ -0,0 +1,42 @@
{
"id": "lift-gamma-gain",
"name": "Lift Gamma Gain",
"description": "Basic color grading controls for shadows, midtones, highlights, and overall RGB offset.",
"category": "Color",
"entryPoint": "shadeVideo",
"parameters": [
{
"id": "lift",
"label": "Lift",
"type": "color",
"default": [0.5, 0.5, 0.5, 1.0]
},
{
"id": "gamma",
"label": "Gamma",
"type": "color",
"default": [0.5, 0.5, 0.5, 1.0]
},
{
"id": "gain",
"label": "Gain",
"type": "color",
"default": [0.5, 0.5, 0.5, 1.0]
},
{
"id": "offset",
"label": "Offset",
"type": "color",
"default": [0.5, 0.5, 0.5, 1.0]
},
{
"id": "strength",
"label": "Strength",
"type": "float",
"default": 1.0,
"min": 0.0,
"max": 1.0,
"step": 0.01
}
]
}

View File

@@ -0,0 +1,20 @@
float3 applyLiftGammaGainOffset(float3 color)
{
float3 liftAdjust = (lift.rgb - 0.5) * 0.5;
float3 offsetAdjust = (offset.rgb - 0.5) * 0.5;
float3 gammaAdjust = exp2((gamma.rgb - 0.5) * 2.0);
float3 gainAdjust = exp2((gain.rgb - 0.5) * 2.0);
float3 lifted = color + liftAdjust;
float3 gained = lifted * gainAdjust;
float3 corrected = pow(saturate(gained), 1.0 / max(gammaAdjust, float3(0.001)));
return corrected + offsetAdjust;
}
float4 shadeVideo(ShaderContext context)
{
float4 source = context.sourceColor;
float3 graded = applyLiftGammaGainOffset(source.rgb);
source.rgb = lerp(source.rgb, graded, strength);
return saturate(source);
}