-
Notifications
You must be signed in to change notification settings - Fork 25
Conversation
Nice :) I will need a bit of time to review this ;) |
I might make some more changes this weekend. I noticed, for example, that |
@@ -45,7 +45,7 @@ function get_texture!(atlas) | |||
end | |||
|
|||
# TODO | |||
const enable_SSAO = Ref(true) | |||
const enable_SSAO = Ref(false) |
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.
Cool, with all the issue, it seems to be a good idea to only turn it on when actually used!
Let me know once this is ready :) |
I think I'm done with this. It would be cool to turn on/off ssao (and maybe fxaa) on the fly in the future, i.e. to cause a shader recompilation when the scene demands it. That would also be nice to control |
AbstractPlotting tests pass locally for me, on current |
Should be ready to merge |
otherwise the background may get darkened
Just gave it a try, works great. Thank you!! |
Thanks! |
Here's a draft for MakieOrg/Makie.jl#604.
I moved most of the postprocessing stuff into a new file and wrapped it up in a
PostProcessor
object. Beyond ssao, fxaa and copying I also added an "empty" postprocessor, which doesn't do anything when executed. Depending on some global variablesenable_SSAO
andenable_FXAA
either the empty or the ssao/fxaa postprocessor ends up in a list inScreen
. The renderloop then executes postprocessors from that list, in order.So if for example
screen.postprocessors[1]
is an empty postprocessor, the renderloop will do nothing instead of the SSAO stuff. This is the case whenenable_SSAO[] = false
. I also added a bit to theGLVisualizeShader
so that theposition
andnormal
buffers are removed fromfragment_ouput
whenenable_SSAO = false
.