-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
🎉 Focus #456
🎉 Focus #456
Conversation
Hey thanks so much for this contribution! This is really a cool idea. I think we will need to tweak some things, but I am sure that we can include this. Here are some initial observations:
What do you think? Would you like to add these changes? Thank you again for the initiative! 💖 |
thanks for the suggestion. i'll try to resubmit soon :) |
at 100 blur amount |
ok i fixed the focus and ran the clang-format.sh |
Well, if you ran
Yeah, that's why I called it "acceptable". But maybe you can allow the quality slider to move between [0.1 ... 2] with 1 being the default. So if anybody wants to, the patchyness could be resolved. Also, you could experiment with the two factors |
I am using this since a couple of hours and I really like the effect 😄 |
Do you want to add the quality slider? Afterwards I would have a deeper look at the code and then we could merge this, I think! |
yes, i think i'll do that later today :) |
testing video even the lowest quality doesn't look bad |
😅 I forgot the clang-format again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much! This really looks great now. I added a few minor remarks to the code. You should again try to run the clang-format.sh
script as there are many empty lines added in various places which should be removed by the script.
Anyways, once these remaining issues are resolved, I am happy to merge this cool new effect!
I think I'll try to create a bit smoother and more compressed gif for the effect.
But yeah, thanks again!
README.md
Outdated
@@ -50,6 +50,7 @@ This extension is not only more useless than the cube, but it is also much more | |||
| **TV Effect** <br> This is a very simple effect to demonstrate that this extension could also be used in a more professional environment. | <img src ="docs/pics/tv.gif" /> | | |||
| **TV Glitch** <br> This effect combines the Glitch and the TV Effect. | <img src ="docs/pics/tv-glitch.gif" /> | | |||
| **Wisps** <br> Let your windows be carried away to the realm of dreams by these little fairies! | <img src ="docs/pics/wisps.gif" /> | | |||
| **Focus** <br> Focus Dude, Focus | <img src ="docs/pics/focus.gif" /> | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could move this to the alphabetically correct position.
resources/shaders/focus.frag
Outdated
// Ease-in-out cubic for alpha | ||
float easeInOutCubic(float x) { | ||
return x < 0.5 ? 4.0 * x * x * x : 1.0 - pow(-2.0 * x + 2.0, 3.0) / 2.0; | ||
} | ||
|
||
// Ease-in-out sine for blur | ||
float easeInOutSine(float x) { | ||
return -(cos(3.14159265 * x) - 1.0) / 2.0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These could be moved to common.glsl.
resources/shaders/focus.frag
Outdated
const float directions = 15.0; | ||
// const float samples = quality; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this could be removed.
const float directions = 15.0; | |
// const float samples = quality; | |
const float directions = 15.0; | |
resources/ui/adw/prefs.ui
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what you changed here, but I think it is not related to this pull request, or is it? If not, I think you could undo all the changes you did here to keep the history clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i can make a new branch and keep a clean history
src/effects/Focus.js
Outdated
// This effect ... // | ||
// <- Please add a description of your effect here -> // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cool if you added a short description here 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i can
this is the first time i'm contributing (pull request) to any repo outside of my 9-5.
this blurs and alphas the window to appear and disappears.
similar to the way the PIP window does on IOS.
later the performance can be improved by adjusting line 52 of focus.frag.
this could allow the offset to be widen a bit ... so we are looping a little less.
however this comes at a cost of the quality of the blur.