@t0neg0d you are added to the shaderBlow project, so you can commit your cool shaders. If you want of course.
@oxplay2 said:
@t0neg0d
from my next observation:
setScale - in documentation is said that 0.2f is default, but setting it to 2f give same result like dont use "setScale".
0.2f give much stronger result. so 2f is default, yes?
basicSSAO.setUseDistanceFalloff(false); - setting it to false give:
My bad... it is set up in the shader as a define... and apparently improperly. It is defaulted to false, so no need to call setUseDistanceFalloff unless setting it to true. Let me update that so it works properly.
And I'll update the javadoc info. I did a considerable amount of cut/paste to add that right before posting the code and knew that it was potentially not correct >.<
@mifth said:
@t0neg0d you are added to the shaderBlow project, so you can commit your cool shaders. If you want of course.
The shaders are pretty useless without the post filter. How would you like this added in that case?
EDIT: See original post for code as it is being maintained there now.
- 50% for me and looking same good
good news!
@oxplay2 said:
+ 50% for me and looking same good :)
good news!
Awesome! Though, I'm noticing that adjusting setting now doesn't seem to be working... would this have something to do with the removal of FixedFunc? To be honest... I have no clue what that does >.< @nehon What does this do? :)
Lol… ignore me. I have so much going on right now… I was editing the wrong file >.<
would this have something to do with the removal of FixedFunc? To be honest… I have no clue what that does
hehe :)
i don't know what exactly FixedFunc was doing.(because it was not a time to make shaders for me)
but i know it was made deprecated couple months ago. It do nothing now.
@t0neg0d
great, thanks if i will find more minor bugs, i will tell you.
could i ask, how to good optimize it via configuration?
i mean, quality or something that give better performance / quality.
because it would be good for users to set quality or performance.
@oxplay2 said:
@t0neg0d
great, thanks :) if i will find more minor bugs, i will tell you.
could i ask, how to good optimize it via configuration?
i mean, quality or something that give better performance / quality.
because it would be good for users to set quality or performance.
My first guesses would be:
1. I need to re-implement falloff to actually not perform the occlusion. Right now, I am simply mixing back in white to the shadowmap based on the results of the falloff. What it should be doing (at a minimum) is doing the falloff equation first and not running occlusion at all once the limit is reached.
2. I can add the option of disabling the fine detail pass, which will double the performance and still produce really nice looking results.
I'll try to get both of these in there today and post an update... both seem like really good ideas to add.
@t0neg0d said:
My first guesses would be:
1. I need to re-implement falloff to actually not perform the occlusion. Right now, I am simply mixing back in white to the shadowmap based on the results of the falloff. What it should be doing (at a minimum) is doing the falloff equation first and not running occlusion at all once the limit is reached.
2. I can add the option of disabling the fine detail pass, which will double the performance and still produce really nice looking results.
I'll try to get both of these in there today and post an update... both seem like really good ideas to add.
This would be great!
i really care about performance. So if you could make it possible, to much optimize it via configuration i would be very thankful! :)
@t0neg0d said:
The shaders are pretty useless without the post filter. How would you like this added in that case?
Just add a simple scene j3o file and add your cool filters to it.
Shaders are shaders and filters are filters... they should be separete.
Or you can add your own branch for testing and development there. :)
@oxplay2 said:
This would be great!
i really care about performance. So if you could make it possible, to much optimize it via configuration i would be very thankful! :)
Good news... disabling the fine detail did actually double the performance. And the result difference is almost not noticeable just by tweaking the the params a bit.
Framerate in the test scene went from 41fps to 61fps!
As a matter of fact, I am going to set this as the default, minimize the BasicSSAO() call to 4 variables and add a method to the filter for enabling fine detail.
awesome!
41fps to 61fps is much difference
of course, don’t go too far with optimization. for weak machines, there is always option to set AO off.
As for the falloff changes. The performance results vary depending on the complexity of the part of the scene that is being AO’d at any given time, + the distance and rate of the falloff. You can definitely squeeze out some performance increase… however, I am not so sure what you lose in visuals is worth the minor increase… either way… it is going to stay as it should have been this way to begin with. and for those using falloff to mix with shader-based fog and such… the performance increase is priceless.
I’m going to post the updates after going through the javadoc info. I’ll post this to the original thread’s post and maintain that from now on.
This looks really good, congratulations! Really good work you have done here! Features are popping everywhere in this forum, I’m getting crazy!
Updated with shadow map smoothing… see OP for details and code updates.
@t0neg0d:
after update:
com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Shaders/BasicSSAOBlur.frag, defines, type=Fragment, language=GLSL100] error:ERROR: 0:25: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:26: '/' : wrong operand types no operation '/' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ssao += texture2D(m_SSAOMap,texCoord + (random(vec4(texCoord,-texCoord)*vec4(float(-i)))/200))
huh... changing to "*0.005" or "200.0" and later to "*0.01" or "100.0" give no result... no ssao appearance...
you should really make repository ;) if there would be, then i could tell you which update made issue.
edit:
ok i found problem. it seems you modify "toggleSSAO();" because when i use it, then it do nothing.
but still you need to fix 200 -> 200.0 and 100 -> 100.0
BTW:
on lower fps there is weird artifact(only with smooth set on)
(made wideo with 10 fps, when more than 15 then there is no artifact visible)
http://www.youtube.com/watch?v=y892CeduCJ0
but it's only for lower fps, and without smoothing there is no artifact also, so it's nothing to worry about.
@t0neg0d:
last JME nightly update need postQueue method updated.