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

实现滤镜 #4

Open
richlaji opened this issue Jan 6, 2022 · 1 comment
Open

实现滤镜 #4

richlaji opened this issue Jan 6, 2022 · 1 comment

Comments

@richlaji
Copy link

richlaji commented Jan 6, 2022

非常感谢开源~
我目前能跑通你的代码,想以此为基础实现新的滤镜,想问一下我应该怎么做呢
我目前做法是在Vulkan-GPUImage-main\app\src\main\cpp\include\filter下新增加一个.h文件,代码实现拷贝了MirrorFilter.h的内容,但他提示'VulkanFilter.h' file not found with include; use "quotes" instead,即使换成引号,showVertexShader和revertShowrFragShader这两个也提示Use of undeclared identifier 'showVertexShader',且无法include VKShaders.h头文件,期待您的回复

@richlaji
Copy link
Author

richlaji commented Jan 6, 2022

已经解决,看起来是work了,如果流程不对还望大佬指出
(1)需要Vulkan-GPUImage-main\app\src\main\cpp\include\filter\下新增.h的文件实现shader
(2)在java里添加新的滤镜选项,Vulkan-GPUImage-main\app\src\main\java\com\glumes\vulkancamera\filter下的FilterType.java和FilterUtil.java,照葫芦画瓢
(3)在cpp层定义Type,Vulkan-GPUImage-main\app\src\main\cpp\include\filter\FilterType.h
(4)在cpp层添加对应滤镜的调用,Vulkan-GPUImage-main\app\src\main\cpp\src\filter\FilterUtil.cpp下,include新的滤镜头文件,case新增滤镜,照抄前面代码

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

No branches or pull requests

1 participant