AmplifyCreations / AmplifyShaderEditor-Feedback

4 stars 0 forks source link

Depth Fade Node URP #271

Closed Dawie3565 closed 7 months ago

Dawie3565 commented 8 months ago

Depth fade node returns error in Unity 2022.3.21

Error: redefinition of '_CameraDepthTexture_TexelSize'

Note in ASE depth fade node adds "#define REQUIRE_DEPTH_TEXTURE 1"

in Unity we trace this thru include ShaderGraphFunctions.hlsl

if defined(REQUIRE_DEPTH_TEXTURE)

include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl"

endif

Change Unity 2022.3.21 has change in DeclareDepthTexture.hlsl resulting in redefinition error. float4 _CameraDepthTexture_TexelSize;

image

Dawie3565 commented 8 months ago

include also: --- Depth Fade Node --- Screen Depth Node

Eniotnacram commented 8 months ago

Is it easy to fix? So i can temporary fix it on my end?

Loran007 commented 8 months ago

Is it easy to fix? So i can temporary fix it on my end?

I temporarily removed all definitions of _CameraDepthTexture_TexelSize. image

Dawie3565 commented 8 months ago

for internal info

unity committed on Mar 9, 2023 https://github.com/Unity-Technologies/Graphics/commit/98bd020f9c427721d7f20b260ca61f00b0789e98#diff-28fe67d85b81c34ed33761748c689d578224e5b7f9812eb115424f5f2a39870c

from brief review the change was made to support DynamicScalingClamping.hlsl

image

Eniotnacram commented 8 months ago

I think i will wait for the fix aha, is it coming soon?

Thank you :)

kyleli commented 8 months ago

Is it easy to fix? So i can temporary fix it on my end?

I temporarily removed all definitions of _CameraDepthTexture_TexelSize. image

Doing the same on my end for now. Would love to see an update.

diogovtx commented 7 months ago

Fixed in 1.9.3.3

KrisDevelopment commented 7 months ago

I am not seeing 1.9.3.3 in the package manager yet. Assume it's still going through Asset Store approval procedures?

Dawie3565 commented 7 months ago

@KrisDevelopment yes, it may pop in into the asset store in morning as it had to go thru testing along with many other updates.
they had one more merge to push today that just finished also

Dawie3565 commented 7 months ago

for info only looks like unity will be fixing this so it does not happen again in future versions 2023.3 based on this we will need to keep a good look out for this issue to happen again in other unity versions not released yet

see https://github.com/Unity-Technologies/Graphics/pull/8051/commits/285f32445d96c67cf55ee9bb83856a5f9d5db2ab

Dawie3565 commented 7 months ago

for info only unity PR UUM-66727 has reverted the change back in 2023.3.23 ASE v1.9.3.3 is fixed for all changes now and due for asset store release on or around 04/06/2024