PPSSRResolve.bsl 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. code
  16. {
  17. [internal]
  18. cbuffer Input
  19. {
  20. float2 gSceneDepthTexelSize;
  21. float2 gSceneColorTexelSize;
  22. float gManualExposure;
  23. }
  24. #if MSAA
  25. Texture2DMS gSceneDepth;
  26. #else
  27. Texture2D gSceneDepth;
  28. #endif
  29. Texture2D gSceneColor;
  30. Texture2D gPrevColor;
  31. SamplerState gPointSampler;
  32. SamplerState gLinearSampler;
  33. float3 fsmain(VStoFS input) : SV_Target0
  34. {
  35. #if MSAA
  36. return temporalResolve(
  37. gSceneDepth,
  38. gSceneColor, gLinearSampler, gSceneColorTexelSize,
  39. gPrevColor, gLinearSampler, gSceneColorTexelSize,
  40. gManualExposure, input.position.xy, input.screenPos, 0);
  41. #else
  42. return temporalResolve(
  43. gSceneDepth, gPointSampler, gSceneDepthTexelSize,
  44. gSceneColor, gLinearSampler, gSceneColorTexelSize,
  45. gPrevColor, gLinearSampler, gSceneColorTexelSize,
  46. gManualExposure, input.uv0, input.screenPos, 0);
  47. #endif
  48. }
  49. };
  50. };