News for hackers. Stuff that matters.
Re:Gentle introduction to GPUs inner workings by bigdict on Saturday October 02, 2021 @03:33PM (#28731319)
So the function F is implicitly defined to have value F(x,y) = v, where x and y are coordinates of the core, and v is the input value to the dFdx/dFdy instruction? Then the output of the instruction running on the x,y core (take dFdx for example) is supposedly equal to (F(x+1,y)-F(x-1,y))/2?
Re:Gentle introduction to GPUs inner workings by ww520 on Saturday October 02, 2021 @04:36PM (#28731859)
Yes. That's the idea. Though not exactly sure how the GPU uses the neighboring values to interpolate the partial derivative. It's probably GPU dependent.
Re:Gentle introduction to GPUs inner workings by corysama on Saturday October 02, 2021 @05:36PM (#28732300)
Pretty much all of them work in 2x2 quads. DyDx is calculated within a quad. But, not across them. This is an imperfect approximation to the derivative that needs to be accounted for. But, it’s useful and very cheap and trivially easy.
Re:Gentle introduction to GPUs inner workings by Jasper_ on Saturday October 02, 2021 @05:59PM (#28732467)
It's defined to work on a 2x2 grid called a quad. If you're the top left pixel, then dFdX(v) = v(x+1,y) - v. If you're the top right pixel, then it's dFdX(v) = v(x-1,y) - v