No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SubpixelMorphologicalAntialiasing.shader 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. Shader "Hidden/Universal Render Pipeline/SubpixelMorphologicalAntialiasing"
  2. {
  3. Properties
  4. {
  5. [HideInInspector] _StencilRef ("_StencilRef", Int) = 64
  6. [HideInInspector] _StencilMask ("_StencilMask", Int) = 64
  7. }
  8. HLSLINCLUDE
  9. #pragma multi_compile_local _SMAA_PRESET_LOW _SMAA_PRESET_MEDIUM _SMAA_PRESET_HIGH
  10. ENDHLSL
  11. SubShader
  12. {
  13. Cull Off ZWrite Off ZTest Always
  14. // Edge detection
  15. Pass
  16. {
  17. Stencil
  18. {
  19. WriteMask [_StencilMask]
  20. Ref [_StencilRef]
  21. Comp Always
  22. Pass Replace
  23. }
  24. HLSLPROGRAM
  25. #pragma vertex VertEdge
  26. #pragma fragment FragEdge
  27. #include "SubpixelMorphologicalAntialiasingBridge.hlsl"
  28. ENDHLSL
  29. }
  30. // Blend Weights Calculation
  31. Pass
  32. {
  33. Stencil
  34. {
  35. WriteMask [_StencilMask]
  36. ReadMask [_StencilMask]
  37. Ref [_StencilRef]
  38. Comp Equal
  39. Pass Replace
  40. }
  41. HLSLPROGRAM
  42. #define USE_FULL_PRECISION_BLIT_TEXTURE 1
  43. #pragma vertex VertBlend
  44. #pragma fragment FragBlend
  45. #include "SubpixelMorphologicalAntialiasingBridge.hlsl"
  46. ENDHLSL
  47. }
  48. // Neighborhood Blending
  49. Pass
  50. {
  51. HLSLPROGRAM
  52. #pragma vertex VertNeighbor
  53. #pragma fragment FragNeighbor
  54. #include "SubpixelMorphologicalAntialiasingBridge.hlsl"
  55. ENDHLSL
  56. }
  57. }
  58. }