-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add depth-of-field fog or blurring rendering options #347
Comments
From Avo1:
|
This doesn't work in OpenGL core AFAICT, but there are shader options, e.g.: |
Related to this, I'd suggest (once OpenGL 3 is in place) trying to have a set of common fragment shaders (fog, ambient occlusion...) rather than one per render type, and moving color computation, if applicable, into the geometry shader. Then all render types would be able to use any shader. Also simpler, more orthogonal code. |
Absolutely. See #582 which I don't think even requires switching to OpenGL 3. (It also includes an "outline" shader which would be nice for surfaces.) IIRC 3Dmol.js uses a similar strategy and it enables a volumetric render for orbitals / electron density: I can imagine a "View Options" window that allows tuning the global shader options. |
I'm going to leave this one open, since a blurring shader would still be nice. |
That's right. At the moment, This is mainly a "it would be nice to implement these in the future" issue, but if you're willing to help, I'd be happy to discuss how to implement them. |
One example of depth-of-field blurring: http://wwwtyro.github.io/speck/ |
Hi @ghutchis , I've been working on solving all the bugs of blur effects and am currently adding fog features to another repository in p5.js. After going through the codebase, it seems like these features aren't currently included maybe. Forgive me if I am wrong, as i just got the overview of the codebase. Could you clarify what exactly we're aiming for with these additions? Do we want to implement them with or without depth considerations? My plan is to integrate them into fragment shaders to keep things streamlined, as we can utilize a single default.vert shader. Additionally, we can explore adding other rendering options in the future. Could you provide some thoughts on this?? Thanks:) I have prety understood the codebase, may my plan could be wrong. Maybe you can give me an overview, how we are demanding these features. Or we are still discussing about how they must be implemented? update: Sorry for the message delete, I was editing something else |
Sounds good, let's have a discussion. My plan is to begin with implementing blur effects by creating uniforms in the code and linking them with shaders (a two-pass blur shader, unweighted kernel) through new fragment and vertex shaders. Do we have any community channels dedicated to this repository where we can discuss these ideas? Or maybe we can discuss it here in this issue? @ghutchis . Is it okay to ping you on the discourse form? |
Looks great. |
I was just considering using two uniforms in a |
While this is a C++ code, we use GLSL shaders and pass, for example, depth information. I try to encourage discussion to https://discuss.avogadro.cc/ |
Oops, I messed up things here...I have tagged you on the discourse form. Thanks:) |
This issue has been mentioned on Avogadro Discussion. There might be relevant details there: https://discuss.avogadro.cc/t/add-depth-of-field-fog-or-blurring-rendering-options/5332/2 |
I think we can still open this issue, since we still needs blur to completely close this... I'll resolve the merge conflicts coming in for blur. |
Avogadro 1 included "fog" to add some simple depth-of-field effects, e.g.:
VTK offers other kinds of depth-of-field effects including blurring:
The text was updated successfully, but these errors were encountered: