fragment-shader-composite.glsl 463 B

123456789101112131415161718192021222324
  1. uniform sampler2D frameTexture;
  2. uniform vec2 frameResolution;
  3. void main() {
  4. vec2 pixelCoords = (vUvs - 0.5) * resolution;
  5. float curTime = time*TIME_SPEED + TIME_OFFSET;
  6. vec4 colour = texture(frameTexture, vUvs);
  7. #ifdef USE_OKLAB
  8. colour.xyz = oklabToRGB(colour.xyz);
  9. #endif
  10. // Vignette
  11. colour.xyz *= vignette(vUvs);
  12. colour.xyz = pow(saturate3(colour.xyz), vec3(1.0 / 2.2));
  13. gl_FragColor = vec4(colour.xyz, 1.0);
  14. }