Is it Possible to give effect like Vertex Shader and Fragment Shader to the Android Camera Preview , and Save the Captured image with OpenGLES?

前端 未结 1 1103
离开以前
离开以前 2021-01-06 21:25

This two are My VertexShader and Fragment Shader file:

Vertex Shader File:

    attribute vec4 position;
attribute vec4 inputTextureCoordinate;

varyi         


        
1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-06 22:07

    Yes, it's definitely possible. There are a lot of different approaches to building this, and a small code sample won't really help much. The basic idea is to feed the frames you get from the camera to OpenGL as textures.

    Check out Camera image as an OpenGL texture on top of the native camera viewfinder. The source code should give you an idea for how to proceed.

    0 讨论(0)
提交回复
热议问题