One of the things I didn’t point out in the earlier portion of the thread, could stand some light shined on it.
Let’s talk about what shading rate and pixel samples actually mean.
Unfortunately, I cannot really speak about one without speaking about the other as they’re so intertwined that they’re inseparable as far as I am concerned.
But here’s a stab a separating them anyway:
Shading Rate - How many times to sample a given area for determining the color of a given pixel.
Pixel Samples - Number of Pixels to traverse away from the current pixel when sampling color for shading rate.
So now to talk about them together… Examples are easier so here we go!
Consider a Shading Rate value of 1.00. The DS3 Default value. At this value you’re comparing 1 pixel at a time to each pixel in the pixel sample width X and Y values to determine it’s color. So if you have a pixel sample width of X=6 and Y=6, you’re going to sample +6 pixels on the X axis, -6 pixels on the X axis, +6 pixels on Y and of course, -6 pixels on Y. So at a shading rate of 1.00 each pixel is sampled 24 times (given a pixel sample width of 6x6) to determine it’s color.
So now, let’s talk about Shading Rate values of LESS than 1. Effectively, what you do is some math. It really translates to sampling the same area of pixels nearby over and over again to determine the color of the active pixel. So let’s take my recommended “best” setting for shading rate of 0.20.
The math goes like this: (Shading Rate * Pixel Sample X Value * 2) + (Shading Rate * Pixel Sample Y Value * 2)
When you’re under a value of one though, you have to divide 1 by that value… so
At 0.20 the math works like this:
1 / 0.20 = 5
(5 * Pixel Filter Width X Value * 2) + (5 * Pixel Filter Width Y Value * 2)
So given a Pixel Sample Width of 6x6 again, that would be
(5 * 6 * 2) + (5 * 6 * 2) = 120. So that single pixel is compared against it’s neighbors 120 times. That’s quite a jump over the 24 comparisons it does by default.
So if you use the absolute best shading rate DAZ Studio can do (0.010), the math works out like this:
1 / 0.010 = 100
(100 * 6 * 2) + (100 * 6 * 2) = 2400
Yes, two THOUSAND four hundred samples per pixel. If you’re doing a 1000x1000 pixel render, well, the math adds up. (2 billion, 400 million samples must be taken at 0.010 vs. 120 million at 0.20).
The odds of the color changing over 0.20 are pretty slim, but it might make some tiny difference. It’s also pretty clear why lowering the shading rate is a direct line to how long it takes something to render.
NOW, that said, there ARE reasons to use lower shading rates. Extreme displacement detail is the #1 reason to do so. This is because with extremely fine displacement, especially if it’s a strong value, the pixel sample may not reach an area of the render where displacement is occurring and thus the detail is lost. This is easily seen using Pen’s Fur Shader. For most products though, it’s really quite overkill (imo) to set the shading rate value that small.
It also, using the text above, should be clear why an increase Pixel Samples is required to handle depth of field. Depth of Field introduces blur and blur clearly affects color and position. A larger field of pixels is needed to create a smooth blur, thus my recommendation of upping the pixel samples for DoF renders.
Such is my, more technical, understanding of Shading Rate and Pixel Samples.
Pixel Filter Width would work in a similar fashion to Pixel Samples, but applies only to the type of Pixel Filter that is being applied.
Oh, and for shading rates GREATER than one, what you’re doing is comparing an area against the pixel filter. So to handle the math involved in that, divide 1 by that value. So a shading rate of 4.00 (again keep pixel samples at 6x6) the math works like this:
1/4 = .25
(.25 * 6 * 2) + (.25 * 6 * 2) = 6