PPSSRResolve.bsl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #include "$ENGINE$\PPBase.bslinc"
  2. #include "$ENGINE$\GBufferInput.bslinc"
  3. #include "$ENGINE$\PerCameraData.bslinc"
  4. #define TEMPORAL_LOCAL_VELOCITY 0
  5. #define TEMPORAL_SEARCH_NEAREST 0
  6. #define TEMPORAL_BLEND_FACTOR 8
  7. #define TEMPORAL_SMOOTH_NEIGHBORHOOD 0
  8. #define MSAA_COLOR 0
  9. #include "$ENGINE$\TemporalResolve.bslinc"
  10. technique PPSSRResolve
  11. {
  12. mixin PPBase;
  13. mixin PerCameraData;
  14. mixin TemporalResolve;
  15. variations
  16. {
  17. MSAA = { true, false };
  18. };
  19. code
  20. {
  21. [internal]
  22. cbuffer Input
  23. {
  24. float2 gSceneDepthTexelSize;
  25. float2 gSceneColorTexelSize;
  26. float gManualExposure;
  27. }
  28. #if MSAA
  29. Texture2DMS<float> gSceneDepth;
  30. #else
  31. Texture2D gSceneDepth;
  32. #endif
  33. Texture2D gSceneColor;
  34. Texture2D gPrevColor;
  35. SamplerState gPointSampler;
  36. SamplerState gLinearSampler;
  37. float4 fsmain(VStoFS input) : SV_Target0
  38. {
  39. #if MSAA
  40. return temporalResolve(
  41. gSceneDepth,
  42. gSceneColor, gLinearSampler, gSceneColorTexelSize,
  43. gPrevColor, gLinearSampler, gSceneColorTexelSize,
  44. gManualExposure, input.uv0, input.screenPos, 0);
  45. #else
  46. return temporalResolve(
  47. gSceneDepth, gPointSampler, gSceneDepthTexelSize,
  48. gSceneColor, gLinearSampler, gSceneColorTexelSize,
  49. gPrevColor, gLinearSampler, gSceneColorTexelSize,
  50. gManualExposure, input.uv0, input.screenPos, 0);
  51. #endif
  52. }
  53. };
  54. };