Filter map in environment call ?

   2786   5   0
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
Hi. Could you explain me please how to filter the environment map, using additional four vectors in environment() vex function. How to calculate those vectors :?:

Best regards. Alex.
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
UP! 8)
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
User Avatar
Member
1002 posts
Joined: July 2005
Offline
The easiest way to filter an environment map would be to use the “blur” argument to blur as a percentage of the map size. For example:

// Blur 10% of the map resolution. For a cube map, this would translate to an angle of about 0.1*90 = 9 degrees
environment(“map.rat”, dir, “blur”, 0.1);

Andrew
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
Thx andrewc. Yes i know, i can use blur and filter width, to blur texture map, but i'm really very interesting how to use those 4 vectors. Even in voplib.h, environment() function called with four vectors R. So, is it correct ? I'm very doubt about it. :roll:
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
User Avatar
Member
1002 posts
Joined: July 2005
Offline
The 4 vectors are just another way to define the region in the environment map to filter. If you can form a filtering quadrilateral with 4 direction vectors (in clockwise or counterclockwise order), the environment() function will filter the map in this rectangle. voplib.h and other shaders may pass in the same R vector for all 4 vectors in order to turn off derivative-based filtering which is used for the environment() operation that takes a single R vector.

Andrew
User Avatar
Member
183 posts
Joined: Nov. 2008
Offline
andrewc
If you can form a filtering quadrilateral with 4 direction vectors (in clockwise or counterclockwise order), the environment() function will filter the map in this rectangle.

Thats exactly what i need andrewc. I have no idea how to form this quadrilateral with this vectors. Is there any info about it? Maybe some links….. :wink:
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
  • Quick Links