Pastel
https://scrapbox.io/files/69135745a745e9f8171b5948.png
爽やかな感じになるね
.cube形式のLUTにしました
AviUtl2以外でも使用できるのでお好きにお使いください
code:lua
--[[
Pastel cc0
]]
--information:Pastel v0.1.0 by Korarei
--label:色調整
--track0:Intensity,0,100,100,0.01
--[[pixelshader@pastel:
Texture2D src : register(t0);
cbuffer params : register(b0) {
float intensity;
};
static const float eps = 1.0e-5;
static const float3x3 rgb2yuv = float3x3(0.2126, 0.7152, 0.0722, -0.1146, -0.3854, 0.5, 0.5, -0.4542, -0.0458);
static const float3x3 yuv2rgb = float3x3(1.0, 0.0, 1.5748, 1.0, -0.1873, -0.4681, 1.0, 1.8556, 0.0);
float4 pastel(float4 pos : SV_Position) : SV_Target {
float4 base = src.Load(int3(pos.xy, 0));
base = saturate(float4(base.rgb * rcp(max(base.a, eps)), base.a));
float3 blend = mul(rgb2yuv, base.rgb);
blend.x = 0.7278;
blend = mul(yuv2rgb, blend.rgb);
blend = lerp(1.0 - 2.0 * (1.0 - base.rgb) * (1.0 - blend), 2.0 * base.rgb * blend, step(blend, 0.5));
return float4(lerp(base.rgb, saturate(blend), intensity) * base.a, base.a);
}
]]
obj.pixelshader("pastel", "object", "object", {
obj.track0 * 0.01
})