kernelBlurFragment2.fx 483 B

12345678910111213
  1. #ifdef DOF
  2. factor = sampleCoC(sampleCenter + delta * KERNEL_DEP_OFFSET{X});
  3. computedWeight = KERNEL_DEP_WEIGHT{X} * factor;
  4. sumOfWeights += computedWeight;
  5. #else
  6. computedWeight = KERNEL_DEP_WEIGHT{X};
  7. #endif
  8. #ifdef PACKEDFLOAT
  9. blend += unpack(texture2D(textureSampler, sampleCenter + delta * KERNEL_DEP_OFFSET{X})) * computedWeight;
  10. #else
  11. blend += texture2D(textureSampler, sampleCenter + delta * KERNEL_DEP_OFFSET{X}) * computedWeight;
  12. #endif