obs-StreamFX/data/effects/lut-producer.effect
Michael Fabian 'Xaymar' Dirks f396f52054 gfx/lut: Add a simple but efficient LUT producer and consumer
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.
2021-02-06 16:22:22 +01:00

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);
};
};