설명 없음
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.

PBR2DPass.hlsl 854B

12345678910111213141516171819202122232425262728
  1. PackedVaryings vert(Attributes input)
  2. {
  3. Varyings output = (Varyings)0;
  4. output = BuildVaryings(input);
  5. PackedVaryings packedOutput = (PackedVaryings)0;
  6. packedOutput = PackVaryings(output);
  7. return packedOutput;
  8. }
  9. half4 frag(PackedVaryings packedInput) : SV_TARGET
  10. {
  11. Varyings unpacked = UnpackVaryings(packedInput);
  12. UNITY_SETUP_INSTANCE_ID(unpacked);
  13. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(unpacked);
  14. SurfaceDescription surfaceDescription = BuildSurfaceDescription(unpacked);
  15. #if _ALPHATEST_ON
  16. half alpha = surfaceDescription.Alpha;
  17. clip(alpha - surfaceDescription.AlphaClipThreshold);
  18. #elif _SURFACE_TYPE_TRANSPARENT
  19. half alpha = surfaceDescription.Alpha;
  20. #else
  21. half alpha = 1;
  22. #endif
  23. half4 color = half4(surfaceDescription.BaseColor, alpha);
  24. return color;
  25. }