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 _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.25000000000000000000;
- PL(5): [ 14] const float _const_4_0 = 1.00000000000000000000;
- PL(5): [ 15] const float _dst_range_5_0 = 4.92608356475830078125;
- PL(5): [ 16] const float _src_floor_6_0 = 0.00100000004749745130;
- PL(5): [ 17] const float _dst_peak_7_0 = 4.92610836029052734375;
- PL(5): [ 18] const float _dst_floor_8_0 = 0.00002463054079271387;
- PL(5): [ 19] const float _const_9_0 = 0.08332741260528564453;
- PL(5): [ 20] const float _const_10_0 = -0.06825106590986251831;
- 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] color.rgb *= vec3(color.a);
- PL(5): [ 27] }
- PL(5): [ 28] // pl_shader_color_map
- PL(5): [ 29] {
- PL(5): [ 30] // pl_shader_linearize
- PL(5): [ 31] color.rgb = max(color.rgb, 0.0);
- PL(5): [ 32] color.rgb = vec3(_const_2_0) * pow(color.rgb + vec3(_const_1_0), vec3(2.4));
- PL(5): [ 33] // pl_shader_tone_map
- PL(5): [ 34] {
- PL(5): [ 35] float sig_peak = _const_4_0;
- PL(5): [ 36] float sig_avg = _const_3_0;
- PL(5): [ 37] vec3 sig = clamp(color.rgb, 0.0, sig_peak);
- PL(5): [ 38] vec3 sig_orig = color.rgb;
- PL(5): [ 39] vec4 sig_pq = vec4(sig.rgb, sig_peak);
- PL(5): [ 40] sig_pq *= vec4(1.0/49.26108374384236298501);
- PL(5): [ 41] sig_pq = pow(max(sig_pq, 0.0), vec4(0.15930175781250000000));
- PL(5): [ 42] sig_pq = (vec4(0.83593750000000000000) + vec4(18.85156250000000000000) * sig_pq)
- PL(5): [ 43] / (vec4(1.0) + vec4(18.68750000000000000000) * sig_pq);
- PL(5): [ 44] sig_pq = pow(sig_pq, vec4(78.84375000000000000000));
- PL(5): [ 45] float scale = 1.0 / (sig_pq.a - _const_9_0);
- PL(5): [ 46] sig = clamp(vec3(scale) * (sig_pq.rgb - vec3(_const_9_0)), 0.0, 1.0);
- PL(5): [ 47] float minLum = _const_10_0 * scale;
- PL(5): [ 48] float p = 4.0;
- PL(5): [ 49] if (minLum >= 0.0)
- PL(5): [ 50] p = min(1.0 / minLum, 4.0);
- PL(5): [ 51] vec3 boost = vec3(minLum) * pow(vec3(1.0) - sig, vec3(p));
- PL(5): [ 52] vec3 sig_lift = sig + boost;
- PL(5): [ 53] sig = mix(sig, sig_lift, bvec3(lessThan(sig, vec3(1.0))));
- PL(5): [ 54] sig = vec3(sig_pq.a - _const_9_0) * sig + vec3(_const_9_0);
- PL(5): [ 55] sig = pow(max(sig, 0.0), vec3(1.0/78.84375000000000000000));
- PL(5): [ 56] sig = max(sig - vec3(0.83593750000000000000), 0.0) /
- PL(5): [ 57] (vec3(18.85156250000000000000) - vec3(18.68750000000000000000) * sig);
- PL(5): [ 58] sig = pow(sig, vec3(1.0/0.15930175781250000000));
- PL(5): [ 59] sig *= vec3(49.26108374384236298501);
- PL(5): [ 60] color.rgb = sig;
- PL(5): [ 61] }
- PL(5): [ 62] color.rgb = _cms_matrix_11_0 * color.rgb;
- PL(5): [ 63] // pl_shader_delinearize
- PL(5): [ 64] color.rgb = max(color.rgb, 0.0);
- PL(5): [ 65] color.rgb *= vec3(1.0/49.26108374384236298501);
- PL(5): [ 66] color.rgb = pow(color.rgb, vec3(0.15930175781250000000));
- PL(5): [ 67] color.rgb = (vec3(0.83593750000000000000) + vec3(18.85156250000000000000) * color.rgb)
- PL(5): [ 68] / (vec3(1.0) + vec3(18.68750000000000000000) * color.rgb);
- PL(5): [ 69] color.rgb = pow(color.rgb, vec3(78.84375000000000000000));
- PL(5): [ 70] }
- PL(5): [ 71] // pl_shader_encode_color
- PL(5): [ 72] {
- PL(5): [ 73] }
- PL(5): [ 74] vec4 _orig_color_12_0 = color;
- PL(5): [ 75] color = vec4(0.0, 0.0, 0.0, 1.0);
- PL(5): [ 76] color[0] = _orig_color_12_0[0];
- PL(5): [ 77] color[1] = _orig_color_12_0[1];
- PL(5): [ 78] color[2] = _orig_color_12_0[2];
- PL(5): [ 79] color.a = _orig_color_12_0.a;
- PL(5): [ 80] return color;
- PL(5): [ 81] }
- PL(5): [ 82]
- PL(5): [ 83] void main() {
- PL(5): [ 84] out_color = _main_14_0();
- PL(5): [ 85] }
Advertisement
Add Comment
Please, Sign In to add comment