Kotlin

Creating shader for color inversion

Now our rendererer needs shader let's implement it

  1. Add fragmentShaderCode to the MyRenderer class:
  1. To render the video frames, the renderer class uses OpenGL shaders. In this sample shader produces the inverted color effect, more precisely this is achieved by this line y = 1.0 - 1.1643 * (y - 0.0625); which is inside the fragmentShaderCode

  2. For full implementation of the renderer check the sample app implementation here