mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 09:39:15 +00:00
66259560e0
GS_RGBA, GS_BGRX, and GS_BGRA now use TYPELESS DXGI formats, so we can alias them between UNORM and UNORM_SRGB as necessary. GS_RGBA_UNORM, GS_BGRX_UNORM, and GS_BGRA_UNORM have been added to support straight UNORM types, which Windows requires for sharing textures from D3D9 and OpenGL. The D3D path aliases via views, and GL aliases via GL_EXT_texture_sRGB_decode/GL_FRAMEBUFFER_SRGB. A significant amount of code has changed in the D3D/GL backends, but the concepts are simple. On the D3D side, we need separate SRVs and RTVs to support nonlinear/linear reads and writes. On the GL side, we need to set the proper GL parameters to emulate the same. Add gs_enable_framebuffer_srgb/gs_framebuffer_srgb_enabled to set/get the framebuffer as SRGB or not. Add gs_linear_srgb_active/gs_set_linear_srgb to instruct sources that they should render as SRGB. Legacy sources can ignore this setting without regression. Update obs_source_draw to use linear SRGB as needed. Update render_filter_tex to use linear SRGB as needed. Add gs_effect_set_texture_srgb next to gs_effect_set_texture to set texture with SRGB view instead. Add SRGB helpers for vec4 struct. Create GDI-compatible textures without SRGB support. Doesn't seem to work with SRGB formats. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
d3d11-config.h.in | ||
d3d11-duplicator.cpp | ||
d3d11-indexbuffer.cpp | ||
d3d11-rebuild.cpp | ||
d3d11-samplerstate.cpp | ||
d3d11-shader.cpp | ||
d3d11-shaderprocessor.cpp | ||
d3d11-shaderprocessor.hpp | ||
d3d11-stagesurf.cpp | ||
d3d11-subsystem.cpp | ||
d3d11-subsystem.hpp | ||
d3d11-texture2d.cpp | ||
d3d11-texture3d.cpp | ||
d3d11-vertexbuffer.cpp | ||
d3d11-zstencilbuffer.cpp | ||
intel-nv12-support.hpp |