暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

VFXVertexProbeSampling.template 1.3KB

123456789101112131415161718192021222324252627282930313233343536
  1. ${VFXBegin:VFXVertexProbeDeclareVaryings}
  2. //Store a compacted version of the contributions in the six directions (3xfloat4)
  3. #if defined(PROBE_VOLUMES_L1) || defined(PROBE_VOLUMES_L2)
  4. #define INDIRECT_INTERPOLATION
  5. #else
  6. #define INDIRECT_INTERPOLATION nointerpolation
  7. #endif
  8. INDIRECT_INTERPOLATION float4 bakeDiffuseLighting[3] : BAKEDIFFUSE0;
  9. ${VFXEnd}
  10. ${VFXBegin:VFXVertexProbeVaryingsMacros}
  11. #define VFX_VARYING_BAKE_DIFFUSE_LIGHTING bakeDiffuseLighting
  12. ${VFXEnd}
  13. ${VFXBegin:VFXVertexProbeFillVaryings}
  14. #if VFX_MATERIAL_TYPE_SIX_WAY_SMOKE
  15. EvaluateProbesSixWay(o);
  16. #endif
  17. ${VFXEnd}
  18. ${VFXBegin:VFXVertexProbeDeclareFunctions}
  19. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SixWayLighting.hlsl"
  20. void EvaluateProbesSixWay(inout VFX_VARYING_PS_INPUTS input)
  21. {
  22. float3 positionWS = GetAbsolutePositionWS(input.VFX_VARYING_POSWS);
  23. float3 normalWS = input.VFX_VARYING_NORMAL.xyz;
  24. float3 tangentWS = input.VFX_VARYING_TANGENT.xyz;
  25. GatherDiffuseGIData(positionWS, normalWS, tangentWS, input.VFX_VARYING_BAKE_DIFFUSE_LIGHTING[0],
  26. input.VFX_VARYING_BAKE_DIFFUSE_LIGHTING[1],
  27. input.VFX_VARYING_BAKE_DIFFUSE_LIGHTING[2]);
  28. }
  29. ${VFXEnd}