Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 07 Oct 2007
Offline Last Active Aug 26 2016 03:29 PM

Posts I've Made

In Topic: Avoiding huge far clip

01 June 2016 - 10:40 AM

Use an infinite far plane.

This is a great paper on improving perspective precision


In Topic: Vertex color interpolation weirdness (or is my hardware trolling me ?)

16 May 2016 - 12:59 PM

What format is the color output/input. You should define it to be a texcoord if its currently a color.

In Topic: Vertex color interpolation weirdness (or is my hardware trolling me ?)

16 May 2016 - 12:01 PM

The banding you are seeing is expected with the FP10 format. The format is 6 bits mantissa and 4 bit exponent. So from 0.5 to 1.0 you have 64 unique codes (2^6). 1 / 0.0156 == 64.


The banding is a quantisation when storing to the FP10 blue format. 


A solution is is to add noise or dither at export time to mask the banding artifacts.

Here is a great presentation on this.

In Topic: Math behind anisotropic filtering?

23 March 2016 - 09:56 PM

The best way to think of it is to picture what a pixel looks like when projected into texture space. If the surface is aligned with the camera near plane then the pixel will map to a square in texture space. It could be freely rotated however and look like a diamond. For point sampling the texel closest to this square sample is used. For bilinear its a weighted average of the 4 nearest. For the case of mip mapping a mip level is selected such that the square is about 1 texel unit area. Think about this square projected onto each mip level. As each mip level goes down each texel effectively doubles in each axis.


For anisotropic filtering then the pixel is elongated and forms a thin rectangle. There is no mip level you can use which either fully represents all of the rectangle. Instead the rectangle can be subdivided into smaller rectangles such that they are more square like. Each of this subdivisions have their own texel centre and can be each bilinear filtered and averaged for a result whcih better represents all the texels that touch the rectangle.


Hope this helps. I know pictures will help better explain. I'm sure there is so good visual explanations out there. 

In Topic: Per Triangle Culling (GDC Frostbite)

21 March 2016 - 04:10 PM

The point is that the ALU processing capabilities far exceed that of the fixed function triangle setup and rasterizer. Using compute you can prune the set of triangles to get rid of the ones that don't lead to any shaded pixels and are therefore discarded. Its purely there to get a bit more performance.