AmplifyCreations / AmplifyShaderEditor-Feedback

4 stars 0 forks source link

SRP Baked GI Node - Error: 'SampleBakedGI': no matching 4 parameter function at line xxxx #285

Closed Dawie3565 closed 7 months ago

Dawie3565 commented 7 months ago

Unity 6000.0.0b15 HDRP

SRP baked GI node returns error 'SampleBakedGI': no matching 4 parameter function at line xxxx

This is a code change within: com.unity.render-pipelines.high-definition\Runtime\ShaderLibrary\ShaderGraphFunctions.hlsl

also note we need to also update to add code for include new APV as applicable

Dawie3565 commented 7 months ago

>=2020.2 && <=2021.3.16 float3 shadergraph_HDBakedGI(float3 positionWS, float3 normalWS, float2 uvStaticLightmap, float2 uvDynamicLightmap, bool applyScaling) { float3 positionRWS = GetCameraRelativePositionWS(positionWS); return SampleBakedGI(positionRWS, normalWS, uvStaticLightmap, uvDynamicLightmap); }

Dawie3565 commented 7 months ago

>=2021.3.17 && <=2022.2.3 float3 shadergraph_HDBakedGI(float3 positionWS, float3 normalWS, float2 uvStaticLightmap, float2 uvDynamicLightmap, bool applyScaling) {

if defined(__BUILTINGIUTILITIES_HLSL__)

float3 positionRWS = GetCameraRelativePositionWS(positionWS);
return SampleBakedGI(positionRWS, normalWS, uvStaticLightmap, uvDynamicLightmap);

else

return 0;

endif

}

Dawie3565 commented 7 months ago

>=2022.2.4 && <=2022.3.4 float3 shadergraph_HDBakedGI(float3 positionWS, float3 normalWS, float2 uvStaticLightmap, float2 uvDynamicLightmap, bool applyScaling) {

if defined(__BUILTINGIUTILITIES_HLSL__)

float3 positionRWS = GetCameraRelativePositionWS(positionWS);
bool needToIncludeAPV = true;
return SampleBakedGI(positionRWS, normalWS, uvStaticLightmap, uvDynamicLightmap, needToIncludeAPV);

else

return 0;

endif

}

Dawie3565 commented 7 months ago

>=2022.3.5 && <2023.3.0 float3 shadergraph_HDBakedGI(float3 positionWS, float3 normalWS, float2 uvStaticLightmap, float2 uvDynamicLightmap, bool applyScaling) {

if defined(__BUILTINGIUTILITIES_HLSL__)

bool needToIncludeAPV = true;
return SampleBakedGI(positionWS, normalWS, uvStaticLightmap, uvDynamicLightmap, needToIncludeAPV);

else

return 0;

endif

}

Dawie3565 commented 7 months ago

>=2023.3.0

float3 shadergraph_HDBakedGI(float3 positionRWS, float3 normalWS, uint2 positionSS, float2 uvStaticLightmap, float2 uvDynamicLightmap, bool applyScaling) {

if defined(__BUILTINGIUTILITIES_HLSL__)

bool needToIncludeAPV = true;
return SampleBakedGI(positionRWS, normalWS, positionSS, uvStaticLightmap, uvDynamicLightmap, needToIncludeAPV);

else

return 0;

endif

}

Dawie3565 commented 7 months ago

Verified fixed in ase v1.9.3.4 ready for closing