Hello,
I would like to know if anyone here know the good way to render paraboloid render texture with irrlicht ?
It's for making realtime reflection on a small detailled object and I don't know how to setup my camera matrix for the render target.
Thanks for your help
Dual Paraboloid mapping
Re: Dual Paraboloid mapping
I suspect you'd have to write your own shader. Sounds a bit complicated.
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
-
- Competition winner
- Posts: 95
- Joined: Wed Nov 30, 2005 8:53 am
- Location: France : midi pyrénées
Re: Dual Paraboloid mapping
If I understand, the pseudo code is:
Render to texture with fov 1.57 and ratio 1 with Z positive for front texture
Render to texture with fov 1.57 and ratio 1 with Z negative for back texture
Use shader to modify textures to spheremap texture
Use shader to render the texture onto the object that was reflective.
Orthographic or perspective camera for render textures ?
I think the more complicated task is generate the spheremap style texture from shader
Render to texture with fov 1.57 and ratio 1 with Z positive for front texture
Render to texture with fov 1.57 and ratio 1 with Z negative for back texture
Use shader to modify textures to spheremap texture
Use shader to render the texture onto the object that was reflective.
Orthographic or perspective camera for render textures ?
I think the more complicated task is generate the spheremap style texture from shader
Re: Dual Paraboloid mapping
You need a custom vertex shader (and tessellated/dense geometry, because paraboloid projection is non-linear and properly computed the triangle edges should "curve"), stefbuet had a post about it on the forum.
The projection is not linear so its neither Perspective or Orthographic.
The projection is not linear so its neither Perspective or Orthographic.