Nevcairiel

Untitled

Nov 24th, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. PL(5): fragment shader GLSL source:
  2. PL(5): [ 1] #version 450
  3. PL(5): [ 2] #extension GL_ARB_uniform_buffer_object : enable
  4. PL(5): [ 3] #extension GL_ARB_texture_gather : enable
  5. PL(5): [ 4] layout(binding=0) uniform sampler2D _osd_tex_0_0;
  6. PL(5): [ 5] layout(std140, binding=1) uniform _UBO_12_0 {
  7. PL(5): [ 6] layout(offset=0) mat3 _cms_matrix_10_0;
  8. PL(5): [ 7] };
  9. PL(5): [ 8] layout(location=1) in vec2 coord;
  10. PL(5): [ 9] layout(location=0) out vec4 out_color;
  11. PL(5): [ 10]
  12. PL(5): [ 11] const float _const_1_0 = 0.05958483740687370300;
  13. PL(5): [ 12] const float _const_2_0 = 0.87031054496765136718;
  14. PL(5): [ 13] const float _const_3_0 = 0.25000000000000000000;
  15. PL(5): [ 14] const float _const_4_0 = 1.00000000000000000000;
  16. PL(5): [ 15] const float _dst_range_5_0 = 4.92608356475830078125;
  17. PL(5): [ 16] const float _src_floor_6_0 = 0.00100000004749745130;
  18. PL(5): [ 17] const float _dst_peak_7_0 = 4.92610836029052734375;
  19. PL(5): [ 18] const float _dst_floor_8_0 = 0.00002463054079271387;
  20. PL(5): [ 19] const float _const_9_0 = 1.00000000000000000000;
  21. PL(5): [ 20] vec4 _main_13_0() {
  22. PL(5): [ 21] // overlay
  23. PL(5): [ 22] vec4 color = texture(_osd_tex_0_0, coord);
  24. PL(5): [ 23] // pl_shader_decode_color
  25. PL(5): [ 24] {
  26. PL(5): [ 25] }
  27. PL(5): [ 26] // pl_shader_color_map
  28. PL(5): [ 27] {
  29. PL(5): [ 28] // pl_shader_decode_color
  30. PL(5): [ 29] {
  31. PL(5): [ 30] }
  32. PL(5): [ 31] // pl_shader_linearize
  33. PL(5): [ 32] color.rgb = max(color.rgb, 0.0);
  34. PL(5): [ 33] color.rgb = vec3(_const_2_0) * pow(color.rgb + vec3(_const_1_0), vec3(2.4));
  35. PL(5): [ 34] // pl_shader_tone_map
  36. PL(5): [ 35] {
  37. PL(5): [ 36] float sig_peak = _const_4_0;
  38. PL(5): [ 37] float sig_avg = _const_3_0;
  39. PL(5): [ 38] color.rgb = vec3(1.0/_dst_range_5_0) * (color.rgb - vec3(_src_floor_6_0));
  40. PL(5): [ 39] sig_peak = (sig_peak - _src_floor_6_0) / _dst_range_5_0;
  41. PL(5): [ 40] vec3 sig = clamp(color.rgb, 0.0, sig_peak);
  42. PL(5): [ 41] vec3 sig_orig = color.rgb;
  43. PL(5): [ 42] sig *= min(_const_9_0 / sig_peak, 1.0);
  44. PL(5): [ 43] color.rgb = sig;
  45. PL(5): [ 44] color.rgb = vec3(_dst_range_5_0) * color.rgb + vec3(_dst_floor_8_0);
  46. PL(5): [ 45] }
  47. PL(5): [ 46] color.rgb = _cms_matrix_10_0 * color.rgb;
  48. PL(5): [ 47] // pl_shader_delinearize
  49. PL(5): [ 48] color.rgb = max(color.rgb, 0.0);
  50. PL(5): [ 49] color.rgb *= vec3(1.0/49.26108374384236298501);
  51. PL(5): [ 50] color.rgb = pow(color.rgb, vec3(0.15930175781250000000));
  52. PL(5): [ 51] color.rgb = (vec3(0.83593750000000000000) + vec3(18.85156250000000000000) * color.rgb)
  53. PL(5): [ 52] / (vec3(1.0) + vec3(18.68750000000000000000) * color.rgb);
  54. PL(5): [ 53] color.rgb = pow(color.rgb, vec3(78.84375000000000000000));
  55. PL(5): [ 54] // pl_shader_encode_color
  56. PL(5): [ 55] {
  57. PL(5): [ 56] }
  58. PL(5): [ 57] }
  59. PL(5): [ 58] // pl_shader_encode_color
  60. PL(5): [ 59] {
  61. PL(5): [ 60] }
  62. PL(5): [ 61] vec4 _orig_color_11_0 = color;
  63. PL(5): [ 62] color = vec4(0.0, 0.0, 0.0, 1.0);
  64. PL(5): [ 63] color[0] = _orig_color_11_0[0];
  65. PL(5): [ 64] color[1] = _orig_color_11_0[1];
  66. PL(5): [ 65] color[2] = _orig_color_11_0[2];
  67. PL(5): [ 66] color.a = _orig_color_11_0.a;
  68. PL(5): [ 67] return color;
  69. PL(5): [ 68] }
  70. PL(5): [ 69]
  71. PL(5): [ 70] void main() {
  72. PL(5): [ 71] out_color = _main_13_0();
  73. PL(5): [ 72] }
Advertisement
Add Comment
Please, Sign In to add comment