dsx - ps

Compute the rate of change in the render target's x-direction.


dsx dst, src



  • dst is a destination register.
  • src is an input source register.


Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw


The rate of change computed from the source register is an approximation on the contents of the same register in adjacent pixel(s) running the pixel shader in lock-step with the current pixel.

The dsx And dsy instructions compute their result by looking at the current contents of the source register (per component) for the various pixels in the local area executing in the lock-step. The exact formula used to compute the gradient varies depending on the hardware but should be consistent with the way the hardware does the same operations as part of the level-of-detail calculation process for texture sampling.

Related topics

Pixel Shader Instructions
texldd - ps