mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-30 23:33:02 +00:00
eba0a467d5
For simple image and video editing, LUTs (Look-Up Tables) are vastly superior to running the entire editing operation on each pixel - especially if all the processing can be done inside a single shader. Due to the post-processing requirements for our LUTs, we are limited to 8 bits per channel - though clever use of the unused Alpha channel may result in additional space. For our purposes however, this is definitely enough.
21 lines
638 B
Text
21 lines
638 B
Text
#include "shared.effect"
|
|
#include "lut.effect"
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Uniforms
|
|
//------------------------------------------------------------------------------
|
|
uniform int4 lut_params_0;
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Functionality
|
|
//------------------------------------------------------------------------------
|
|
float4 PSProduceLUT(VertexData vtx) : TARGET {
|
|
return generate_lut2(vtx.uv, lut_params_0);
|
|
};
|
|
|
|
technique Draw {
|
|
pass {
|
|
vertex_shader = DefaultVertexShader(vtx);
|
|
pixel_shader = PSProduceLUT(vtx);
|
|
};
|
|
};
|