jpark37
e79e28598b
libobs,obs-filters: Use common straight alpha math
...
This pattern uses fewer instructions and also avoids using max, which
does not work on infinity.
Also remove unreferenced techniques from scale filters.
2023-11-04 18:12:22 -05:00
jpark37
e11e2133e2
libobs,obs-filters: Fix NAN when tonemapping
...
Can happen when colors are wider than Rec. 2020.
2023-10-04 19:33:54 -04:00
Lain
45e7334206
libobs: Fix shader fix not working on D3D11
...
In c8d95005c1
, it was incorrect assumed that just because the fix
worked on OpenGL, that the fix would also work on D3D11. Automated tests
would be ideal here, although if there were automated tests, ironically,
it wouldn't have picked this up, because we (read: I) made D3D11 fall
back to OpenGL of D3D11 failed. Basically there is no one to blame but
myself again.
This time, we've removed the OpenGL fallback in a06d6893b9
(thank you
Rodney), and additionally I properly tested on both rendering backends.
(Lain note: I'm just going to go sit in the corner for a bit and
ruminate after this)
2023-08-16 11:19:08 -07:00
Lain
2edb9f3151
libobs: Fix default.effect not working with OpenGL
...
Due to my jank transpiler, default.effect worked with Direct3D 11 but
not with OpengGL. Fixing this particular bug with the transpiler is a
bit non-trivial so instead just modify the shader to work with both.
2023-08-15 17:11:23 -07:00
jpark37
3e80fff18e
libobs: Add DrawAlphaDivide variant shaders
...
Useful for future 10-bit HDR DeckLink playback support.
2023-08-15 13:15:45 -07:00
jpark37
7669da1ea8
libobs: Add VIDEO_FORMAT_R10L
...
Support 10-bit packed format that DeckLink uses.
2023-07-29 16:41:31 -07:00
Lain
106c7aa61f
Update copyrights/names
2023-05-20 01:31:18 -07:00
jpark37
7ff5dd63b9
libobs: Fix luma sampling for packed 4:2:2 sources
2023-05-06 16:31:06 -07:00
jpark37
901986cbf4
libobs,obs-filters: Align HDR to SDR disparity
...
Adjust colors from BT.1886 to sRGB.
2023-04-23 23:43:09 -07:00
Norihiro Kamae
94bf325dd9
libobs: Fix VIDEO_FORMAT_V210 shader for GLSL
2023-03-26 05:13:00 -07:00
jpark37
97843dd7d7
libobs: Add VIDEO_FORMAT_V210
...
Support 10-bit packed format that DeckLink uses.
2023-03-26 01:52:44 -07:00
jpark37
463bf0dff5
libobs,UI: Add P216/P416 pixel formats
...
Will be useful for ProRes.
2023-02-21 18:48:44 +01:00
jpark37
0efaf88caf
libobs: Add PQ/HLG support for I210/I412 formats
...
Seen when playing back ProRes files.
2023-02-21 18:48:44 +01:00
jpark37
e709797d80
libobs: Add P3 shaders for Mac
2022-11-09 22:34:50 -08:00
jpark37
e119a7024d
libobs: Sample video at default chroma location
...
Expect left for 4:2:0 SDR and 4:2:2, and top-left for 4:2:0 HDR.
MJPEG will be a half-pixel off, but we'll live with that for now.
2022-10-09 16:15:16 -07:00
jpark37
51c452e937
libobs: Precompute more accurate matrices
...
These are generated with .NET BigInteger fractions, and late divide.
2022-10-05 08:36:29 -07:00
jpark37
bb02620169
libobs: Add support for reading NV12/YUY2 PQ/HLG
...
8-bit HDR shouldn't exist, but OBS looks broken, so just support it.
2022-09-17 16:36:31 -07:00
jpark37
1a7e5babc2
libobs: Add support for reading I420 HLG
...
Sony cameras can create 8-bit HLG videos for some reason.
2022-09-16 03:04:23 -07:00
jpark37
3a43fc4a07
libobs: Use left chroma location for SDR
...
Top-left chroma should be for Rec. 2020/2100.
2022-07-31 00:10:50 -07:00
Anastasiia Sidorovskaia
ef9c99f5f4
libobs: Set coefficients with higher precision
2022-07-25 17:41:26 -04:00
Jim
29782cd594
libobs: And fix area scaling effect with RGBA
2022-06-04 19:54:52 -07:00
Jim
a33a5d2151
libobs: Fix bilinear lowres RGBA as well
2022-06-04 19:03:20 -07:00
Jim
4a2a06b22f
libobs: Fix RGBA format output not working
...
Due to a bug in shader parsing, it thinks that because the token
"multiplier" is used here, that the "multiplier" uniform is being used.
This is a workaround for the issue because fixing the parser is probably
going to be much more annoying than just working around the issue for
now.
2022-06-04 17:47:47 -07:00
jpark37
bacd4713da
libobs: Clear low bits when writing P010
...
Don't want to rely on consumer to ignore those bits.
2022-06-04 01:00:21 -07:00
jpark37
11da542a0d
libobs: Add max_luminance to obs_source_frame
...
Used in situations where source luminance is greater than HDR nominal
peak setting to avoid clipping by applying BT.2408 maxRGB EETF.
2022-05-27 14:56:47 -07:00
jpark37
4304329d0c
libobs: Ignore lower six bits for P010 sources
2022-05-17 02:46:41 -07:00
Norihiro Kamae
dd43635e78
libobs: Fix reserved word in variable names
...
The use of the reserved name caused initialization failure on Linux.
2022-05-11 11:28:20 -04:00
jpark37
0f53dc28bb
libobs: Reduce PQ shader math
2022-05-11 03:38:07 -07:00
jpark37
2a0d8d1c9c
libobs: Add support for reading I420 PQ
...
Not normally a valid combination, but Xbox writes 8-bit HDR videos.
2022-05-08 14:12:41 -07:00
jpark37
ed835810b4
libobs: Use tabs in format_conversion.effect
2022-05-08 14:12:41 -07:00
Jim
952988d9ec
Merge pull request #6231 from mvji/prores_pix_fmt
...
Add support for GPU conversion of YUV422P10LE, YUV444P12LE, YUVA444P12LE
2022-05-04 02:01:27 -07:00
jpark37
a82bbb416f
libobs: Fix NaNs when using EETF for HLG
2022-04-26 10:11:28 -07:00
jpark37
ed85307f7e
libobs: Clean up color.effect a bit
2022-04-26 10:11:28 -07:00
mvji
d3a8ef7128
libobs: Add support for YUV422P10LE, YUV444P12LE, YUVA444P12LE
2022-04-19 19:37:07 +02:00
jpark37
338608bd67
libobs,UI: Support HLG nominal peak level
...
HLG output uses MovieLabs-recommended procedure.
- If peak luminance is greater than 1000, use maxRGB EETF to 1000.
- Otherwise, don't tonemap.
- Then use normal HLG conversion procedure with gamma 1.2 (1000 nits).
2022-04-14 09:36:44 -07:00
jpark37
08f50a7d22
libobs: Add more color handling to default/opaque
2022-04-13 06:23:11 -07:00
jpark37
06111d5b10
libobs: Add high-precision sRGB support
2022-04-08 17:19:23 -07:00
jpark37
0ed0f2cdb4
libobs: Add I010/P010 support, TRC enum
2022-04-03 00:01:25 -07:00
jpark37
c455aaedba
libobs: Add color spaces to deinterlace shaders
2022-04-02 20:14:31 -07:00
jpark37
a8bc994f07
libobs: Add color spaces to scale shaders
2022-03-26 13:00:34 -07:00
jpark37
87ab39c412
libobs: Render main texture for active color space
...
Preview will draw SDR white luminance from settings (default 300 nits)
when displayed on an HDR monitor rather than CCCS 80 nits.
2022-03-23 22:35:27 -07:00
jpark37
4e6765a01b
libobs: Remove DrawSrgbDecompressPremultiplied
...
Technique is no longer referenced, and doesn't seem useful.
2021-10-02 05:53:27 -07:00
jpark37
10cf411f99
libobs: DrawSrgbDecompress for default_rect.effect
...
Necessary for upcoming fix to browser source alpha.
2021-09-30 17:35:06 -07:00
jpark37
c9766d8e28
libobs: Add DrawSrgbDecompress default technique
...
Useful when the texture does not support SRGB conversion on load.
2021-07-11 08:26:05 -07:00
jpark37
05b507d900
libobs: DrawSrgbDecompressPremultiplied technique
...
Necessary for an upcoming fix to browser source.
2021-07-11 08:11:12 -07:00
jpark37
b70161bc67
libobs: Add DrawOpaque for rect effect
...
Needed by Syphon Client.
2021-07-04 10:35:54 -07:00
jpark37
a8f0a27a3a
libobs: Remove DrawAlphaBlend technique
2021-05-11 13:12:39 -07:00
jpark37
de7cec3dee
libobs: Add DrawAlphaBlend technique
...
Useful when fixed-function blend does not provide enough precision.
2021-05-05 09:43:34 -07:00
jpark37
840e2b3d43
libobs: Add DrawNonlinearAlpha technique
...
This allows OBS to mimic other programs that incorrectly use alpha.
Requires premultiplied blend state.
2021-04-24 17:18:42 -07:00
jpark37
9bdb16aa78
libobs: Fix Area shaders missing for RGB output
...
Area downscale setting currently only works with YUV outputs. This adds
the missing DrawAlphaDivide technique.
2019-08-31 00:25:24 -07:00