Skip to content

Commit

Permalink
Adding dynamic chromaloc correction
Browse files Browse the repository at this point in the history
This became possible after mpv-player/mpv#15239
  • Loading branch information
Artoriuz committed Nov 2, 2024
1 parent dfb96bb commit 22cf9d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion FastBilateral.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

//!PARAM chroma_offset_x
//!TYPE float
0.0

//!PARAM chroma_offset_y
//!TYPE float
0.0

//!HOOK CHROMA
//!BIND LUMA
//!BIND HOOKED
Expand All @@ -30,7 +38,7 @@
//!DESC Fast Bilateral (Downscaling Luma)

vec4 hook() {
return LUMA_texOff(vec2(-0.5, 0.0));
return LUMA_texOff(vec2(chroma_offset_x, chroma_offset_y));
}

//!PARAM distance_coeff
Expand Down
10 changes: 9 additions & 1 deletion JointBilateral.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

//!PARAM chroma_offset_x
//!TYPE float
0.0

//!PARAM chroma_offset_y
//!TYPE float
0.0

//!HOOK CHROMA
//!BIND LUMA
//!BIND HOOKED
Expand All @@ -30,7 +38,7 @@
//!DESC Joint Bilateral (Downscaling Luma)

vec4 hook() {
return LUMA_texOff(vec2(-0.5, 0.0));
return LUMA_texOff(vec2(chroma_offset_x, chroma_offset_y));
}

//!PARAM distance_coeff
Expand Down

0 comments on commit 22cf9d7

Please sign in to comment.