Depth of field

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


jwwalker
Goblin
Posts: 248
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 18

Depth of field

Post by jwwalker »

How can one render a depth of field effect in Ogre? All I could find was a forum thread from 2006.
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 480
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 167

Re: Depth of field

Post by sercero »

Perhaps the technique has not changed much over time.

Here is a compositor that uses DOF: https://github.com/OGRECave/ogre/blob/b ... F.material
Lax
Gnoll
Posts: 644
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 59

Re: Depth of field

Post by Lax »

I think jwwalker, means with new compositor system. The code in the material script uses old cg shader.
I would also be interested in depth of field.

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

paroj
OGRE Team Member
OGRE Team Member
Posts: 2108
Joined: Sun Mar 30, 2014 2:51 pm
x 1134

Re: Depth of field

Post by paroj »

Cg is basically HLSL and you can find a GLSL variant here: viewtopic.php?p=367396#p367396

I will try to port the latter to Ogre 13, as it still carries the dysfunctional Cg variant.