Currently several shaders need "DrawMatrix" techniques to support the
possibility that the input texture is a "YUV" format. Also, "DrawMatrix"
is overloaded for translation in both directions when it is written for
RGB to "YUV" only.
A cleaner solution is to handle "YUV" to RGB up-front as part of format
conversion, and ensure only RGB inputs reach the other shaders. This is
necessary to someday perform correct scale filtering without the cost of
redundant "YUV" conversions per texture tap.
A necessary prerequisite for this is to add conversion support for
VIDEO_FORMAT_I444, and that is now in place. There was already a hack in
place to cover VIDEO_FORMAT_Y800. All other "YUV" formats already have
conversion functions.
"DrawMatrix" has been removed from shaders that only supported "YUV" to
RGB conversions. It still exists in shaders that perform RGB to "YUV"
conversions, and the implementations have been sanitized accordingly.
I considered making this an option, but I decided against it because
I felt it wasn't necessary and would make the settings more complex.
Opinions are welcome.
The system theme was named Default even though the default theme is Dark.
This addresses that by renaming Default.qss to System.qss. I've made it
backwards compatible so users already using this theme are not affected.
The theme list now shows up as:
-System
-Dark (Default)
-Acri
-Rachni
I have also made it so that you can specify the default theme in the
UI config file.
Add D3D/GL debug markers to make RenderDoc captures easier to tranverse.
Also add obs_source_get_name_no_null() to avoid boilerplate for safe
string formatting.
Closesobsproject/obs-studio#1799
Add support for debug markers via D3DPERF API and KHR_debug. This makes
it easier to understand RenderDoc captures.
D3DPERF is preferred to ID3DUserDefinedAnnotation because it supports
colors. d3d9.lib is now linked in to support this.
This feature is disabled by default, and is controlled by
GS_USE_DEBUG_MARKERS.
From: obsproject/obs-studio#1799
We can't compare addresses of ComPtr for self-reference directly because
the address-of operator is overloaded, causing a compiler error. This
fix more or less matches the WRL implementation.
Currently SrcBlendAlpha and DestBlendAlpha are both ONE, and can
combine together to form two. This is not a noticeable problem for
UNORM targets because the channels are clamped, but it will likely
become a problem if FLOAT targets are more widely used.
This change switches DestBlendAlpha to INVSRCALPHA, and starts
backgrounds as opaque black instead of transparent black. The blending
behavior of stacked transparents is preserved without overflowing the
alpha channel.
Previously enabling and disabling bandwidth testing in a certain order
lead to the parameter being included in the stream key that is saved to
disk, making it impossible to disable the bandwidth test later on.
By doing this properly and using string concatenation instead of
modifying (appending to) the key_ value this will no longer happen.
Fixes the `obs.rc` file appearing in the UI source tree and moves it
into the out-of-tree build directories provided by CMake. Projects
requiring this can use it by adding `${obs-studio_BINARY_DIR}/obs.rc`
to their source list.
Allows removing a property from a properties list in get_properties or
modified callback to enable dynamic property generation. The behavior
is undefined if the UI properties list is not refreshed by returning
true from the modified callback.
It appears there's a projection flip that is applied in some situations,
like the preview pane in studio mode, and the shader math fails when
it's active causing the output color to be zero. This fixes the math for
GLSL (with a tiny redundancy penalty to HLSL), and cleans up some
unnecessary code along the way.
Use abs() to avoid zero area in case the OpenGL projection flip is
active. Also simplify the math, and remove the unnecessary sampler
state.
All UI elements are accessible through the obs frontend api via
obs_frontend_api_get_main_window, except for the tray icon and its
elements. This commit adds an obs_frontend_api_get_system_tray function
which returns the pointer to the QSystemTrayIcon cast to void (much like
the QMainWindow pointer for the main window).
This solves the issue of users who close the primary dock widgets and
can't figure out how to get them back, who for whatever reason choose
not to read the message box when closing dock widgets that tells them
how to get it back. The users can still hide the primary dock widgets
via the View menu, but they can no longer close them via the [x] button
on the dock widget. This change does not apply to secondary dock
widgets, such as a chat window, stats, etc.
Closesobsproject/obs-studio#1804