NB: The second shader "ridge.frag" uses two source textures. Great for image fusion!
Here are the input and output images (feature.frag and ridge.frag) provided:
Timo's fixed vertex shader ("FULLSCREEN_QUAD_VERTEX_SHADER"), in readable form:
attribute mediump vec2 pos_attr
attribute mediump vec2 uv_attr
varying mediump vec2 outUV0
void main()
{
gl_Position = vec4(pos_attr,0.0,1.0);
outUV0 = uv_attr;
}
* * *
What is EGL? "EGL is an API for giving direct control over creation of OpenGL contexts that render to on-screen windows, offscreen pixmaps, or additional graphics-card memory."
To get the example (written by Timo Stich at Nvidia) ported to FCam environment:
- Copy over the libraries from the tablet to NDK as per Timo's instructions. (Slight typo in his filenames.)
- Merge Timo's makefile configuration 'Android.mk' to the FCam project you are working on. In particular, link 'cutils.so'.
With these steps, it should now be possible to declare SharedBuffer and the shader-related functions from the FCam source.
No comments:
Post a Comment