Advertisement
joedemax

Untitled

Oct 1st, 2023
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #version 330
  2. uniform sampler2D texY;
  3. uniform sampler2D texU;
  4. uniform sampler2D texV;
  5.  
  6.  
  7. in vec2 ftexcoord;
  8. layout(location = 0) out vec4 rgbColour;
  9. void main()
  10. {
  11.     float y;
  12.     float cb;
  13.     float cr;
  14.  
  15.     vec2 txc = gl_FragCoord.xy;
  16.     ivec2 texSize  = textureSize(texY, 0);
  17.     ivec2 texSizeB  = textureSize(texY, 0);
  18.     vec2 texOffset = 1 / vec2(texSize.xy);
  19.  
  20.    
  21.     y = texture(texY, ftexcoord).r;
  22.     cb = texture(texU, ftexcoord).r;
  23.     cr = texture(texV, ftexcoord).r;   
  24.  
  25.  
  26.     rgbColour.r =  y;
  27.     rgbColour.g = cb;
  28.     rgbColour.b =  cr;
  29.     rgbColour.a = 1.0;
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement