Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PL(5): fragment shader GLSL source:
- PL(5): [ 1] #version 450
- PL(5): [ 2] #extension GL_ARB_uniform_buffer_object : enable
- PL(5): [ 3] #extension GL_ARB_texture_gather : enable
- PL(5): [ 4] layout(binding=0) uniform sampler2D _src_tex_0_1;
- PL(5): [ 5] layout(binding=1) uniform sampler2D _src_tex_0_2;
- PL(5): [ 6] layout(std140, binding=2) uniform _UBO_5_0 {
- PL(5): [ 7] layout(offset=0) mat3 _cmat_2_0;
- PL(5): [ 8] layout(offset=48) vec3 _cmat_c_3_0;
- PL(5): [ 9] };
- PL(5): [ 10] layout(location=0) in vec2 _tex_coord_1_1;
- PL(5): [ 11] layout(location=1) in vec2 _tex_coord_1_2;
- PL(5): [ 12] layout(location=0) out vec4 out_color;
- PL(5): [ 13]
- PL(5): [ 14] const float _const_2_1 = 1.00000000000000000000;
- PL(5): [ 15] vec4 _sub_0_0() {
- PL(5): [ 16] // pl_shader_sample_direct
- PL(5): [ 17] vec4 color = vec4(_const_2_1) * texture(_src_tex_0_1, _tex_coord_1_1);
- PL(5): [ 18] return color;
- PL(5): [ 19] }
- PL(5): [ 20]
- PL(5): [ 21] const float _const_2_2 = 1.00000000000000000000;
- PL(5): [ 22] vec4 _sub_1_0() {
- PL(5): [ 23] // pl_shader_sample_direct
- PL(5): [ 24] vec4 color = vec4(_const_2_2) * texture(_src_tex_0_2, _tex_coord_1_2);
- PL(5): [ 25] return color;
- PL(5): [ 26] }
- PL(5): [ 27]
- PL(5): [ 28] vec4 _main_6_0() {
- PL(5): [ 29] vec4 color = vec4(0.0, 0.5, 0.5, 1.0);
- PL(5): [ 30] // pass_read_image
- PL(5): [ 31] {
- PL(5): [ 32] vec4 tmp;
- PL(5): [ 33] tmp = _sub_0_0();
- PL(5): [ 34] color[0] = tmp[0];
- PL(5): [ 35] tmp = _sub_1_0();
- PL(5): [ 36] color[1] = tmp[0];
- PL(5): [ 37] color[2] = tmp[1];
- PL(5): [ 38] }
- PL(5): [ 39] // pl_shader_decode_color
- PL(5): [ 40] {
- PL(5): [ 41] color.rgb = _cmat_2_0 * color.rgb + _cmat_c_3_0;
- PL(5): [ 42] }
- PL(5): [ 43] // pl_shader_linearize
- PL(5): [ 44] color.rgb = max(color.rgb, 0.0);
- PL(5): [ 45] color.rgb = pow(color.rgb, vec3(1.0/78.84375000000000000000));
- PL(5): [ 46] color.rgb = max(color.rgb - vec3(0.83593750000000000000), 0.0)
- PL(5): [ 47] / (vec3(18.85156250000000000000) - vec3(18.68750000000000000000) * color.rgb);
- PL(5): [ 48] color.rgb = pow(color.rgb, vec3(1.0/0.15930175781250000000));
- PL(5): [ 49] color.rgb *= vec3(49.26108374384236298501);
- PL(5): [ 50] return color;
- PL(5): [ 51] }
- PL(5): [ 52]
- PL(5): [ 53] void main() {
- PL(5): [ 54] out_color = _main_6_0();
- PL(5): [ 55] }
- PL(5): fragment shader GLSL source:
- PL(5): [ 1] #version 450
- PL(5): [ 2] #extension GL_ARB_uniform_buffer_object : enable
- PL(5): [ 3] #extension GL_ARB_texture_gather : enable
- PL(5): [ 4] layout(binding=0) uniform sampler2D _src_tex_0_3;
- PL(5): [ 5] layout(binding=1) uniform sampler2D _weights_5_3;
- PL(5): [ 6] layout(binding=2) uniform sampler2D _weights_14_3;
- PL(5): [ 7] layout(std140, binding=3) uniform _UBO_20_3 {
- PL(5): [ 8] layout(offset=0) vec2 _tex_size_2_3;
- PL(5): [ 9] layout(offset=8) vec2 _tex_pt_3_3;
- PL(5): [ 10] };
- PL(5): [ 11] layout(location=0) in vec2 _tex_coord_1_3;
- PL(5): [ 12] layout(location=0) out vec4 out_color;
- PL(5): [ 13]
- PL(5): [ 14] const float _const_7_3 = 0.75000000000000000000;
- PL(5): [ 15] const float _const_8_3 = 0.25000000000000000000;
- PL(5): [ 16] #define _LUT_POS_6_3(x) mix(_const_8_3, _const_7_3, (x))
- PL(5): [ 17] const float _const_10_3 = 0.99218750000000000000;
- PL(5): [ 18] const float _const_11_3 = 0.00781250000000000000;
- PL(5): [ 19] #define _LUT_POS_9_3(x) mix(_const_11_3, _const_10_3, (x))
- PL(5): [ 20] #define _lut_4_3(pos) (texture(_weights_5_3, vec2(\
- PL(5): [ 21] _LUT_POS_6_3(vec2(pos).x)\
- PL(5): [ 22] ,_LUT_POS_9_3(vec2(pos).y)\
- PL(5): [ 23] )).xyzw)
- PL(5): [ 24] const float _const_12_3 = 1.00000000000000000000;
- PL(5): [ 25] #define _lut_13_3(pos) (texelFetch(_weights_14_3, ivec2(pos), 0).x)
- PL(5): [ 26] const float _const_15_3 = 64.00000000000000000000;
- PL(5): [ 27] const float _const_16_3 = 64.00000000000000000000;
- PL(5): [ 28] const float _const_17_3 = 1.00000000000000000000;
- PL(5): [ 29] vec4 _main_21_3() {
- PL(5): [ 30] // pl_shader_sample_ortho
- PL(5): [ 31] vec4 color = vec4(0.0);
- PL(5): [ 32] {
- PL(5): [ 33] vec2 pos = _tex_coord_1_3, size = _tex_size_2_3, pt = _tex_pt_3_3;
- PL(5): [ 34] vec2 dir = vec2(1.0, 0.0);
- PL(5): [ 35] pt *= dir;
- PL(5): [ 36] vec2 fcoord2 = fract(pos * size - vec2(0.5));
- PL(5): [ 37] float fcoord = dot(fcoord2, dir);
- PL(5): [ 38] vec2 base = pos - fcoord * pt - pt * vec2(3.0);
- PL(5): [ 39] float weight;
- PL(5): [ 40] vec4 ws, c;
- PL(5): [ 41] // scaler samples
- PL(5): [ 42] ws = _lut_4_3(vec2(0.00000000000000000000, fcoord));
- PL(5): [ 43] weight = ws[0];
- PL(5): [ 44] c = texture(_src_tex_0_3, base + pt * vec2(0.0));
- PL(5): [ 45] color[0] += weight * c[0];
- PL(5): [ 46] color[1] += weight * c[1];
- PL(5): [ 47] color[2] += weight * c[2];
- PL(5): [ 48] weight = ws[1];
- PL(5): [ 49] c = texture(_src_tex_0_3, base + pt * vec2(1.0));
- PL(5): [ 50] color[0] += weight * c[0];
- PL(5): [ 51] color[1] += weight * c[1];
- PL(5): [ 52] color[2] += weight * c[2];
- PL(5): [ 53] weight = ws[2];
- PL(5): [ 54] c = texture(_src_tex_0_3, base + pt * vec2(2.0));
- PL(5): [ 55] color[0] += weight * c[0];
- PL(5): [ 56] color[1] += weight * c[1];
- PL(5): [ 57] color[2] += weight * c[2];
- PL(5): [ 58] weight = ws[3];
- PL(5): [ 59] c = texture(_src_tex_0_3, base + pt * vec2(3.0));
- PL(5): [ 60] color[0] += weight * c[0];
- PL(5): [ 61] color[1] += weight * c[1];
- PL(5): [ 62] color[2] += weight * c[2];
- PL(5): [ 63] ws = _lut_4_3(vec2(1.00000000000000000000, fcoord));
- PL(5): [ 64] weight = ws[0];
- PL(5): [ 65] c = texture(_src_tex_0_3, base + pt * vec2(4.0));
- PL(5): [ 66] color[0] += weight * c[0];
- PL(5): [ 67] color[1] += weight * c[1];
- PL(5): [ 68] color[2] += weight * c[2];
- PL(5): [ 69] weight = ws[1];
- PL(5): [ 70] c = texture(_src_tex_0_3, base + pt * vec2(5.0));
- PL(5): [ 71] color[0] += weight * c[0];
- PL(5): [ 72] color[1] += weight * c[1];
- PL(5): [ 73] color[2] += weight * c[2];
- PL(5): [ 74] weight = ws[2];
- PL(5): [ 75] c = texture(_src_tex_0_3, base + pt * vec2(6.0));
- PL(5): [ 76] color[0] += weight * c[0];
- PL(5): [ 77] color[1] += weight * c[1];
- PL(5): [ 78] color[2] += weight * c[2];
- PL(5): [ 79] weight = ws[3];
- PL(5): [ 80] c = texture(_src_tex_0_3, base + pt * vec2(7.0));
- PL(5): [ 81] color[0] += weight * c[0];
- PL(5): [ 82] color[1] += weight * c[1];
- PL(5): [ 83] color[2] += weight * c[2];
- PL(5): [ 84] color *= vec4(_const_12_3);
- PL(5): [ 85] color.a = 1.0;
- PL(5): [ 86] }
- PL(5): [ 87] // pl_shader_delinearize
- PL(5): [ 88] color.rgb = max(color.rgb, 0.0);
- PL(5): [ 89] color.rgb *= vec3(1.0/49.26108374384236298501);
- PL(5): [ 90] color.rgb = pow(color.rgb, vec3(0.15930175781250000000));
- PL(5): [ 91] color.rgb = (vec3(0.83593750000000000000) + vec3(18.85156250000000000000) * color.rgb)
- PL(5): [ 92] / (vec3(1.0) + vec3(18.68750000000000000000) * color.rgb);
- PL(5): [ 93] color.rgb = pow(color.rgb, vec3(78.84375000000000000000));
- PL(5): [ 94] // pl_shader_encode_color
- PL(5): [ 95] {
- PL(5): [ 96] }
- PL(5): [ 97] // pl_shader_dither
- PL(5): [ 98] {
- PL(5): [ 99] float bias;
- PL(5): [100] vec2 pos = fract(gl_FragCoord.xy * 1.0/_const_15_3);
- PL(5): [101] bias = _lut_13_3(ivec2(pos * _const_16_3));
- PL(5): [102] color = vec4(1023.0) * color + vec4(bias);
- PL(5): [103] color = floor(color) * vec4(1.0 / 1023.0);
- PL(5): [104] }
- PL(5): [105] color *= vec4(1.0 / _const_17_3);
- PL(5): [106] vec4 _orig_color_18_3 = color;
- PL(5): [107] color = vec4(0.0, 0.0, 0.0, 1.0);
- PL(5): [108] color[0] = _orig_color_18_3[0];
- PL(5): [109] color[1] = _orig_color_18_3[1];
- PL(5): [110] color[2] = _orig_color_18_3[2];
- PL(5): [111] return color;
- PL(5): [112] }
- PL(5): [113]
- PL(5): [114] void main() {
- PL(5): [115] out_color = _main_21_3();
- PL(5): [116] }
- PL(5): fragment shader GLSL source:
- PL(5): [ 1] #version 450
- PL(5): [ 2] #extension GL_ARB_uniform_buffer_object : enable
- PL(5): [ 3] #extension GL_ARB_texture_gather : enable
- PL(5): [ 4] layout(binding=0) uniform sampler2D _osd_tex_0_0;
- PL(5): [ 5] layout(std140, binding=1) uniform _UBO_13_0 {
- PL(5): [ 6] layout(offset=0) mat3 _cms_matrix_11_0;
- PL(5): [ 7] };
- PL(5): [ 8] layout(location=1) in vec2 coord;
- PL(5): [ 9] layout(location=0) out vec4 out_color;
- PL(5): [ 10]
- PL(5): [ 11] const float _const_1_0 = 0.05958483740687370300;
- PL(5): [ 12] const float _const_2_0 = 0.87031054496765136718;
- PL(5): [ 13] const float _const_3_0 = 0.59113299846649169921;
- PL(5): [ 14] const float _const_4_0 = 0.25000000000000000000;
- PL(5): [ 15] const float _const_5_0 = 0.59113299846649169921;
- PL(5): [ 16] const float _dst_range_6_0 = 4.92608356475830078125;
- PL(5): [ 17] const float _src_floor_7_0 = 0.00059113302268087863;
- PL(5): [ 18] const float _dst_peak_8_0 = 4.92610836029052734375;
- PL(5): [ 19] const float _dst_floor_9_0 = 0.00002463054079271387;
- PL(5): [ 20] const float _const_10_0 = 1.00000000000000000000;
- PL(5): [ 21] vec4 _main_14_0() {
- PL(5): [ 22] // overlay
- PL(5): [ 23] vec4 color = texture(_osd_tex_0_0, coord);
- PL(5): [ 24] // pl_shader_decode_color
- PL(5): [ 25] {
- PL(5): [ 26] }
- PL(5): [ 27] // pl_shader_color_map
- PL(5): [ 28] {
- PL(5): [ 29] // pl_shader_linearize
- PL(5): [ 30] color.rgb = max(color.rgb, 0.0);
- PL(5): [ 31] color.rgb = vec3(_const_2_0) * pow(color.rgb + vec3(_const_1_0), vec3(2.4));
- PL(5): [ 32] color.rgb *= vec3(_const_3_0);
- PL(5): [ 33] // pl_shader_tone_map
- PL(5): [ 34] {
- PL(5): [ 35] float sig_peak = _const_5_0;
- PL(5): [ 36] float sig_avg = _const_4_0;
- PL(5): [ 37] color.rgb = vec3(1.0/_dst_range_6_0) * (color.rgb - vec3(_src_floor_7_0));
- PL(5): [ 38] sig_peak = (sig_peak - _src_floor_7_0) / _dst_range_6_0;
- PL(5): [ 39] vec3 sig = clamp(color.rgb, 0.0, sig_peak);
- PL(5): [ 40] vec3 sig_orig = color.rgb;
- PL(5): [ 41] sig *= min(_const_10_0 / sig_peak, 1.0);
- PL(5): [ 42] color.rgb = sig;
- PL(5): [ 43] color.rgb = vec3(_dst_range_6_0) * color.rgb + vec3(_dst_floor_9_0);
- PL(5): [ 44] }
- PL(5): [ 45] color.rgb = _cms_matrix_11_0 * color.rgb;
- PL(5): [ 46] // pl_shader_delinearize
- PL(5): [ 47] color.rgb = max(color.rgb, 0.0);
- PL(5): [ 48] color.rgb *= vec3(1.0/49.26108374384236298501);
- PL(5): [ 49] color.rgb = pow(color.rgb, vec3(0.15930175781250000000));
- PL(5): [ 50] color.rgb = (vec3(0.83593750000000000000) + vec3(18.85156250000000000000) * color.rgb)
- PL(5): [ 51] / (vec3(1.0) + vec3(18.68750000000000000000) * color.rgb);
- PL(5): [ 52] color.rgb = pow(color.rgb, vec3(78.84375000000000000000));
- PL(5): [ 53] }
- PL(5): [ 54] // pl_shader_encode_color
- PL(5): [ 55] {
- PL(5): [ 56] }
- PL(5): [ 57] vec4 _orig_color_12_0 = color;
- PL(5): [ 58] color = vec4(0.0, 0.0, 0.0, 1.0);
- PL(5): [ 59] color[0] = _orig_color_12_0[0];
- PL(5): [ 60] color[1] = _orig_color_12_0[1];
- PL(5): [ 61] color[2] = _orig_color_12_0[2];
- PL(5): [ 62] color.a = _orig_color_12_0.a;
- PL(5): [ 63] return color;
- PL(5): [ 64] }
- PL(5): [ 65]
- PL(5): [ 66] void main() {
- PL(5): [ 67] out_color = _main_14_0();
- PL(5): [ 68] }
Advertisement
Add Comment
Please, Sign In to add comment