STVFShader.m 575 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // STVFShader.m
  3. // SenseMeEffects
  4. //
  5. // Created by Sunshine on 2018/6/15.
  6. // Copyright © 2018 SenseTime. All rights reserved.
  7. //
  8. #import "STVFShader.h"
  9. const char* vsh = "attribute vec4 position;\
  10. attribute vec4 inputTextureCoordinate;\
  11. varying vec2 textureCoordinate;\
  12. void main()\
  13. {\
  14. gl_Position = position;\
  15. textureCoordinate = inputTextureCoordinate.xy;\
  16. }";
  17. const char* fsh = "varying highp vec2 textureCoordinate;\
  18. uniform sampler2D videoFrame;\
  19. void main()\
  20. {\
  21. gl_FragColor = texture2D(videoFrame, textureCoordinate);\
  22. }";
  23. @implementation STVFShader
  24. @end