DepthOfFieldDownSample.azsl 880 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Atom/Features/PostProcessing/FullscreenPixelInfo.azsli>
  9. #include <Atom/Features/PostProcessing/FullscreenVertex.azsli>
  10. #include "DepthOfField.azsli"
  11. #include <viewsrg_all.srgi>
  12. ShaderResourceGroup PassSrg : SRG_PerPass
  13. {
  14. Texture2D<float4> m_colorAndDofFactor;
  15. Sampler LinearSampler
  16. {
  17. MinFilter = Linear;
  18. MagFilter = Linear;
  19. MipFilter = Linear;
  20. AddressU = Clamp;
  21. AddressV = Clamp;
  22. AddressW = Clamp;
  23. };
  24. }
  25. PSOutput MainPS(VSOutput IN)
  26. {
  27. PSOutput OUT = (PSOutput)0;
  28. OUT.m_color = PassSrg::m_colorAndDofFactor.Sample(PassSrg::LinearSampler, IN.m_texCoord);
  29. return OUT;
  30. }