Hi,
is it possible to create fog that gets denser in one direction?
I fear the answer - "write a shader".
Fog
Re: Fog
Ah - can't answer - it would scare you.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Fog
Hm, yeah - a few planes with half-transparent textures could fake it maybe. Thought that would be slow. And for real fog that get's denser with depth and is not regular distributed I think shaders are just the easiest solution. Because I don't think there is a fast way from the fixed function pipeline to access and use the z-buffer in a fast way.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Fog
As said - it might work. Would have to experiment how it looks to be sure. But large half-transparent polygons are rather expensive, so I usually try to avoid getting those. And I think a shader for this is just easier. No node handling, no aligning to camera etc... just changing the pixel-color based on the depth of the z-buffer at that point.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Fog
there's a way to do that in fixed opengl pipeline, but that's a useless functionality since shaders can do more and better (gl fog coord: used to make fog with static geometries like valleys, swamps, mountains.). so no way in irrlicht (no sane engine support gl fog coord). And learn to write shaders it is worth it.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me