Skip to content

max_pq_y is not available in shaders #16752

@Alexkral

Description

@Alexkral

mpv Information

mpv v0.40.0-288-g80d2a6a7e-dirty Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Aug 23 2025 19:30:45
libplacebo version: v7.353.0 (v7.351.0-55-ga0fd4f3-dirty)
FFmpeg version: n7.1.1
FFmpeg library versions:
   libavcodec      61.19.101
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

Other Information

- Windows version: Windows 11 Pro
- GPU model, driver and version: NVIDIA GeForce RTX 5080, 577.00 Studio

Reproduction Steps

Playing a normal HDR file using this mpv.conf:

input-ipc-server=mpvpipe
hwdec=auto-copy
hwdec-codecs=all
vo=gpu-next
gpu-api=d3d11
profile=gpu-hq

vf=format=dolbyvision=no
target-colorspace-hint=no
target-trc=pq
target-prim=bt.2020
hdr-compute-peak=yes
hdr-peak-decay-rate=0
tone-mapping=clip
gamut-mapping-mode=clip

glsl-shader=~~/shaders/test.glsl

and this shader:

//!PARAM max_pq_y
//!TYPE DYNAMIC float
1.0

//!HOOK OUTPUT
//!BIND HOOKED
//!DESC Test

vec4 hook() {
	vec4 color = HOOKED_tex(HOOKED_pos);

	if (max_pq_y == 0.0) { return vec4(1.0, 0.0, 0.0, 0.0); }

	return color;
}

Expected Behavior

The value of max_pq_y should change per frame.

Actual Behavior

The value of max_pq_y is always equal to 0.0.

Log File

mpv_log.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions