Took quite some work but we have it down now
With some help from SteveL at the darkmod forums we finally nailed how to access and render to the depthbuffer in vanilla,
as a result a whole slew of new options turned up, not only related to SSAO but also soft particles, and fixing corruption on water reflections.
The thread covering this over at the darkmods forum are literally buzzing with activity and SteveL has allready made several demos to show of the new effects.
For a walkthrough on how to get the depthbuffer code in vanilla look at my revelation test thread in the general forums (somewhere close to the end of the thread).
Ill post a cleaned up tutorial soon when i get some free time
Finally nailed how to capture and render the depth buffer
Finally nailed how to capture and render the depth buffer
Productivity is a state of mind.
Re: Finally nailed how to capture and render the depth buffe
Now that is some interesting stuff
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Re: Finally nailed how to capture and render the depth buffe
many sleepless but productive nights.
Next step FBO's and getting rid of the old opengl 1.4 calls.
Next step FBO's and getting rid of the old opengl 1.4 calls.
Productivity is a state of mind.
Re: Finally nailed how to capture and render the depth buffe
Still at it though steve is not home atm, he still posts new ideas on how to use the new functionality
Also looking at other options atm. Parralax occlusion mapping / splitting up the interactions / programmable ambient lighting.
Problem with splitting up the interactions might break compatibility with vanilla though so we have to supply new shaders in case we want to keep compatibility
vanilla will look very much improved as a result though.
We kinda stepped back from GLSL atm as ARB2 works just fine with the current options, its still planned sometime though.
Might have to learn how to write material shaders so i can test out stuff damn i hope im not to old to learn new stuff heh.
Also looking at other options atm. Parralax occlusion mapping / splitting up the interactions / programmable ambient lighting.
Problem with splitting up the interactions might break compatibility with vanilla though so we have to supply new shaders in case we want to keep compatibility
vanilla will look very much improved as a result though.
We kinda stepped back from GLSL atm as ARB2 works just fine with the current options, its still planned sometime though.
Might have to learn how to write material shaders so i can test out stuff damn i hope im not to old to learn new stuff heh.
Productivity is a state of mind.
Re: Finally nailed how to capture and render the depth buffe
Code: Select all
!!ARBvp1.0
OPTION ARB_position_invariant;
MOV result.texcoord, vertex.texcoord;
END
!!ARBfp1.0
PARAM clipPlanes = { 0.4, 350.0 };
TEMP dpth, col, rng;
TEX dpth, fragment.texcoord, texture[0], 2D;
ADD rng.x, clipPlanes.y, -clipPlanes.x;
MUL col.x, dpth.x, rng.x;
ADD col.x, -col.x, clipPlanes.x;
ADD col.x, col.x, clipPlanes.y;
RCP rng.x, col.x;
MUL col.x, rng.x, clipPlanes.x;
MUL col.x, col.x, 2.0;
MOV result.color.r, col.x;
MOV result.color.g, col.x;
MOV result.color.b, col.x;
MOV result.color.a, 1.0;
END
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Re: Finally nailed how to capture and render the depth buffe
Productivity is a state of mind.
Re: Finally nailed how to capture and render the depth buffe
That's pretty awesome!revelator wrote:http://www.youtube.com/watch?feature=pl ... vdzFWCGpKA
steves demo look at the tablet
Re: Finally nailed how to capture and render the depth buffe
Couldn't you just rip the _currentDepth code from the BFG renderer?
Re: Finally nailed how to capture and render the depth buffe
i actually based parts of my code on the bfg version allthough i had to hunt down where things would fit in the old vanilla render, some parts are rather different in BFG.
Latest code seems to work quite nicely allthough i really need someone who can rewrite sikkpins SSAO shader to make use of the new functionality.
But atleast my work is now part of the darkmod engine so i might get lucky.
Latest code seems to work quite nicely allthough i really need someone who can rewrite sikkpins SSAO shader to make use of the new functionality.
But atleast my work is now part of the darkmod engine so i might get lucky.
Productivity is a state of mind.