Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show + capture activity #38

Closed
sangharatna opened this issue Nov 20, 2015 · 1 comment
Closed

Show + capture activity #38

sangharatna opened this issue Nov 20, 2015 · 1 comment
Labels

Comments

@sangharatna
Copy link

unable to apply emboss , sharpen ,blur and edge detection filter for full preview.

if any one have idea about that please let me know.

@sangharatna
Copy link
Author

Solved...

just replace, String FRAGMENT_SHADER_EXT_FILT final-variable with,

private static final String FRAGMENT_SHADER_EXT_FILT =
"#extension GL_OES_EGL_image_external : require\n" +
"#define KERNEL_SIZE " + KERNEL_SIZE + "\n" +
"precision highp float;\n" +
"varying vec2 vTextureCoord;\n" +
"uniform samplerExternalOES sTexture;\n" +
"uniform float uKernel[KERNEL_SIZE];\n" +
"uniform vec2 uTexOffset[KERNEL_SIZE];\n" +
"uniform float uColorAdjust;\n" +
"void main() {\n" +
" int i = 0;\n" +
" vec4 sum = vec4(0.0);\n" +
/* " if (vTextureCoord.x < vTextureCoord.y - 0.005) {\n" +/
" for (i = 0; i < KERNEL_SIZE; i++) {\n" +
" vec4 texc = texture2D(sTexture, vTextureCoord + uTexOffset[i]);\n" +
" sum += texc * uKernel[i];\n" +
" }\n" +
" sum += uColorAdjust;\n" +
/
" } else if (vTextureCoord.x > vTextureCoord.y + 0.005) {\n" +
" sum = texture2D(sTexture, vTextureCoord);\n" +
" } else {\n" +
" sum.r = 1.0;\n" +
" }\n" +*/
" gl_FragColor = sum;\n" +
"}\n";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants