Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 07 Oct 2007
Offline Last Active Sep 25 2016 03:50 PM

Posts I've Made

In Topic: Problem with Diffuse Lighting

24 September 2016 - 09:38 PM

You are not setting the World matrix in the object CB. The transformed normal is probably coming out as (0,0,0)

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.