mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-08 12:24:09 +00:00
libobs: Fix SDR async video on non-SDR targets
Bug was seen when projecting SDR video capture on WCG displays.
This commit is contained in:
parent
2e7f7acfeb
commit
792f8473ee
|
@ -2478,6 +2478,8 @@ static inline void obs_source_render_async_video(obs_source_t *source)
|
||||||
bool nonlinear_alpha = false;
|
bool nonlinear_alpha = false;
|
||||||
switch (source_space) {
|
switch (source_space) {
|
||||||
case GS_CS_SRGB:
|
case GS_CS_SRGB:
|
||||||
|
linear_srgb = linear_srgb ||
|
||||||
|
(current_space != GS_CS_SRGB);
|
||||||
nonlinear_alpha = linear_srgb &&
|
nonlinear_alpha = linear_srgb &&
|
||||||
!source->async_linear_alpha;
|
!source->async_linear_alpha;
|
||||||
switch (current_space) {
|
switch (current_space) {
|
||||||
|
@ -2492,7 +2494,6 @@ static inline void obs_source_render_async_video(obs_source_t *source)
|
||||||
nonlinear_alpha
|
nonlinear_alpha
|
||||||
? "DrawNonlinearAlphaMultiply"
|
? "DrawNonlinearAlphaMultiply"
|
||||||
: "DrawMultiply";
|
: "DrawMultiply";
|
||||||
linear_srgb = true;
|
|
||||||
multiplier =
|
multiplier =
|
||||||
obs_get_video_sdr_white_level() / 80.0f;
|
obs_get_video_sdr_white_level() / 80.0f;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue