noobs 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COPYING +339 -0
- package/README.md +46 -0
- package/bin/64bit/obs.lib +0 -0
- package/binding.gyp +23 -0
- package/dist/bin/Qt6Core.dll +0 -0
- package/dist/bin/Qt6Gui.dll +0 -0
- package/dist/bin/Qt6Network.dll +0 -0
- package/dist/bin/Qt6Svg.dll +0 -0
- package/dist/bin/Qt6Widgets.dll +0 -0
- package/dist/bin/Qt6Xml.dll +0 -0
- package/dist/bin/avcodec-61.dll +0 -0
- package/dist/bin/avdevice-61.dll +0 -0
- package/dist/bin/avfilter-10.dll +0 -0
- package/dist/bin/avformat-61.dll +0 -0
- package/dist/bin/avutil-59.dll +0 -0
- package/dist/bin/datachannel.dll +0 -0
- package/dist/bin/libcurl.dll +0 -0
- package/dist/bin/libobs-d3d11.dll +0 -0
- package/dist/bin/libobs-opengl.dll +0 -0
- package/dist/bin/libobs-winrt.dll +0 -0
- package/dist/bin/librist.dll +0 -0
- package/dist/bin/libx264-164.dll +0 -0
- package/dist/bin/lua51.dll +0 -0
- package/dist/bin/obs-amf-test.exe +0 -0
- package/dist/bin/obs-ffmpeg-mux.exe +0 -0
- package/dist/bin/obs-frontend-api.dll +0 -0
- package/dist/bin/obs-scripting.dll +0 -0
- package/dist/bin/obs.dll +0 -0
- package/dist/bin/srt.dll +0 -0
- package/dist/bin/swresample-5.dll +0 -0
- package/dist/bin/swscale-8.dll +0 -0
- package/dist/bin/w32-pthreads.dll +0 -0
- package/dist/bin/zlib.dll +0 -0
- package/dist/effects/area.effect +250 -0
- package/dist/effects/bicubic_scale.effect +236 -0
- package/dist/effects/bilinear_lowres_scale.effect +123 -0
- package/dist/effects/color.effect +172 -0
- package/dist/effects/default.effect +254 -0
- package/dist/effects/default_rect.effect +84 -0
- package/dist/effects/deinterlace_base.effect +325 -0
- package/dist/effects/deinterlace_blend.effect +21 -0
- package/dist/effects/deinterlace_blend_2x.effect +21 -0
- package/dist/effects/deinterlace_discard.effect +21 -0
- package/dist/effects/deinterlace_discard_2x.effect +21 -0
- package/dist/effects/deinterlace_linear.effect +21 -0
- package/dist/effects/deinterlace_linear_2x.effect +21 -0
- package/dist/effects/deinterlace_yadif.effect +21 -0
- package/dist/effects/deinterlace_yadif_2x.effect +21 -0
- package/dist/effects/format_conversion.effect +1823 -0
- package/dist/effects/lanczos_scale.effect +292 -0
- package/dist/effects/opaque.effect +159 -0
- package/dist/effects/premultiplied_alpha.effect +38 -0
- package/dist/effects/repeat.effect +36 -0
- package/dist/effects/solid.effect +80 -0
- package/dist/noobs.node +0 -0
- package/dist/plugins/obs-ffmpeg.dll +0 -0
- package/dist/plugins/obs-x264.dll +0 -0
- package/dist/plugins/win-capture.dll +0 -0
- package/include/audio-monitoring/osx/mac-helpers.h +13 -0
- package/include/audio-monitoring/pulse/pulseaudio-wrapper.h +212 -0
- package/include/audio-monitoring/win32/wasapi-output.h +22 -0
- package/include/callback/calldata.h +195 -0
- package/include/callback/decl.h +61 -0
- package/include/callback/proc.h +52 -0
- package/include/callback/signal.h +73 -0
- package/include/graphics/axisang.h +65 -0
- package/include/graphics/bounds.h +108 -0
- package/include/graphics/device-exports.h +177 -0
- package/include/graphics/effect-parser.h +290 -0
- package/include/graphics/effect.h +190 -0
- package/include/graphics/graphics-internal.h +335 -0
- package/include/graphics/graphics.h +1024 -0
- package/include/graphics/half.h +100 -0
- package/include/graphics/image-file.h +124 -0
- package/include/graphics/input.h +34 -0
- package/include/graphics/libnsgif/libnsgif.h +142 -0
- package/include/graphics/math-defs.h +45 -0
- package/include/graphics/math-extra.h +61 -0
- package/include/graphics/matrix3.h +98 -0
- package/include/graphics/matrix4.h +102 -0
- package/include/graphics/plane.h +85 -0
- package/include/graphics/quat.h +170 -0
- package/include/graphics/shader-parser.h +273 -0
- package/include/graphics/srgb.h +177 -0
- package/include/graphics/vec2.h +148 -0
- package/include/graphics/vec3.h +224 -0
- package/include/graphics/vec4.h +241 -0
- package/include/media-io/audio-io.h +228 -0
- package/include/media-io/audio-math.h +43 -0
- package/include/media-io/audio-resampler.h +44 -0
- package/include/media-io/format-conversion.h +50 -0
- package/include/media-io/frame-rate.h +29 -0
- package/include/media-io/media-io-defs.h +20 -0
- package/include/media-io/media-remux.h +37 -0
- package/include/media-io/video-frame.h +64 -0
- package/include/media-io/video-io.h +338 -0
- package/include/media-io/video-scaler.h +43 -0
- package/include/obs-audio-controls.h +250 -0
- package/include/obs-av1.h +47 -0
- package/include/obs-avc.h +55 -0
- package/include/obs-config.h +52 -0
- package/include/obs-data.h +311 -0
- package/include/obs-defs.h +52 -0
- package/include/obs-encoder.h +361 -0
- package/include/obs-ffmpeg-compat.h +13 -0
- package/include/obs-hevc.h +81 -0
- package/include/obs-hotkey.h +271 -0
- package/include/obs-hotkeys.h +653 -0
- package/include/obs-interaction.h +56 -0
- package/include/obs-internal.h +1459 -0
- package/include/obs-missing-files.h +53 -0
- package/include/obs-module.h +181 -0
- package/include/obs-nal.h +37 -0
- package/include/obs-nix-platform.h +53 -0
- package/include/obs-nix-wayland.h +24 -0
- package/include/obs-nix-x11.h +22 -0
- package/include/obs-nix.h +42 -0
- package/include/obs-output.h +96 -0
- package/include/obs-properties.h +364 -0
- package/include/obs-scene.h +127 -0
- package/include/obs-service.h +115 -0
- package/include/obs-source.h +568 -0
- package/include/obs.h +2608 -0
- package/include/obsconfig.h +13 -0
- package/include/obsversion.h +5 -0
- package/include/util/apple/cfstring-utils.h +16 -0
- package/include/util/array-serializer.h +37 -0
- package/include/util/base.h +97 -0
- package/include/util/bitstream.h +28 -0
- package/include/util/bmem.h +94 -0
- package/include/util/buffered-file-serializer.h +32 -0
- package/include/util/c99defs.h +75 -0
- package/include/util/cf-lexer.h +199 -0
- package/include/util/cf-parser.h +281 -0
- package/include/util/circlebuf.h +319 -0
- package/include/util/config-file.h +103 -0
- package/include/util/crc32.h +29 -0
- package/include/util/curl/curl-helper.h +35 -0
- package/include/util/darray.h +606 -0
- package/include/util/deque.h +319 -0
- package/include/util/dstr.h +320 -0
- package/include/util/file-serializer.h +34 -0
- package/include/util/lexer.h +273 -0
- package/include/util/pipe.h +52 -0
- package/include/util/platform.h +223 -0
- package/include/util/profiler.h +97 -0
- package/include/util/serializer.h +158 -0
- package/include/util/simde/check.h +285 -0
- package/include/util/simde/debug-trap.h +117 -0
- package/include/util/simde/hedley.h +2123 -0
- package/include/util/simde/simde-align.h +481 -0
- package/include/util/simde/simde-arch.h +537 -0
- package/include/util/simde/simde-common.h +918 -0
- package/include/util/simde/simde-constify.h +925 -0
- package/include/util/simde/simde-detect-clang.h +114 -0
- package/include/util/simde/simde-diagnostic.h +447 -0
- package/include/util/simde/simde-features.h +550 -0
- package/include/util/simde/simde-math.h +1858 -0
- package/include/util/simde/x86/mmx.h +2456 -0
- package/include/util/simde/x86/sse.h +4479 -0
- package/include/util/simde/x86/sse2.h +7549 -0
- package/include/util/source-profiler.h +66 -0
- package/include/util/sse-intrin.h +32 -0
- package/include/util/task.h +22 -0
- package/include/util/text-lookup.h +45 -0
- package/include/util/threading-posix.h +77 -0
- package/include/util/threading-windows.h +142 -0
- package/include/util/threading.h +103 -0
- package/include/util/utf8.h +35 -0
- package/include/util/uthash.h +34 -0
- package/include/util/util_uint128.h +108 -0
- package/include/util/util_uint64.h +34 -0
- package/include/util/windows/device-enum.h +14 -0
- package/include/util/windows/obfuscate.h +16 -0
- package/include/util/windows/win-registry.h +37 -0
- package/include/util/windows/win-version.h +57 -0
- package/include/util/windows/window-helpers.h +47 -0
- package/index.d.ts +38 -0
- package/index.js +8 -0
- package/package.json +31 -0
- package/src/main.cpp +321 -0
- package/src/obs_interface.cpp +605 -0
- package/src/obs_interface.h +74 -0
- package/src/utils.cpp +80 -0
- package/src/utils.h +3 -0
|
@@ -0,0 +1,1823 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (C) 2023 by Lain Bailey <lain@obsproject.com>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU General Public License as published by
|
|
6
|
+
the Free Software Foundation, either version 2 of the License, or
|
|
7
|
+
(at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
******************************************************************************/
|
|
17
|
+
|
|
18
|
+
#include "color.effect"
|
|
19
|
+
|
|
20
|
+
uniform float width;
|
|
21
|
+
uniform float height;
|
|
22
|
+
uniform float width_i;
|
|
23
|
+
uniform float height_i;
|
|
24
|
+
uniform float width_d2;
|
|
25
|
+
uniform float height_d2;
|
|
26
|
+
uniform float width_x2_i;
|
|
27
|
+
uniform float height_x2_i;
|
|
28
|
+
uniform float maximum_over_sdr_white_nits;
|
|
29
|
+
uniform float sdr_white_nits_over_maximum;
|
|
30
|
+
uniform float hlg_exponent;
|
|
31
|
+
uniform float hdr_lw;
|
|
32
|
+
uniform float hdr_lmax;
|
|
33
|
+
|
|
34
|
+
uniform float4 color_vec0;
|
|
35
|
+
uniform float4 color_vec1;
|
|
36
|
+
uniform float4 color_vec2;
|
|
37
|
+
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
|
38
|
+
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
|
39
|
+
|
|
40
|
+
uniform texture2d image;
|
|
41
|
+
uniform texture2d image1;
|
|
42
|
+
uniform texture2d image2;
|
|
43
|
+
uniform texture2d image3;
|
|
44
|
+
|
|
45
|
+
sampler_state def_sampler {
|
|
46
|
+
Filter = Linear;
|
|
47
|
+
AddressU = Clamp;
|
|
48
|
+
AddressV = Clamp;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
struct FragPos {
|
|
52
|
+
float4 pos : POSITION;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
struct VertTexPos {
|
|
56
|
+
float2 uv : TEXCOORD0;
|
|
57
|
+
float4 pos : POSITION;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
struct VertTexTexPos {
|
|
61
|
+
float4 uvuv : TEXCOORD0;
|
|
62
|
+
float4 pos : POSITION;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
struct VertTexPosWide {
|
|
66
|
+
float3 uuv : TEXCOORD0;
|
|
67
|
+
float4 pos : POSITION;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
struct VertTexPosWideWide {
|
|
71
|
+
float4 uuvv : TEXCOORD0;
|
|
72
|
+
float4 pos : POSITION;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
struct FragTex {
|
|
76
|
+
float2 uv : TEXCOORD0;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
struct FragTexTex {
|
|
80
|
+
float4 uvuv : TEXCOORD0;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
struct FragTexWide {
|
|
84
|
+
float3 uuv : TEXCOORD0;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
struct FragTexWideWide {
|
|
88
|
+
float4 uuvv : TEXCOORD0;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
FragPos VSPos(uint id : VERTEXID)
|
|
92
|
+
{
|
|
93
|
+
float idHigh = float(id >> 1);
|
|
94
|
+
float idLow = float(id & uint(1));
|
|
95
|
+
|
|
96
|
+
float x = idHigh * 4.0 - 1.0;
|
|
97
|
+
float y = idLow * 4.0 - 1.0;
|
|
98
|
+
|
|
99
|
+
FragPos vert_out;
|
|
100
|
+
vert_out.pos = float4(x, y, 0.0, 1.0);
|
|
101
|
+
return vert_out;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
VertTexPosWide VSTexPos_Left(uint id : VERTEXID)
|
|
105
|
+
{
|
|
106
|
+
float idHigh = float(id >> 1);
|
|
107
|
+
float idLow = float(id & uint(1));
|
|
108
|
+
|
|
109
|
+
float x = idHigh * 4.0 - 1.0;
|
|
110
|
+
float y = idLow * 4.0 - 1.0;
|
|
111
|
+
|
|
112
|
+
float u_right = idHigh * 2.0;
|
|
113
|
+
float u_left = u_right - width_i;
|
|
114
|
+
float v = obs_glsl_compile ? (idLow * 2.0) : (1.0 - idLow * 2.0);
|
|
115
|
+
|
|
116
|
+
VertTexPosWide vert_out;
|
|
117
|
+
vert_out.uuv = float3(u_left, u_right, v);
|
|
118
|
+
vert_out.pos = float4(x, y, 0.0, 1.0);
|
|
119
|
+
return vert_out;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
VertTexPosWideWide VSTexPos_TopLeft(uint id : VERTEXID)
|
|
123
|
+
{
|
|
124
|
+
float idHigh = float(id >> 1);
|
|
125
|
+
float idLow = float(id & uint(1));
|
|
126
|
+
|
|
127
|
+
float x = idHigh * 4.0 - 1.0;
|
|
128
|
+
float y = idLow * 4.0 - 1.0;
|
|
129
|
+
|
|
130
|
+
float u_right = idHigh * 2.0;
|
|
131
|
+
float u_left = u_right - width_i;
|
|
132
|
+
float v_bottom;
|
|
133
|
+
float v_top;
|
|
134
|
+
if (obs_glsl_compile) {
|
|
135
|
+
v_bottom = idLow * 2.0;
|
|
136
|
+
v_top = v_bottom + height_i;
|
|
137
|
+
} else {
|
|
138
|
+
v_bottom = 1.0 - idLow * 2.0;
|
|
139
|
+
v_top = v_bottom - height_i;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
VertTexPosWideWide vert_out;
|
|
143
|
+
vert_out.uuvv = float4(u_left, u_right, v_top, v_bottom);
|
|
144
|
+
vert_out.pos = float4(x, y, 0.0, 1.0);
|
|
145
|
+
return vert_out;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
VertTexTexPos VSPacked422Left_Reverse(uint id : VERTEXID)
|
|
149
|
+
{
|
|
150
|
+
float idHigh = float(id >> 1);
|
|
151
|
+
float idLow = float(id & uint(1));
|
|
152
|
+
|
|
153
|
+
float x = idHigh * 4. - 1.;
|
|
154
|
+
float y = idLow * 4. - 1.;
|
|
155
|
+
|
|
156
|
+
float u = idHigh * 2.;
|
|
157
|
+
float v = idLow * 2.;
|
|
158
|
+
v = obs_glsl_compile ? v : (1. - v);
|
|
159
|
+
|
|
160
|
+
VertTexTexPos vert_out;
|
|
161
|
+
vert_out.uvuv = float4(width_d2 * u, height * v, u + width_x2_i, v);
|
|
162
|
+
vert_out.pos = float4(x, y, 0., 1.);
|
|
163
|
+
return vert_out;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
VertTexPos VS420Left_Reverse(uint id : VERTEXID)
|
|
167
|
+
{
|
|
168
|
+
float idHigh = float(id >> 1);
|
|
169
|
+
float idLow = float(id & uint(1));
|
|
170
|
+
|
|
171
|
+
float x = idHigh * 4. - 1.;
|
|
172
|
+
float y = idLow * 4. - 1.;
|
|
173
|
+
|
|
174
|
+
float u = idHigh * 2. + width_x2_i;
|
|
175
|
+
float v = idLow * 2.;
|
|
176
|
+
v = obs_glsl_compile ? v : (1. - v);
|
|
177
|
+
|
|
178
|
+
VertTexPos vert_out;
|
|
179
|
+
vert_out.uv = float2(u, v);
|
|
180
|
+
vert_out.pos = float4(x, y, 0., 1.);
|
|
181
|
+
return vert_out;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
VertTexPos VS420TopLeft_Reverse(uint id : VERTEXID)
|
|
185
|
+
{
|
|
186
|
+
float idHigh = float(id >> 1);
|
|
187
|
+
float idLow = float(id & uint(1));
|
|
188
|
+
|
|
189
|
+
float x = idHigh * 4. - 1.;
|
|
190
|
+
float y = idLow * 4. - 1.;
|
|
191
|
+
|
|
192
|
+
float u = idHigh * 2. + width_x2_i;
|
|
193
|
+
float v = idLow * 2. - height_x2_i;
|
|
194
|
+
v = obs_glsl_compile ? v : (1. - v);
|
|
195
|
+
|
|
196
|
+
VertTexPos vert_out;
|
|
197
|
+
vert_out.uv = float2(u, v);
|
|
198
|
+
vert_out.pos = float4(x, y, 0., 1.);
|
|
199
|
+
return vert_out;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
VertTexPos VS422Left_Reverse(uint id : VERTEXID)
|
|
203
|
+
{
|
|
204
|
+
float idHigh = float(id >> 1);
|
|
205
|
+
float idLow = float(id & uint(1));
|
|
206
|
+
|
|
207
|
+
float x = idHigh * 4.0 - 1.0;
|
|
208
|
+
float y = idLow * 4.0 - 1.0;
|
|
209
|
+
|
|
210
|
+
float u = idHigh * 2.0 + width_x2_i;
|
|
211
|
+
float v = obs_glsl_compile ? (idLow * 2.0) : (1.0 - idLow * 2.0);
|
|
212
|
+
|
|
213
|
+
VertTexPos vert_out;
|
|
214
|
+
vert_out.uv = float2(u, v);
|
|
215
|
+
vert_out.pos = float4(x, y, 0.0, 1.0);
|
|
216
|
+
return vert_out;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
float PS_Y(FragPos frag_in) : TARGET
|
|
220
|
+
{
|
|
221
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
222
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
223
|
+
return y;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
float PS_P010_PQ_Y_709_2020(FragPos frag_in) : TARGET
|
|
227
|
+
{
|
|
228
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb * sdr_white_nits_over_maximum;
|
|
229
|
+
rgb = rec709_to_rec2020(rgb);
|
|
230
|
+
rgb = linear_to_st2084(rgb);
|
|
231
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
232
|
+
y = floor(saturate(y) * 1023. + 0.5) * (64. / 65535.);
|
|
233
|
+
return y;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
float PS_P010_HLG_Y_709_2020(FragPos frag_in) : TARGET
|
|
237
|
+
{
|
|
238
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb * sdr_white_nits_over_maximum;
|
|
239
|
+
rgb = rec709_to_rec2020(rgb);
|
|
240
|
+
rgb = linear_to_hlg(rgb, hdr_lw);
|
|
241
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
242
|
+
y = floor(saturate(y) * 1023. + 0.5) * (64. / 65535.);
|
|
243
|
+
return y;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
float PS_P010_SRGB_Y(FragPos frag_in) : TARGET
|
|
247
|
+
{
|
|
248
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
249
|
+
rgb = srgb_linear_to_nonlinear(rgb);
|
|
250
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
251
|
+
y = floor(saturate(y) * 1023. + 0.5) * (64. / 65535.);
|
|
252
|
+
return y;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
float PS_P216_PQ_Y_709_2020(FragPos frag_in) : TARGET
|
|
256
|
+
{
|
|
257
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb * sdr_white_nits_over_maximum;
|
|
258
|
+
rgb = rec709_to_rec2020(rgb);
|
|
259
|
+
rgb = linear_to_st2084(rgb);
|
|
260
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
261
|
+
return y;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
float PS_P216_HLG_Y_709_2020(FragPos frag_in) : TARGET
|
|
265
|
+
{
|
|
266
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb * sdr_white_nits_over_maximum;
|
|
267
|
+
rgb = rec709_to_rec2020(rgb);
|
|
268
|
+
rgb = linear_to_hlg(rgb, hdr_lw);
|
|
269
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
270
|
+
return y;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
float PS_P216_SRGB_Y(FragPos frag_in) : TARGET
|
|
274
|
+
{
|
|
275
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
276
|
+
rgb = srgb_linear_to_nonlinear(rgb);
|
|
277
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
278
|
+
return y;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
float PS_P416_PQ_Y_709_2020(FragPos frag_in) : TARGET
|
|
282
|
+
{
|
|
283
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb * sdr_white_nits_over_maximum;
|
|
284
|
+
rgb = rec709_to_rec2020(rgb);
|
|
285
|
+
rgb = linear_to_st2084(rgb);
|
|
286
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
287
|
+
return y;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
float PS_P416_HLG_Y_709_2020(FragPos frag_in) : TARGET
|
|
291
|
+
{
|
|
292
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb * sdr_white_nits_over_maximum;
|
|
293
|
+
rgb = rec709_to_rec2020(rgb);
|
|
294
|
+
rgb = linear_to_hlg(rgb, hdr_lw);
|
|
295
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
296
|
+
return y;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
float PS_P416_SRGB_Y(FragPos frag_in) : TARGET
|
|
300
|
+
{
|
|
301
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
302
|
+
rgb = srgb_linear_to_nonlinear(rgb);
|
|
303
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
304
|
+
return y;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
float PS_I010_PQ_Y_709_2020(FragPos frag_in) : TARGET
|
|
308
|
+
{
|
|
309
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb * sdr_white_nits_over_maximum;
|
|
310
|
+
rgb = rec709_to_rec2020(rgb);
|
|
311
|
+
rgb = linear_to_st2084(rgb);
|
|
312
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
313
|
+
return y * (1023. / 65535.);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
float PS_I010_HLG_Y_709_2020(FragPos frag_in) : TARGET
|
|
317
|
+
{
|
|
318
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb * sdr_white_nits_over_maximum;
|
|
319
|
+
rgb = rec709_to_rec2020(rgb);
|
|
320
|
+
rgb = linear_to_hlg(rgb, hdr_lw);
|
|
321
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
322
|
+
return y * (1023. / 65535.);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
float PS_I010_SRGB_Y(FragPos frag_in) : TARGET
|
|
326
|
+
{
|
|
327
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
328
|
+
rgb = srgb_linear_to_nonlinear(rgb);
|
|
329
|
+
float y = dot(color_vec0.xyz, rgb) + color_vec0.w;
|
|
330
|
+
return y * (1023. / 65535.);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
float2 PS_UV_Wide(FragTexWide frag_in) : TARGET
|
|
334
|
+
{
|
|
335
|
+
float3 rgb_left = image.Sample(def_sampler, frag_in.uuv.xz).rgb;
|
|
336
|
+
float3 rgb_right = image.Sample(def_sampler, frag_in.uuv.yz).rgb;
|
|
337
|
+
float3 rgb = (rgb_left + rgb_right) * 0.5;
|
|
338
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
339
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
340
|
+
return float2(u, v);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
float2 PS_P010_PQ_UV_709_2020_WideWide(FragTexWideWide frag_in) : TARGET
|
|
344
|
+
{
|
|
345
|
+
float3 rgb_topleft = image.Sample(def_sampler, frag_in.uuvv.xz).rgb;
|
|
346
|
+
float3 rgb_topright = image.Sample(def_sampler, frag_in.uuvv.yz).rgb;
|
|
347
|
+
float3 rgb_bottomleft = image.Sample(def_sampler, frag_in.uuvv.xw).rgb;
|
|
348
|
+
float3 rgb_bottomright = image.Sample(def_sampler, frag_in.uuvv.yw).rgb;
|
|
349
|
+
float3 rgb = (rgb_topleft + rgb_topright + rgb_bottomleft + rgb_bottomright) * (0.25 * sdr_white_nits_over_maximum);
|
|
350
|
+
rgb = rec709_to_rec2020(rgb);
|
|
351
|
+
rgb = linear_to_st2084(rgb);
|
|
352
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
353
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
354
|
+
float2 uv = float2(u, v);
|
|
355
|
+
uv = floor(saturate(uv) * 1023. + 0.5) * (64. / 65535.);
|
|
356
|
+
return uv;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
float2 PS_P010_HLG_UV_709_2020_WideWide(FragTexWideWide frag_in) : TARGET
|
|
360
|
+
{
|
|
361
|
+
float3 rgb_topleft = image.Sample(def_sampler, frag_in.uuvv.xz).rgb;
|
|
362
|
+
float3 rgb_topright = image.Sample(def_sampler, frag_in.uuvv.yz).rgb;
|
|
363
|
+
float3 rgb_bottomleft = image.Sample(def_sampler, frag_in.uuvv.xw).rgb;
|
|
364
|
+
float3 rgb_bottomright = image.Sample(def_sampler, frag_in.uuvv.yw).rgb;
|
|
365
|
+
float3 rgb = (rgb_topleft + rgb_topright + rgb_bottomleft + rgb_bottomright) * (0.25 * sdr_white_nits_over_maximum);
|
|
366
|
+
rgb = rec709_to_rec2020(rgb);
|
|
367
|
+
rgb = linear_to_hlg(rgb, hdr_lw);
|
|
368
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
369
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
370
|
+
float2 uv = float2(u, v);
|
|
371
|
+
uv = floor(saturate(uv) * 1023. + 0.5) * (64. / 65535.);
|
|
372
|
+
return uv;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
float2 PS_P010_SRGB_UV_Wide(FragTexWide frag_in) : TARGET
|
|
376
|
+
{
|
|
377
|
+
float3 rgb_left = image.Sample(def_sampler, frag_in.uuv.xz).rgb;
|
|
378
|
+
float3 rgb_right = image.Sample(def_sampler, frag_in.uuv.yz).rgb;
|
|
379
|
+
float3 rgb = (rgb_left + rgb_right) * 0.5;
|
|
380
|
+
rgb = srgb_linear_to_nonlinear(rgb);
|
|
381
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
382
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
383
|
+
float2 uv = float2(u, v);
|
|
384
|
+
uv = floor(saturate(uv) * 1023. + 0.5) * (64. / 65535.);
|
|
385
|
+
return uv;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
float2 PS_P216_PQ_UV_709_2020_Wide(FragTexWide frag_in) : TARGET
|
|
389
|
+
{
|
|
390
|
+
float3 rgb_left = image.Sample(def_sampler, frag_in.uuv.xz).rgb;
|
|
391
|
+
float3 rgb_right = image.Sample(def_sampler, frag_in.uuv.yz).rgb;
|
|
392
|
+
float3 rgb = (rgb_left + rgb_right) * (0.5 * sdr_white_nits_over_maximum);
|
|
393
|
+
rgb = rec709_to_rec2020(rgb);
|
|
394
|
+
rgb = linear_to_st2084(rgb);
|
|
395
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
396
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
397
|
+
float2 uv = float2(u, v);
|
|
398
|
+
return uv;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
float2 PS_P216_HLG_UV_709_2020_Wide(FragTexWide frag_in) : TARGET
|
|
402
|
+
{
|
|
403
|
+
float3 rgb_left = image.Sample(def_sampler, frag_in.uuv.xz).rgb;
|
|
404
|
+
float3 rgb_right = image.Sample(def_sampler, frag_in.uuv.yz).rgb;
|
|
405
|
+
float3 rgb = (rgb_left + rgb_right) * (0.5 * sdr_white_nits_over_maximum);
|
|
406
|
+
rgb = rec709_to_rec2020(rgb);
|
|
407
|
+
rgb = linear_to_hlg(rgb, hdr_lw);
|
|
408
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
409
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
410
|
+
float2 uv = float2(u, v);
|
|
411
|
+
return uv;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
float2 PS_P216_SRGB_UV_Wide(FragTexWide frag_in) : TARGET
|
|
415
|
+
{
|
|
416
|
+
float3 rgb_left = image.Sample(def_sampler, frag_in.uuv.xz).rgb;
|
|
417
|
+
float3 rgb_right = image.Sample(def_sampler, frag_in.uuv.yz).rgb;
|
|
418
|
+
float3 rgb = (rgb_left + rgb_right) * 0.5;
|
|
419
|
+
rgb = srgb_linear_to_nonlinear(rgb);
|
|
420
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
421
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
422
|
+
float2 uv = float2(u, v);
|
|
423
|
+
return uv;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
float2 PS_P416_PQ_UV_709_2020(FragPos frag_in) : TARGET
|
|
427
|
+
{
|
|
428
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
429
|
+
rgb = rec709_to_rec2020(rgb);
|
|
430
|
+
rgb = linear_to_st2084(rgb);
|
|
431
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
432
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
433
|
+
float2 uv = float2(u, v);
|
|
434
|
+
return uv;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
float2 PS_P416_HLG_UV_709_2020(FragPos frag_in) : TARGET
|
|
438
|
+
{
|
|
439
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
440
|
+
rgb = rec709_to_rec2020(rgb);
|
|
441
|
+
rgb = linear_to_hlg(rgb, hdr_lw);
|
|
442
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
443
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
444
|
+
float2 uv = float2(u, v);
|
|
445
|
+
return uv;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
float2 PS_P416_SRGB_UV(FragPos frag_in) : TARGET
|
|
449
|
+
{
|
|
450
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
451
|
+
rgb = srgb_linear_to_nonlinear(rgb);
|
|
452
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
453
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
454
|
+
float2 uv = float2(u, v);
|
|
455
|
+
return uv;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
float PS_U(FragPos frag_in) : TARGET
|
|
459
|
+
{
|
|
460
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
461
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
462
|
+
return u;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
float PS_V(FragPos frag_in) : TARGET
|
|
466
|
+
{
|
|
467
|
+
float3 rgb = image.Load(int3(frag_in.pos.xy, 0)).rgb;
|
|
468
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
469
|
+
return v;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
float PS_U_Wide(FragTexWide frag_in) : TARGET
|
|
473
|
+
{
|
|
474
|
+
float3 rgb_left = image.Sample(def_sampler, frag_in.uuv.xz).rgb;
|
|
475
|
+
float3 rgb_right = image.Sample(def_sampler, frag_in.uuv.yz).rgb;
|
|
476
|
+
float3 rgb = (rgb_left + rgb_right) * 0.5;
|
|
477
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
478
|
+
return u;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
float PS_V_Wide(FragTexWide frag_in) : TARGET
|
|
482
|
+
{
|
|
483
|
+
float3 rgb_left = image.Sample(def_sampler, frag_in.uuv.xz).rgb;
|
|
484
|
+
float3 rgb_right = image.Sample(def_sampler, frag_in.uuv.yz).rgb;
|
|
485
|
+
float3 rgb = (rgb_left + rgb_right) * 0.5;
|
|
486
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
487
|
+
return v;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
float PS_I010_PQ_U_709_2020_WideWide(FragTexWideWide frag_in) : TARGET
|
|
491
|
+
{
|
|
492
|
+
float3 rgb_topleft = image.Sample(def_sampler, frag_in.uuvv.xz).rgb;
|
|
493
|
+
float3 rgb_topright = image.Sample(def_sampler, frag_in.uuvv.yz).rgb;
|
|
494
|
+
float3 rgb_bottomleft = image.Sample(def_sampler, frag_in.uuvv.xw).rgb;
|
|
495
|
+
float3 rgb_bottomright = image.Sample(def_sampler, frag_in.uuvv.yw).rgb;
|
|
496
|
+
float3 rgb = (rgb_topleft + rgb_topright + rgb_bottomleft + rgb_bottomright) * (0.25 * sdr_white_nits_over_maximum);
|
|
497
|
+
rgb = rec709_to_rec2020(rgb);
|
|
498
|
+
rgb = linear_to_st2084(rgb);
|
|
499
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
500
|
+
return u * (1023. / 65535.);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
float PS_I010_HLG_U_709_2020_WideWide(FragTexWideWide frag_in) : TARGET
|
|
504
|
+
{
|
|
505
|
+
float3 rgb_topleft = image.Sample(def_sampler, frag_in.uuvv.xz).rgb;
|
|
506
|
+
float3 rgb_topright = image.Sample(def_sampler, frag_in.uuvv.yz).rgb;
|
|
507
|
+
float3 rgb_bottomleft = image.Sample(def_sampler, frag_in.uuvv.xw).rgb;
|
|
508
|
+
float3 rgb_bottomright = image.Sample(def_sampler, frag_in.uuvv.yw).rgb;
|
|
509
|
+
float3 rgb = (rgb_topleft + rgb_topright + rgb_bottomleft + rgb_bottomright) * (0.25 * sdr_white_nits_over_maximum);
|
|
510
|
+
rgb = rec709_to_rec2020(rgb);
|
|
511
|
+
rgb = linear_to_hlg(rgb, hdr_lw);
|
|
512
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
513
|
+
return u * (1023. / 65535.);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
float PS_I010_SRGB_U_Wide(FragTexWide frag_in) : TARGET
|
|
517
|
+
{
|
|
518
|
+
float3 rgb_left = image.Sample(def_sampler, frag_in.uuv.xz).rgb;
|
|
519
|
+
float3 rgb_right = image.Sample(def_sampler, frag_in.uuv.yz).rgb;
|
|
520
|
+
float3 rgb = (rgb_left + rgb_right) * 0.5;
|
|
521
|
+
rgb = srgb_linear_to_nonlinear(rgb);
|
|
522
|
+
float u = dot(color_vec1.xyz, rgb) + color_vec1.w;
|
|
523
|
+
return u * (1023. / 65535.);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
float PS_I010_PQ_V_709_2020_WideWide(FragTexWideWide frag_in) : TARGET
|
|
527
|
+
{
|
|
528
|
+
float3 rgb_topleft = image.Sample(def_sampler, frag_in.uuvv.xz).rgb;
|
|
529
|
+
float3 rgb_topright = image.Sample(def_sampler, frag_in.uuvv.yz).rgb;
|
|
530
|
+
float3 rgb_bottomleft = image.Sample(def_sampler, frag_in.uuvv.xw).rgb;
|
|
531
|
+
float3 rgb_bottomright = image.Sample(def_sampler, frag_in.uuvv.yw).rgb;
|
|
532
|
+
float3 rgb = (rgb_topleft + rgb_topright + rgb_bottomleft + rgb_bottomright) * (0.25 * sdr_white_nits_over_maximum);
|
|
533
|
+
rgb = rec709_to_rec2020(rgb);
|
|
534
|
+
rgb = linear_to_st2084(rgb);
|
|
535
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
536
|
+
return v * (1023. / 65535.);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
float PS_I010_HLG_V_709_2020_WideWide(FragTexWideWide frag_in) : TARGET
|
|
540
|
+
{
|
|
541
|
+
float3 rgb_topleft = image.Sample(def_sampler, frag_in.uuvv.xz).rgb;
|
|
542
|
+
float3 rgb_topright = image.Sample(def_sampler, frag_in.uuvv.yz).rgb;
|
|
543
|
+
float3 rgb_bottomleft = image.Sample(def_sampler, frag_in.uuvv.xw).rgb;
|
|
544
|
+
float3 rgb_bottomright = image.Sample(def_sampler, frag_in.uuvv.yw).rgb;
|
|
545
|
+
float3 rgb = (rgb_topleft + rgb_topright + rgb_bottomleft + rgb_bottomright) * (0.25 * sdr_white_nits_over_maximum);
|
|
546
|
+
rgb = rec709_to_rec2020(rgb);
|
|
547
|
+
rgb = linear_to_hlg(rgb, hdr_lw);
|
|
548
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
549
|
+
return v * (1023. / 65535.);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
float PS_I010_SRGB_V_Wide(FragTexWide frag_in) : TARGET
|
|
553
|
+
{
|
|
554
|
+
float3 rgb_left = image.Sample(def_sampler, frag_in.uuv.xz).rgb;
|
|
555
|
+
float3 rgb_right = image.Sample(def_sampler, frag_in.uuv.yz).rgb;
|
|
556
|
+
float3 rgb = (rgb_left + rgb_right) * 0.5;
|
|
557
|
+
rgb = srgb_linear_to_nonlinear(rgb);
|
|
558
|
+
float v = dot(color_vec2.xyz, rgb) + color_vec2.w;
|
|
559
|
+
return v * (1023. / 65535.);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
float3 YUV_to_RGB(float3 yuv)
|
|
563
|
+
{
|
|
564
|
+
yuv = clamp(yuv, color_range_min, color_range_max);
|
|
565
|
+
float r = dot(color_vec0.xyz, yuv) + color_vec0.w;
|
|
566
|
+
float g = dot(color_vec1.xyz, yuv) + color_vec1.w;
|
|
567
|
+
float b = dot(color_vec2.xyz, yuv) + color_vec2.w;
|
|
568
|
+
return float3(r, g, b);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
float3 PSUYVY_Reverse(FragTexTex frag_in) : TARGET
|
|
572
|
+
{
|
|
573
|
+
float2 y01 = image.Load(int3(frag_in.uvuv.xy, 0)).yw;
|
|
574
|
+
float2 cbcr = image.Sample(def_sampler, frag_in.uvuv.zw, 0).zx;
|
|
575
|
+
float leftover = frac(frag_in.uvuv.x);
|
|
576
|
+
float y = (leftover < 0.5) ? y01.x : y01.y;
|
|
577
|
+
float3 yuv = float3(y, cbcr);
|
|
578
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
579
|
+
return rgb;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
float3 PSYUY2_Reverse(FragTexTex frag_in) : TARGET
|
|
583
|
+
{
|
|
584
|
+
float2 y01 = image.Load(int3(frag_in.uvuv.xy, 0)).zx;
|
|
585
|
+
float2 cbcr = image.Sample(def_sampler, frag_in.uvuv.zw, 0).yw;
|
|
586
|
+
float leftover = frac(frag_in.uvuv.x);
|
|
587
|
+
float y = (leftover < 0.5) ? y01.x : y01.y;
|
|
588
|
+
float3 yuv = float3(y, cbcr);
|
|
589
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
590
|
+
return rgb;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
float4 PSYUY2_PQ_Reverse(FragTexTex frag_in) : TARGET
|
|
594
|
+
{
|
|
595
|
+
float2 y01 = image.Load(int3(frag_in.uvuv.xy, 0)).zx;
|
|
596
|
+
float2 cbcr = image.Sample(def_sampler, frag_in.uvuv.zw, 0).yw;
|
|
597
|
+
float leftover = frac(frag_in.uvuv.x);
|
|
598
|
+
float y = (leftover < 0.5) ? y01.x : y01.y;
|
|
599
|
+
float3 yuv = float3(y, cbcr);
|
|
600
|
+
float3 pq = YUV_to_RGB(yuv);
|
|
601
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
602
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
603
|
+
return float4(rgb, 1.);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
float4 PSYUY2_HLG_Reverse(FragTexTex frag_in) : TARGET
|
|
607
|
+
{
|
|
608
|
+
float2 y01 = image.Load(int3(frag_in.uvuv.xy, 0)).zx;
|
|
609
|
+
float2 cbcr = image.Sample(def_sampler, frag_in.uvuv.zw, 0).yw;
|
|
610
|
+
float leftover = frac(frag_in.uvuv.x);
|
|
611
|
+
float y = (leftover < 0.5) ? y01.x : y01.y;
|
|
612
|
+
float3 yuv = float3(y, cbcr);
|
|
613
|
+
float3 hlg = YUV_to_RGB(yuv);
|
|
614
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
615
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
616
|
+
return float4(rgb, 1.);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
float3 PSYVYU_Reverse(FragTexTex frag_in) : TARGET
|
|
620
|
+
{
|
|
621
|
+
float2 y01 = image.Load(int3(frag_in.uvuv.xy, 0)).zx;
|
|
622
|
+
float2 cbcr = image.Sample(def_sampler, frag_in.uvuv.zw, 0).wy;
|
|
623
|
+
float leftover = frac(frag_in.uvuv.x);
|
|
624
|
+
float y = (leftover < 0.5) ? y01.x : y01.y;
|
|
625
|
+
float3 yuv = float3(y, cbcr);
|
|
626
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
627
|
+
return rgb;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
float3 PSPlanar420_Reverse(VertTexPos frag_in) : TARGET
|
|
631
|
+
{
|
|
632
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
633
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x;
|
|
634
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x;
|
|
635
|
+
float3 yuv = float3(y, cb, cr);
|
|
636
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
637
|
+
return rgb;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
float4 PSPlanar420_PQ_Reverse(VertTexPos frag_in) : TARGET
|
|
641
|
+
{
|
|
642
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
643
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x;
|
|
644
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x;
|
|
645
|
+
float3 yuv = float3(y, cb, cr);
|
|
646
|
+
float3 pq = YUV_to_RGB(yuv);
|
|
647
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
648
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
649
|
+
return float4(rgb, 1.);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
float4 PSPlanar420_HLG_Reverse(VertTexPos frag_in) : TARGET
|
|
653
|
+
{
|
|
654
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
655
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x;
|
|
656
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x;
|
|
657
|
+
float3 yuv = float3(y, cb, cr);
|
|
658
|
+
float3 hlg = YUV_to_RGB(yuv);
|
|
659
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
660
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
661
|
+
return float4(rgb, 1.);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
float4 PSPlanar420A_Reverse(VertTexPos frag_in) : TARGET
|
|
665
|
+
{
|
|
666
|
+
int3 xy0_luma = int3(frag_in.pos.xy, 0);
|
|
667
|
+
float y = image.Load(xy0_luma).x;
|
|
668
|
+
float alpha = image3.Load(xy0_luma).x;
|
|
669
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x;
|
|
670
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x;
|
|
671
|
+
float3 yuv = float3(y, cb, cr);
|
|
672
|
+
float4 rgba = float4(YUV_to_RGB(yuv), alpha);
|
|
673
|
+
return rgba;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
float3 PSPlanar422_Reverse(VertTexPos frag_in) : TARGET
|
|
677
|
+
{
|
|
678
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
679
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x;
|
|
680
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x;
|
|
681
|
+
float3 yuv = float3(y, cb, cr);
|
|
682
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
683
|
+
return rgb;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
float4 PSPlanar422_10LE_Reverse(VertTexPos frag_in) : TARGET
|
|
687
|
+
{
|
|
688
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
689
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x;
|
|
690
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x;
|
|
691
|
+
float3 yuv = float3(y, cb, cr);
|
|
692
|
+
yuv *= 65535. / 1023.;
|
|
693
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
694
|
+
rgb = srgb_nonlinear_to_linear(rgb);
|
|
695
|
+
return float4(rgb, 1.);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
float4 PSPlanar422_10LE_PQ_Reverse(VertTexPos frag_in) : TARGET
|
|
699
|
+
{
|
|
700
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
701
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x;
|
|
702
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x;
|
|
703
|
+
float3 yuv = float3(y, cb, cr);
|
|
704
|
+
yuv *= 65535. / 1023.;
|
|
705
|
+
float3 pq = YUV_to_RGB(yuv);
|
|
706
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
707
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
708
|
+
return float4(rgb, 1.);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
float4 PSPlanar422_10LE_HLG_Reverse(VertTexPos frag_in) : TARGET
|
|
712
|
+
{
|
|
713
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
714
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x;
|
|
715
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x;
|
|
716
|
+
float3 yuv = float3(y, cb, cr);
|
|
717
|
+
yuv *= 65535. / 1023.;
|
|
718
|
+
float3 hlg = YUV_to_RGB(yuv);
|
|
719
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
720
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
721
|
+
return float4(rgb, 1.);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
float4 PSPlanar422A_Reverse(VertTexPos frag_in) : TARGET
|
|
725
|
+
{
|
|
726
|
+
int3 xy0_luma = int3(frag_in.pos.xy, 0);
|
|
727
|
+
float y = image.Load(xy0_luma).x;
|
|
728
|
+
float alpha = image3.Load(xy0_luma).x;
|
|
729
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x;
|
|
730
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x;
|
|
731
|
+
float3 yuv = float3(y, cb, cr);
|
|
732
|
+
float4 rgba = float4(YUV_to_RGB(yuv), alpha);
|
|
733
|
+
return rgba;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
float3 PSPlanar444_Reverse(FragPos frag_in) : TARGET
|
|
737
|
+
{
|
|
738
|
+
int3 xy0 = int3(frag_in.pos.xy, 0);
|
|
739
|
+
float y = image.Load(xy0).x;
|
|
740
|
+
float cb = image1.Load(xy0).x;
|
|
741
|
+
float cr = image2.Load(xy0).x;
|
|
742
|
+
float3 yuv = float3(y, cb, cr);
|
|
743
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
744
|
+
return rgb;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
float4 PSPlanar444_12LE_Reverse(FragPos frag_in) : TARGET
|
|
748
|
+
{
|
|
749
|
+
int3 xy0 = int3(frag_in.pos.xy, 0);
|
|
750
|
+
float y = image.Load(xy0).x;
|
|
751
|
+
float cb = image1.Load(xy0).x;
|
|
752
|
+
float cr = image2.Load(xy0).x;
|
|
753
|
+
float3 yuv = float3(y, cb, cr);
|
|
754
|
+
yuv *= 65535. / 4095.;
|
|
755
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
756
|
+
rgb = srgb_nonlinear_to_linear(rgb);
|
|
757
|
+
return float4(rgb, 1.);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
float4 PSPlanar444_12LE_PQ_Reverse(FragPos frag_in) : TARGET
|
|
761
|
+
{
|
|
762
|
+
int3 xy0 = int3(frag_in.pos.xy, 0);
|
|
763
|
+
float y = image.Load(xy0).x;
|
|
764
|
+
float cb = image1.Load(xy0).x;
|
|
765
|
+
float cr = image2.Load(xy0).x;
|
|
766
|
+
float3 yuv = float3(y, cb, cr);
|
|
767
|
+
yuv *= 65535. / 4095;
|
|
768
|
+
float3 pq = YUV_to_RGB(yuv);
|
|
769
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
770
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
771
|
+
return float4(rgb, 1.);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
float4 PSPlanar444_12LE_HLG_Reverse(FragPos frag_in) : TARGET
|
|
775
|
+
{
|
|
776
|
+
int3 xy0 = int3(frag_in.pos.xy, 0);
|
|
777
|
+
float y = image.Load(xy0).x;
|
|
778
|
+
float cb = image1.Load(xy0).x;
|
|
779
|
+
float cr = image2.Load(xy0).x;
|
|
780
|
+
float3 yuv = float3(y, cb, cr);
|
|
781
|
+
yuv *= 65535. / 4095;
|
|
782
|
+
float3 hlg = YUV_to_RGB(yuv);
|
|
783
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
784
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
785
|
+
return float4(rgb, 1.);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
float4 PSPlanar444A_Reverse(FragPos frag_in) : TARGET
|
|
789
|
+
{
|
|
790
|
+
int3 xy0 = int3(frag_in.pos.xy, 0);
|
|
791
|
+
float y = image.Load(xy0).x;
|
|
792
|
+
float cb = image1.Load(xy0).x;
|
|
793
|
+
float cr = image2.Load(xy0).x;
|
|
794
|
+
float alpha = image3.Load(xy0).x;
|
|
795
|
+
float3 yuv = float3(y, cb, cr);
|
|
796
|
+
float4 rgba = float4(YUV_to_RGB(yuv), alpha);
|
|
797
|
+
return rgba;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
float4 PSPlanar444A_12LE_Reverse(FragPos frag_in) : TARGET
|
|
801
|
+
{
|
|
802
|
+
int3 xy0 = int3(frag_in.pos.xy, 0);
|
|
803
|
+
float y = image.Load(xy0).x;
|
|
804
|
+
float cb = image1.Load(xy0).x;
|
|
805
|
+
float cr = image2.Load(xy0).x;
|
|
806
|
+
float alpha = image3.Load(xy0).x * 16.;
|
|
807
|
+
float3 yuv = float3(y, cb, cr);
|
|
808
|
+
yuv *= 65535. / 4095.;
|
|
809
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
810
|
+
rgb = srgb_nonlinear_to_linear(rgb);
|
|
811
|
+
return float4(rgb, alpha);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
float4 PSAYUV_Reverse(FragPos frag_in) : TARGET
|
|
815
|
+
{
|
|
816
|
+
float4 yuva = image.Load(int3(frag_in.pos.xy, 0));
|
|
817
|
+
float4 rgba = float4(YUV_to_RGB(yuva.xyz), yuva.a);
|
|
818
|
+
return rgba;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
float3 PSNV12_Reverse(VertTexPos frag_in) : TARGET
|
|
822
|
+
{
|
|
823
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
824
|
+
float2 cbcr = image1.Sample(def_sampler, frag_in.uv).xy;
|
|
825
|
+
float3 yuv = float3(y, cbcr);
|
|
826
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
827
|
+
return rgb;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
float4 PSNV12_PQ_Reverse(VertTexPos frag_in) : TARGET
|
|
831
|
+
{
|
|
832
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
833
|
+
float2 cbcr = image1.Sample(def_sampler, frag_in.uv).xy;
|
|
834
|
+
float3 yuv = float3(y, cbcr);
|
|
835
|
+
float3 pq = YUV_to_RGB(yuv);
|
|
836
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
837
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
838
|
+
return float4(rgb, 1.);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
float4 PSNV12_HLG_Reverse(VertTexPos frag_in) : TARGET
|
|
842
|
+
{
|
|
843
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
844
|
+
float2 cbcr = image1.Sample(def_sampler, frag_in.uv).xy;
|
|
845
|
+
float3 yuv = float3(y, cbcr);
|
|
846
|
+
float3 hlg = YUV_to_RGB(yuv);
|
|
847
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
848
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
849
|
+
return float4(rgb, 1.);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
float4 PSI010_SRGB_Reverse(VertTexPos frag_in) : TARGET
|
|
853
|
+
{
|
|
854
|
+
float ratio = 65535. / 1023.;
|
|
855
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x * ratio;
|
|
856
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x * ratio;
|
|
857
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x * ratio;
|
|
858
|
+
float3 yuv = float3(y, cb, cr);
|
|
859
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
860
|
+
rgb = srgb_nonlinear_to_linear(rgb);
|
|
861
|
+
return float4(rgb, 1.);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
float4 PSI010_PQ_2020_709_Reverse(VertTexPos frag_in) : TARGET
|
|
865
|
+
{
|
|
866
|
+
float ratio = 65535. / 1023.;
|
|
867
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x * ratio;
|
|
868
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x * ratio;
|
|
869
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x * ratio;
|
|
870
|
+
float3 yuv = float3(y, cb, cr);
|
|
871
|
+
float3 pq = YUV_to_RGB(yuv);
|
|
872
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
873
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
874
|
+
return float4(rgb, 1.);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
float4 PSI010_HLG_2020_709_Reverse(VertTexPos frag_in) : TARGET
|
|
878
|
+
{
|
|
879
|
+
float ratio = 65535. / 1023.;
|
|
880
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x * ratio;
|
|
881
|
+
float cb = image1.Sample(def_sampler, frag_in.uv).x * ratio;
|
|
882
|
+
float cr = image2.Sample(def_sampler, frag_in.uv).x * ratio;
|
|
883
|
+
float3 yuv = float3(y, cb, cr);
|
|
884
|
+
float3 hlg = YUV_to_RGB(yuv);
|
|
885
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
886
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
887
|
+
return float4(rgb, 1.);
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
float4 PSP010_SRGB_Reverse(VertTexPos frag_in) : TARGET
|
|
891
|
+
{
|
|
892
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
893
|
+
float2 cbcr = image1.Sample(def_sampler, frag_in.uv).xy;
|
|
894
|
+
float3 yuv_65535 = floor(float3(y, cbcr) * 65535. + 0.5);
|
|
895
|
+
float3 yuv_1023 = floor(yuv_65535 * 0.015625);
|
|
896
|
+
float3 yuv = yuv_1023 / 1023.;
|
|
897
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
898
|
+
rgb = srgb_nonlinear_to_linear(rgb);
|
|
899
|
+
return float4(rgb, 1.);
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
float4 PSP010_PQ_2020_709_Reverse(VertTexPos frag_in) : TARGET
|
|
903
|
+
{
|
|
904
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
905
|
+
float2 cbcr = image1.Sample(def_sampler, frag_in.uv).xy;
|
|
906
|
+
float3 yuv_65535 = floor(float3(y, cbcr) * 65535. + 0.5);
|
|
907
|
+
float3 yuv_1023 = floor(yuv_65535 * 0.015625);
|
|
908
|
+
float3 yuv = yuv_1023 / 1023.;
|
|
909
|
+
float3 pq = YUV_to_RGB(yuv);
|
|
910
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
911
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
912
|
+
return float4(rgb, 1.);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
float4 PSP010_HLG_2020_709_Reverse(VertTexPos frag_in) : TARGET
|
|
916
|
+
{
|
|
917
|
+
float y = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
918
|
+
float2 cbcr = image1.Sample(def_sampler, frag_in.uv).xy;
|
|
919
|
+
float3 yuv_65535 = floor(float3(y, cbcr) * 65535. + 0.5);
|
|
920
|
+
float3 yuv_1023 = floor(yuv_65535 * 0.015625);
|
|
921
|
+
float3 yuv = yuv_1023 / 1023.;
|
|
922
|
+
float3 hlg = YUV_to_RGB(yuv);
|
|
923
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
924
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
925
|
+
return float4(rgb, 1.);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
float3 compute_v210_reverse(float2 pos)
|
|
929
|
+
{
|
|
930
|
+
uint x = uint(pos.x);
|
|
931
|
+
uint packed_x = x % 6u;
|
|
932
|
+
uint base_x = x / 6u * 4u;
|
|
933
|
+
float y, cb, cr;
|
|
934
|
+
if (packed_x == 0u)
|
|
935
|
+
{
|
|
936
|
+
float3 word0_rgb = image.Load(int3(base_x, pos.y, 0)).rgb;
|
|
937
|
+
y = word0_rgb.y;
|
|
938
|
+
cb = word0_rgb.x;
|
|
939
|
+
cr = word0_rgb.z;
|
|
940
|
+
}
|
|
941
|
+
else if (packed_x == 1u)
|
|
942
|
+
{
|
|
943
|
+
float2 word0_rb = image.Load(int3(base_x, pos.y, 0)).rb;
|
|
944
|
+
float2 word1_rg = image.Load(int3(base_x + 1u, pos.y, 0)).rg;
|
|
945
|
+
y = word1_rg.x;
|
|
946
|
+
cb = (word0_rb.x + word1_rg.y) * 0.5;
|
|
947
|
+
cr = (word0_rb.y + image.Load(int3(base_x + 2u, pos.y, 0)).r) * 0.5;
|
|
948
|
+
}
|
|
949
|
+
else if (packed_x == 2u)
|
|
950
|
+
{
|
|
951
|
+
float2 word1_gb = image.Load(int3(base_x + 1u, pos.y, 0)).gb;
|
|
952
|
+
y = word1_gb.y;
|
|
953
|
+
cb = word1_gb.x;
|
|
954
|
+
cr = image.Load(int3(base_x + 2u, pos.y, 0)).r;
|
|
955
|
+
}
|
|
956
|
+
else if (packed_x == 3u)
|
|
957
|
+
{
|
|
958
|
+
float2 word2_rb = image.Load(int3(base_x + 2u, pos.y, 0)).rb;
|
|
959
|
+
y = image.Load(int3(base_x + 2u, pos.y, 0)).g;
|
|
960
|
+
cb = (image.Load(int3(base_x + 1u, pos.y, 0)).g + word2_rb.y) * 0.5;
|
|
961
|
+
cr = (word2_rb.x + image.Load(int3(base_x + 3u, pos.y, 0)).g) * 0.5;
|
|
962
|
+
}
|
|
963
|
+
else if (packed_x == 4u)
|
|
964
|
+
{
|
|
965
|
+
float2 word3_rg = image.Load(int3(base_x + 3u, pos.y, 0)).rg;
|
|
966
|
+
y = word3_rg.x;
|
|
967
|
+
cb = image.Load(int3(base_x + 2u, pos.y, 0)).b;
|
|
968
|
+
cr = word3_rg.y;
|
|
969
|
+
}
|
|
970
|
+
else
|
|
971
|
+
{
|
|
972
|
+
float2 word3_gb = image.Load(int3(base_x + 3u, pos.y, 0)).gb;
|
|
973
|
+
y = word3_gb.y;
|
|
974
|
+
cb = image.Load(int3(base_x + 2u, pos.y, 0)).b;
|
|
975
|
+
cr = word3_gb.x;
|
|
976
|
+
uint base_x_4 = base_x + 4u;
|
|
977
|
+
if ((pos.x + 1.) < width)
|
|
978
|
+
{
|
|
979
|
+
float2 word4_gb = image.Load(int3(base_x + 4u, pos.y, 0)).rb;
|
|
980
|
+
cb = (cb + word4_gb.x) * 0.5;
|
|
981
|
+
cr = (cr + word4_gb.y) * 0.5;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
float3 yuv_65535 = floor(float3(y, cb, cr) * 65535. + 0.5);
|
|
985
|
+
float3 yuv_1023 = floor(yuv_65535 * 0.015625);
|
|
986
|
+
float3 yuv = yuv_1023 / 1023.;
|
|
987
|
+
float3 rgb = YUV_to_RGB(yuv);
|
|
988
|
+
return rgb;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
float4 PSV210_SRGB_Reverse(FragPos frag_in) : TARGET
|
|
992
|
+
{
|
|
993
|
+
float3 rgb = compute_v210_reverse(frag_in.pos.xy);
|
|
994
|
+
rgb = srgb_nonlinear_to_linear(rgb);
|
|
995
|
+
return float4(rgb, 1.);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
float4 PSV210_PQ_2020_709_Reverse(FragPos frag_in) : TARGET
|
|
999
|
+
{
|
|
1000
|
+
float3 pq = compute_v210_reverse(frag_in.pos.xy);
|
|
1001
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
1002
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
1003
|
+
return float4(rgb, 1.);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
float4 PSV210_HLG_2020_709_Reverse(FragPos frag_in) : TARGET
|
|
1007
|
+
{
|
|
1008
|
+
float3 hlg = compute_v210_reverse(frag_in.pos.xy);
|
|
1009
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
1010
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
1011
|
+
return float4(rgb, 1.);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
float3 PSY800_Limited(FragPos frag_in) : TARGET
|
|
1015
|
+
{
|
|
1016
|
+
float limited = image.Load(int3(frag_in.pos.xy, 0)).x;
|
|
1017
|
+
float full = (255.0 / 219.0) * limited - (16.0 / 219.0);
|
|
1018
|
+
return float3(full, full, full);
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
float3 PSY800_Full(FragPos frag_in) : TARGET
|
|
1022
|
+
{
|
|
1023
|
+
float3 full = image.Load(int3(frag_in.pos.xy, 0)).xxx;
|
|
1024
|
+
return full;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
float4 PSRGB_Limited(FragPos frag_in) : TARGET
|
|
1028
|
+
{
|
|
1029
|
+
float4 rgba = image.Load(int3(frag_in.pos.xy, 0));
|
|
1030
|
+
rgba.rgb = (255.0 / 219.0) * rgba.rgb - (16.0 / 219.0);
|
|
1031
|
+
return rgba;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
float3 PSBGR3_Limited(FragPos frag_in) : TARGET
|
|
1035
|
+
{
|
|
1036
|
+
float x = frag_in.pos.x * 3.0;
|
|
1037
|
+
float y = frag_in.pos.y;
|
|
1038
|
+
float b = image.Load(int3(x - 1.0, y, 0)).x;
|
|
1039
|
+
float g = image.Load(int3(x, y, 0)).x;
|
|
1040
|
+
float r = image.Load(int3(x + 1.0, y, 0)).x;
|
|
1041
|
+
float3 rgb = float3(r, g, b);
|
|
1042
|
+
rgb = (255.0 / 219.0) * rgb - (16.0 / 219.0);
|
|
1043
|
+
return rgb;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
float3 PSBGR3_Full(FragPos frag_in) : TARGET
|
|
1047
|
+
{
|
|
1048
|
+
float x = frag_in.pos.x * 3.0;
|
|
1049
|
+
float y = frag_in.pos.y;
|
|
1050
|
+
float b = image.Load(int3(x - 1.0, y, 0)).x;
|
|
1051
|
+
float g = image.Load(int3(x, y, 0)).x;
|
|
1052
|
+
float r = image.Load(int3(x + 1.0, y, 0)).x;
|
|
1053
|
+
float3 rgb = float3(r, g, b);
|
|
1054
|
+
return rgb;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
float3 compute_r10l_reverse(float2 pos, bool limited)
|
|
1058
|
+
{
|
|
1059
|
+
float4 xyzw = image.Load(int3(pos, 0)).bgra;
|
|
1060
|
+
uint4 xyzw255 = uint4(mad(xyzw, 255., 0.5));
|
|
1061
|
+
uint r = ((xyzw255.z & 0xC0u) >> 6) | (xyzw255.w << 2);
|
|
1062
|
+
uint g = ((xyzw255.y & 0xFu) >> 4) | ((xyzw255.z & 0x3Fu) << 4);
|
|
1063
|
+
uint b = (xyzw255.x >> 2) | ((xyzw255.y & 0xFu) << 6);
|
|
1064
|
+
float3 rgb = float3(uint3(r, g, b));
|
|
1065
|
+
if (limited)
|
|
1066
|
+
{
|
|
1067
|
+
rgb = mad(rgb, 1. / 876., -16. / 219.);
|
|
1068
|
+
}
|
|
1069
|
+
else
|
|
1070
|
+
{
|
|
1071
|
+
rgb /= 1023.;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
return rgb;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
float4 PSR10L_SRGB_Full_Reverse(FragPos frag_in) : TARGET
|
|
1078
|
+
{
|
|
1079
|
+
float3 rgb = compute_r10l_reverse(frag_in.pos.xy, false);
|
|
1080
|
+
rgb = srgb_nonlinear_to_linear(rgb);
|
|
1081
|
+
return float4(rgb, 1.);
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
float4 PSR10L_PQ_2020_709_Full_Reverse(FragPos frag_in) : TARGET
|
|
1085
|
+
{
|
|
1086
|
+
float3 pq = compute_r10l_reverse(frag_in.pos.xy, false);
|
|
1087
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
1088
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
1089
|
+
return float4(rgb, 1.);
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
float4 PSR10L_HLG_2020_709_Full_Reverse(FragPos frag_in) : TARGET
|
|
1093
|
+
{
|
|
1094
|
+
float3 hlg = compute_r10l_reverse(frag_in.pos.xy, false);
|
|
1095
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
1096
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
1097
|
+
return float4(rgb, 1.);
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
float4 PSR10L_SRGB_Limited_Reverse(FragPos frag_in) : TARGET
|
|
1101
|
+
{
|
|
1102
|
+
float3 rgb = compute_r10l_reverse(frag_in.pos.xy, true);
|
|
1103
|
+
rgb = srgb_nonlinear_to_linear(rgb);
|
|
1104
|
+
return float4(rgb, 1.);
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
float4 PSR10L_PQ_2020_709_Limited_Reverse(FragPos frag_in) : TARGET
|
|
1108
|
+
{
|
|
1109
|
+
float3 pq = compute_r10l_reverse(frag_in.pos.xy, true);
|
|
1110
|
+
float3 hdr2020 = st2084_to_linear_eetf(pq, hdr_lw, hdr_lmax) * maximum_over_sdr_white_nits;
|
|
1111
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
1112
|
+
return float4(rgb, 1.);
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
float4 PSR10L_HLG_2020_709_Limited_Reverse(FragPos frag_in) : TARGET
|
|
1116
|
+
{
|
|
1117
|
+
float3 hlg = compute_r10l_reverse(frag_in.pos.xy, true);
|
|
1118
|
+
float3 hdr2020 = hlg_to_linear(hlg, hlg_exponent) * maximum_over_sdr_white_nits;
|
|
1119
|
+
float3 rgb = rec2020_to_rec709(hdr2020);
|
|
1120
|
+
return float4(rgb, 1.);
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
technique Planar_Y
|
|
1124
|
+
{
|
|
1125
|
+
pass
|
|
1126
|
+
{
|
|
1127
|
+
vertex_shader = VSPos(id);
|
|
1128
|
+
pixel_shader = PS_Y(frag_in);
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
technique Planar_U
|
|
1133
|
+
{
|
|
1134
|
+
pass
|
|
1135
|
+
{
|
|
1136
|
+
vertex_shader = VSPos(id);
|
|
1137
|
+
pixel_shader = PS_U(frag_in);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
technique Planar_V
|
|
1142
|
+
{
|
|
1143
|
+
pass
|
|
1144
|
+
{
|
|
1145
|
+
vertex_shader = VSPos(id);
|
|
1146
|
+
pixel_shader = PS_V(frag_in);
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
technique Planar_U_Left
|
|
1151
|
+
{
|
|
1152
|
+
pass
|
|
1153
|
+
{
|
|
1154
|
+
vertex_shader = VSTexPos_Left(id);
|
|
1155
|
+
pixel_shader = PS_U_Wide(frag_in);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
technique Planar_V_Left
|
|
1160
|
+
{
|
|
1161
|
+
pass
|
|
1162
|
+
{
|
|
1163
|
+
vertex_shader = VSTexPos_Left(id);
|
|
1164
|
+
pixel_shader = PS_V_Wide(frag_in);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
technique NV12_Y
|
|
1169
|
+
{
|
|
1170
|
+
pass
|
|
1171
|
+
{
|
|
1172
|
+
vertex_shader = VSPos(id);
|
|
1173
|
+
pixel_shader = PS_Y(frag_in);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
technique NV12_UV
|
|
1178
|
+
{
|
|
1179
|
+
pass
|
|
1180
|
+
{
|
|
1181
|
+
vertex_shader = VSTexPos_Left(id);
|
|
1182
|
+
pixel_shader = PS_UV_Wide(frag_in);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
technique I010_PQ_Y
|
|
1187
|
+
{
|
|
1188
|
+
pass
|
|
1189
|
+
{
|
|
1190
|
+
vertex_shader = VSPos(id);
|
|
1191
|
+
pixel_shader = PS_I010_PQ_Y_709_2020(frag_in);
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
technique I010_HLG_Y
|
|
1196
|
+
{
|
|
1197
|
+
pass
|
|
1198
|
+
{
|
|
1199
|
+
vertex_shader = VSPos(id);
|
|
1200
|
+
pixel_shader = PS_I010_HLG_Y_709_2020(frag_in);
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
technique I010_SRGB_Y
|
|
1205
|
+
{
|
|
1206
|
+
pass
|
|
1207
|
+
{
|
|
1208
|
+
vertex_shader = VSPos(id);
|
|
1209
|
+
pixel_shader = PS_I010_SRGB_Y(frag_in);
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
technique I010_PQ_U
|
|
1214
|
+
{
|
|
1215
|
+
pass
|
|
1216
|
+
{
|
|
1217
|
+
vertex_shader = VSTexPos_TopLeft(id);
|
|
1218
|
+
pixel_shader = PS_I010_PQ_U_709_2020_WideWide(frag_in);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
technique I010_HLG_U
|
|
1223
|
+
{
|
|
1224
|
+
pass
|
|
1225
|
+
{
|
|
1226
|
+
vertex_shader = VSTexPos_TopLeft(id);
|
|
1227
|
+
pixel_shader = PS_I010_HLG_U_709_2020_WideWide(frag_in);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
technique I010_SRGB_U
|
|
1232
|
+
{
|
|
1233
|
+
pass
|
|
1234
|
+
{
|
|
1235
|
+
vertex_shader = VSTexPos_Left(id);
|
|
1236
|
+
pixel_shader = PS_I010_SRGB_U_Wide(frag_in);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
technique I010_PQ_V
|
|
1241
|
+
{
|
|
1242
|
+
pass
|
|
1243
|
+
{
|
|
1244
|
+
vertex_shader = VSTexPos_TopLeft(id);
|
|
1245
|
+
pixel_shader = PS_I010_PQ_V_709_2020_WideWide(frag_in);
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
technique I010_HLG_V
|
|
1250
|
+
{
|
|
1251
|
+
pass
|
|
1252
|
+
{
|
|
1253
|
+
vertex_shader = VSTexPos_TopLeft(id);
|
|
1254
|
+
pixel_shader = PS_I010_HLG_V_709_2020_WideWide(frag_in);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
technique I010_SRGB_V
|
|
1259
|
+
{
|
|
1260
|
+
pass
|
|
1261
|
+
{
|
|
1262
|
+
vertex_shader = VSTexPos_Left(id);
|
|
1263
|
+
pixel_shader = PS_I010_SRGB_V_Wide(frag_in);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
technique P010_PQ_Y
|
|
1268
|
+
{
|
|
1269
|
+
pass
|
|
1270
|
+
{
|
|
1271
|
+
vertex_shader = VSPos(id);
|
|
1272
|
+
pixel_shader = PS_P010_PQ_Y_709_2020(frag_in);
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
technique P010_HLG_Y
|
|
1277
|
+
{
|
|
1278
|
+
pass
|
|
1279
|
+
{
|
|
1280
|
+
vertex_shader = VSPos(id);
|
|
1281
|
+
pixel_shader = PS_P010_HLG_Y_709_2020(frag_in);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
technique P010_SRGB_Y
|
|
1286
|
+
{
|
|
1287
|
+
pass
|
|
1288
|
+
{
|
|
1289
|
+
vertex_shader = VSPos(id);
|
|
1290
|
+
pixel_shader = PS_P010_SRGB_Y(frag_in);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
technique P010_PQ_UV
|
|
1295
|
+
{
|
|
1296
|
+
pass
|
|
1297
|
+
{
|
|
1298
|
+
vertex_shader = VSTexPos_TopLeft(id);
|
|
1299
|
+
pixel_shader = PS_P010_PQ_UV_709_2020_WideWide(frag_in);
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
technique P010_HLG_UV
|
|
1304
|
+
{
|
|
1305
|
+
pass
|
|
1306
|
+
{
|
|
1307
|
+
vertex_shader = VSTexPos_TopLeft(id);
|
|
1308
|
+
pixel_shader = PS_P010_HLG_UV_709_2020_WideWide(frag_in);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
technique P010_SRGB_UV
|
|
1313
|
+
{
|
|
1314
|
+
pass
|
|
1315
|
+
{
|
|
1316
|
+
vertex_shader = VSTexPos_Left(id);
|
|
1317
|
+
pixel_shader = PS_P010_SRGB_UV_Wide(frag_in);
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
technique P216_PQ_Y
|
|
1322
|
+
{
|
|
1323
|
+
pass
|
|
1324
|
+
{
|
|
1325
|
+
vertex_shader = VSPos(id);
|
|
1326
|
+
pixel_shader = PS_P216_PQ_Y_709_2020(frag_in);
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
technique P216_HLG_Y
|
|
1331
|
+
{
|
|
1332
|
+
pass
|
|
1333
|
+
{
|
|
1334
|
+
vertex_shader = VSPos(id);
|
|
1335
|
+
pixel_shader = PS_P216_HLG_Y_709_2020(frag_in);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
technique P216_SRGB_Y
|
|
1340
|
+
{
|
|
1341
|
+
pass
|
|
1342
|
+
{
|
|
1343
|
+
vertex_shader = VSPos(id);
|
|
1344
|
+
pixel_shader = PS_P216_SRGB_Y(frag_in);
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
technique P216_PQ_UV
|
|
1349
|
+
{
|
|
1350
|
+
pass
|
|
1351
|
+
{
|
|
1352
|
+
vertex_shader = VSTexPos_Left(id);
|
|
1353
|
+
pixel_shader = PS_P216_PQ_UV_709_2020_Wide(frag_in);
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
technique P216_HLG_UV
|
|
1358
|
+
{
|
|
1359
|
+
pass
|
|
1360
|
+
{
|
|
1361
|
+
vertex_shader = VSTexPos_Left(id);
|
|
1362
|
+
pixel_shader = PS_P216_HLG_UV_709_2020_Wide(frag_in);
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
technique P216_SRGB_UV
|
|
1367
|
+
{
|
|
1368
|
+
pass
|
|
1369
|
+
{
|
|
1370
|
+
vertex_shader = VSTexPos_Left(id);
|
|
1371
|
+
pixel_shader = PS_P216_SRGB_UV_Wide(frag_in);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
technique P416_PQ_Y
|
|
1376
|
+
{
|
|
1377
|
+
pass
|
|
1378
|
+
{
|
|
1379
|
+
vertex_shader = VSPos(id);
|
|
1380
|
+
pixel_shader = PS_P416_PQ_Y_709_2020(frag_in);
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
technique P416_HLG_Y
|
|
1385
|
+
{
|
|
1386
|
+
pass
|
|
1387
|
+
{
|
|
1388
|
+
vertex_shader = VSPos(id);
|
|
1389
|
+
pixel_shader = PS_P416_HLG_Y_709_2020(frag_in);
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
technique P416_SRGB_Y
|
|
1394
|
+
{
|
|
1395
|
+
pass
|
|
1396
|
+
{
|
|
1397
|
+
vertex_shader = VSPos(id);
|
|
1398
|
+
pixel_shader = PS_P416_SRGB_Y(frag_in);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
technique P416_PQ_UV
|
|
1403
|
+
{
|
|
1404
|
+
pass
|
|
1405
|
+
{
|
|
1406
|
+
vertex_shader = VSPos(id);
|
|
1407
|
+
pixel_shader = PS_P416_PQ_UV_709_2020(frag_in);
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
technique P416_HLG_UV
|
|
1412
|
+
{
|
|
1413
|
+
pass
|
|
1414
|
+
{
|
|
1415
|
+
vertex_shader = VSPos(id);
|
|
1416
|
+
pixel_shader = PS_P416_HLG_UV_709_2020(frag_in);
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
technique P416_SRGB_UV
|
|
1421
|
+
{
|
|
1422
|
+
pass
|
|
1423
|
+
{
|
|
1424
|
+
vertex_shader = VSPos(id);
|
|
1425
|
+
pixel_shader = PS_P416_SRGB_UV(frag_in);
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
technique UYVY_Reverse
|
|
1430
|
+
{
|
|
1431
|
+
pass
|
|
1432
|
+
{
|
|
1433
|
+
vertex_shader = VSPacked422Left_Reverse(id);
|
|
1434
|
+
pixel_shader = PSUYVY_Reverse(frag_in);
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
technique YUY2_Reverse
|
|
1439
|
+
{
|
|
1440
|
+
pass
|
|
1441
|
+
{
|
|
1442
|
+
vertex_shader = VSPacked422Left_Reverse(id);
|
|
1443
|
+
pixel_shader = PSYUY2_Reverse(frag_in);
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
technique YUY2_PQ_Reverse
|
|
1448
|
+
{
|
|
1449
|
+
pass
|
|
1450
|
+
{
|
|
1451
|
+
vertex_shader = VSPacked422Left_Reverse(id);
|
|
1452
|
+
pixel_shader = PSYUY2_PQ_Reverse(frag_in);
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
technique YUY2_HLG_Reverse
|
|
1457
|
+
{
|
|
1458
|
+
pass
|
|
1459
|
+
{
|
|
1460
|
+
vertex_shader = VSPacked422Left_Reverse(id);
|
|
1461
|
+
pixel_shader = PSYUY2_HLG_Reverse(frag_in);
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
technique YVYU_Reverse
|
|
1466
|
+
{
|
|
1467
|
+
pass
|
|
1468
|
+
{
|
|
1469
|
+
vertex_shader = VSPacked422Left_Reverse(id);
|
|
1470
|
+
pixel_shader = PSYVYU_Reverse(frag_in);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
technique I420_Reverse
|
|
1475
|
+
{
|
|
1476
|
+
pass
|
|
1477
|
+
{
|
|
1478
|
+
vertex_shader = VS420Left_Reverse(id);
|
|
1479
|
+
pixel_shader = PSPlanar420_Reverse(frag_in);
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
technique I420_PQ_Reverse
|
|
1484
|
+
{
|
|
1485
|
+
pass
|
|
1486
|
+
{
|
|
1487
|
+
vertex_shader = VS420TopLeft_Reverse(id);
|
|
1488
|
+
pixel_shader = PSPlanar420_PQ_Reverse(frag_in);
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
technique I420_HLG_Reverse
|
|
1493
|
+
{
|
|
1494
|
+
pass
|
|
1495
|
+
{
|
|
1496
|
+
vertex_shader = VS420TopLeft_Reverse(id);
|
|
1497
|
+
pixel_shader = PSPlanar420_HLG_Reverse(frag_in);
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
technique I40A_Reverse
|
|
1502
|
+
{
|
|
1503
|
+
pass
|
|
1504
|
+
{
|
|
1505
|
+
vertex_shader = VS420Left_Reverse(id);
|
|
1506
|
+
pixel_shader = PSPlanar420A_Reverse(frag_in);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
technique I422_Reverse
|
|
1511
|
+
{
|
|
1512
|
+
pass
|
|
1513
|
+
{
|
|
1514
|
+
vertex_shader = VS422Left_Reverse(id);
|
|
1515
|
+
pixel_shader = PSPlanar422_Reverse(frag_in);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
technique I210_Reverse
|
|
1520
|
+
{
|
|
1521
|
+
pass
|
|
1522
|
+
{
|
|
1523
|
+
vertex_shader = VS422Left_Reverse(id);
|
|
1524
|
+
pixel_shader = PSPlanar422_10LE_Reverse(frag_in);
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
technique I210_PQ_Reverse
|
|
1529
|
+
{
|
|
1530
|
+
pass
|
|
1531
|
+
{
|
|
1532
|
+
vertex_shader = VS422Left_Reverse(id);
|
|
1533
|
+
pixel_shader = PSPlanar422_10LE_PQ_Reverse(frag_in);
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
technique I210_HLG_Reverse
|
|
1538
|
+
{
|
|
1539
|
+
pass
|
|
1540
|
+
{
|
|
1541
|
+
vertex_shader = VS422Left_Reverse(id);
|
|
1542
|
+
pixel_shader = PSPlanar422_10LE_HLG_Reverse(frag_in);
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
technique I42A_Reverse
|
|
1547
|
+
{
|
|
1548
|
+
pass
|
|
1549
|
+
{
|
|
1550
|
+
vertex_shader = VS422Left_Reverse(id);
|
|
1551
|
+
pixel_shader = PSPlanar422A_Reverse(frag_in);
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
technique I444_Reverse
|
|
1556
|
+
{
|
|
1557
|
+
pass
|
|
1558
|
+
{
|
|
1559
|
+
vertex_shader = VSPos(id);
|
|
1560
|
+
pixel_shader = PSPlanar444_Reverse(frag_in);
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
technique I412_Reverse
|
|
1565
|
+
{
|
|
1566
|
+
pass
|
|
1567
|
+
{
|
|
1568
|
+
vertex_shader = VSPos(id);
|
|
1569
|
+
pixel_shader = PSPlanar444_12LE_Reverse(frag_in);
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
technique I412_PQ_Reverse
|
|
1574
|
+
{
|
|
1575
|
+
pass
|
|
1576
|
+
{
|
|
1577
|
+
vertex_shader = VSPos(id);
|
|
1578
|
+
pixel_shader = PSPlanar444_12LE_PQ_Reverse(frag_in);
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
technique I412_HLG_Reverse
|
|
1583
|
+
{
|
|
1584
|
+
pass
|
|
1585
|
+
{
|
|
1586
|
+
vertex_shader = VSPos(id);
|
|
1587
|
+
pixel_shader = PSPlanar444_12LE_HLG_Reverse(frag_in);
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
technique YUVA_Reverse
|
|
1592
|
+
{
|
|
1593
|
+
pass
|
|
1594
|
+
{
|
|
1595
|
+
vertex_shader = VSPos(id);
|
|
1596
|
+
pixel_shader = PSPlanar444A_Reverse(frag_in);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
technique YA2L_Reverse
|
|
1601
|
+
{
|
|
1602
|
+
pass
|
|
1603
|
+
{
|
|
1604
|
+
vertex_shader = VSPos(id);
|
|
1605
|
+
pixel_shader = PSPlanar444A_12LE_Reverse(frag_in);
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
technique AYUV_Reverse
|
|
1610
|
+
{
|
|
1611
|
+
pass
|
|
1612
|
+
{
|
|
1613
|
+
vertex_shader = VSPos(id);
|
|
1614
|
+
pixel_shader = PSAYUV_Reverse(frag_in);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
technique NV12_Reverse
|
|
1619
|
+
{
|
|
1620
|
+
pass
|
|
1621
|
+
{
|
|
1622
|
+
vertex_shader = VS420Left_Reverse(id);
|
|
1623
|
+
pixel_shader = PSNV12_Reverse(frag_in);
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
technique NV12_PQ_Reverse
|
|
1628
|
+
{
|
|
1629
|
+
pass
|
|
1630
|
+
{
|
|
1631
|
+
vertex_shader = VS420TopLeft_Reverse(id);
|
|
1632
|
+
pixel_shader = PSNV12_PQ_Reverse(frag_in);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
technique NV12_HLG_Reverse
|
|
1637
|
+
{
|
|
1638
|
+
pass
|
|
1639
|
+
{
|
|
1640
|
+
vertex_shader = VS420TopLeft_Reverse(id);
|
|
1641
|
+
pixel_shader = PSNV12_HLG_Reverse(frag_in);
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
technique I010_SRGB_Reverse
|
|
1646
|
+
{
|
|
1647
|
+
pass
|
|
1648
|
+
{
|
|
1649
|
+
vertex_shader = VS420Left_Reverse(id);
|
|
1650
|
+
pixel_shader = PSI010_SRGB_Reverse(frag_in);
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
technique I010_PQ_2020_709_Reverse
|
|
1655
|
+
{
|
|
1656
|
+
pass
|
|
1657
|
+
{
|
|
1658
|
+
vertex_shader = VS420TopLeft_Reverse(id);
|
|
1659
|
+
pixel_shader = PSI010_PQ_2020_709_Reverse(frag_in);
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
technique I010_HLG_2020_709_Reverse
|
|
1664
|
+
{
|
|
1665
|
+
pass
|
|
1666
|
+
{
|
|
1667
|
+
vertex_shader = VS420TopLeft_Reverse(id);
|
|
1668
|
+
pixel_shader = PSI010_HLG_2020_709_Reverse(frag_in);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
technique P010_SRGB_Reverse
|
|
1673
|
+
{
|
|
1674
|
+
pass
|
|
1675
|
+
{
|
|
1676
|
+
vertex_shader = VS420Left_Reverse(id);
|
|
1677
|
+
pixel_shader = PSP010_SRGB_Reverse(frag_in);
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
technique P010_PQ_2020_709_Reverse
|
|
1682
|
+
{
|
|
1683
|
+
pass
|
|
1684
|
+
{
|
|
1685
|
+
vertex_shader = VS420TopLeft_Reverse(id);
|
|
1686
|
+
pixel_shader = PSP010_PQ_2020_709_Reverse(frag_in);
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
technique P010_HLG_2020_709_Reverse
|
|
1691
|
+
{
|
|
1692
|
+
pass
|
|
1693
|
+
{
|
|
1694
|
+
vertex_shader = VS420TopLeft_Reverse(id);
|
|
1695
|
+
pixel_shader = PSP010_HLG_2020_709_Reverse(frag_in);
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
technique V210_SRGB_Reverse
|
|
1700
|
+
{
|
|
1701
|
+
pass
|
|
1702
|
+
{
|
|
1703
|
+
vertex_shader = VSPos(id);
|
|
1704
|
+
pixel_shader = PSV210_SRGB_Reverse(frag_in);
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
technique V210_PQ_2020_709_Reverse
|
|
1709
|
+
{
|
|
1710
|
+
pass
|
|
1711
|
+
{
|
|
1712
|
+
vertex_shader = VSPos(id);
|
|
1713
|
+
pixel_shader = PSV210_PQ_2020_709_Reverse(frag_in);
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
technique V210_HLG_2020_709_Reverse
|
|
1718
|
+
{
|
|
1719
|
+
pass
|
|
1720
|
+
{
|
|
1721
|
+
vertex_shader = VSPos(id);
|
|
1722
|
+
pixel_shader = PSV210_HLG_2020_709_Reverse(frag_in);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
technique Y800_Limited
|
|
1727
|
+
{
|
|
1728
|
+
pass
|
|
1729
|
+
{
|
|
1730
|
+
vertex_shader = VSPos(id);
|
|
1731
|
+
pixel_shader = PSY800_Limited(frag_in);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
technique Y800_Full
|
|
1736
|
+
{
|
|
1737
|
+
pass
|
|
1738
|
+
{
|
|
1739
|
+
vertex_shader = VSPos(id);
|
|
1740
|
+
pixel_shader = PSY800_Full(frag_in);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
technique RGB_Limited
|
|
1745
|
+
{
|
|
1746
|
+
pass
|
|
1747
|
+
{
|
|
1748
|
+
vertex_shader = VSPos(id);
|
|
1749
|
+
pixel_shader = PSRGB_Limited(frag_in);
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
technique BGR3_Limited
|
|
1754
|
+
{
|
|
1755
|
+
pass
|
|
1756
|
+
{
|
|
1757
|
+
vertex_shader = VSPos(id);
|
|
1758
|
+
pixel_shader = PSBGR3_Limited(frag_in);
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
technique BGR3_Full
|
|
1763
|
+
{
|
|
1764
|
+
pass
|
|
1765
|
+
{
|
|
1766
|
+
vertex_shader = VSPos(id);
|
|
1767
|
+
pixel_shader = PSBGR3_Full(frag_in);
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
technique R10L_SRGB_Full_Reverse
|
|
1772
|
+
{
|
|
1773
|
+
pass
|
|
1774
|
+
{
|
|
1775
|
+
vertex_shader = VSPos(id);
|
|
1776
|
+
pixel_shader = PSR10L_SRGB_Full_Reverse(frag_in);
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
technique R10L_PQ_2020_709_Full_Reverse
|
|
1781
|
+
{
|
|
1782
|
+
pass
|
|
1783
|
+
{
|
|
1784
|
+
vertex_shader = VSPos(id);
|
|
1785
|
+
pixel_shader = PSR10L_PQ_2020_709_Full_Reverse(frag_in);
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
technique R10L_HLG_2020_709_Full_Reverse
|
|
1790
|
+
{
|
|
1791
|
+
pass
|
|
1792
|
+
{
|
|
1793
|
+
vertex_shader = VSPos(id);
|
|
1794
|
+
pixel_shader = PSR10L_HLG_2020_709_Full_Reverse(frag_in);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
technique R10L_SRGB_Limited_Reverse
|
|
1799
|
+
{
|
|
1800
|
+
pass
|
|
1801
|
+
{
|
|
1802
|
+
vertex_shader = VSPos(id);
|
|
1803
|
+
pixel_shader = PSR10L_SRGB_Limited_Reverse(frag_in);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
technique R10L_PQ_2020_709_Limited_Reverse
|
|
1808
|
+
{
|
|
1809
|
+
pass
|
|
1810
|
+
{
|
|
1811
|
+
vertex_shader = VSPos(id);
|
|
1812
|
+
pixel_shader = PSR10L_PQ_2020_709_Limited_Reverse(frag_in);
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
technique R10L_HLG_2020_709_Limited_Reverse
|
|
1817
|
+
{
|
|
1818
|
+
pass
|
|
1819
|
+
{
|
|
1820
|
+
vertex_shader = VSPos(id);
|
|
1821
|
+
pixel_shader = PSR10L_HLG_2020_709_Limited_Reverse(frag_in);
|
|
1822
|
+
}
|
|
1823
|
+
}
|