Jump to content
Sign in to follow this  
denali

post-process triple-monitor stretch/fish-eye distortion fix

Recommended Posts

Well, first the decrease in resolution isn't noticeable.  

The fisheye file is a post-process shader.  For every pixel in a view, the shader is called, if it's set to in the view configuration.  The function in the file runs once every time for each pixel.  And the output is a new color for the pixel.  You can access the current image for the view by uTDim.x and .y.  I am taking a color from another location in the image and putting it somewhere else, pixel by pixel.

Technically they aren't pixels, but texels.  texels are like pixels, but on a texture that has a height and a width.  Shaders handle the view image as texture, which can be stretched and compressed, etc.  

 

So it is called by directx if you set it to call it that psh file, using the xml file and selecting it in your custom camera.  For each texel in the texture painted on to the final camera view, you can output a color, or a depth value (depth being how deep in the view that pixel originates from, for fog and other effects, as far as I understand it now, which is probably pretty shaky on that depth thing).

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...