From edbad7e93d2f6d9b622c94ada6ed7bc3f323aceb Mon Sep 17 00:00:00 2001 From: jpark37 Date: Mon, 28 Dec 2020 00:50:43 -0800 Subject: [PATCH] docs/sphinx: Document SRGB changes --- docs/sphinx/graphics.rst | 1 + docs/sphinx/reference-libobs-graphics-effects.rst | 9 +++++++++ docs/sphinx/reference-libobs-graphics-graphics.rst | 3 +++ 3 files changed, 13 insertions(+) diff --git a/docs/sphinx/graphics.rst b/docs/sphinx/graphics.rst index c2c91849a..8848a4653 100644 --- a/docs/sphinx/graphics.rst +++ b/docs/sphinx/graphics.rst @@ -77,6 +77,7 @@ Then the uniforms are set through the following functions: - :c:func:`gs_effect_set_vec3()` - :c:func:`gs_effect_set_vec4()` - :c:func:`gs_effect_set_texture()` +- :c:func:`gs_effect_set_texture_srgb()` There are two "universal" effect parameters that may be expected of effects: **ViewProj**, and **image**. The **ViewProj** parameter diff --git a/docs/sphinx/reference-libobs-graphics-effects.rst b/docs/sphinx/reference-libobs-graphics-effects.rst index e7c0ec389..b6d2f48b0 100644 --- a/docs/sphinx/reference-libobs-graphics-effects.rst +++ b/docs/sphinx/reference-libobs-graphics-effects.rst @@ -337,6 +337,15 @@ HLSL format. --------------------- +.. function:: void gs_effect_set_texture_srgb(gs_eparam_t *param, gs_texture_t *val) + + Sets a texture parameter using SRGB view if available. + + :param param: Effect parameter + :param val: Texture + +--------------------- + .. function:: void gs_effect_set_val(gs_eparam_t *param, const void *val, size_t size) Sets a parameter with data manually. diff --git a/docs/sphinx/reference-libobs-graphics-graphics.rst b/docs/sphinx/reference-libobs-graphics-graphics.rst index 69a60d8ca..6edf34efb 100644 --- a/docs/sphinx/reference-libobs-graphics-graphics.rst +++ b/docs/sphinx/reference-libobs-graphics-graphics.rst @@ -42,6 +42,9 @@ Graphics Enumerations - GS_DXT1 - Compressed DXT1 - GS_DXT3 - Compressed DXT3 - GS_DXT5 - Compressed DXT5 + - GS_RGBA_UNORM - RGBA, 8 bits per channel, no SRGB aliasing + - GS_BGRX_UNORM - BGRX, 8 bits per channel, no SRGB aliasing + - GS_BGRA_UNORM - BGRA, 8 bits per channel, no SRGB aliasing .. type:: enum gs_zstencil_format