I join the previous post. I have the same problem. Transparency stopped working in the latest iOS 16.4.1. And I checked on the old version of IOS 15.7.3 everything works fine.
Post
Replies
Boosts
Views
Activity
Seems like this code might be the solution.
Can anyone explain what this code does?
sampler linearSampler = sampler(
filter::linear,
mip_filter::linear,
max_anisotropy(8)
);
float center = u_displacementTexture.sample(linearSampler, _surface.diffuseTexcoord).r;
float x_up = u_displacementTexture.sample(linearSampler, _surface.diffuseTexcoord, int2(1, 0)).r;
float x_down = u_displacementTexture.sample(linearSampler, _surface.diffuseTexcoord, int2(-1, 0)).r;
float y_up = u_displacementTexture.sample(linearSampler, _surface.diffuseTexcoord, int2(0, 1)).r;
float y_down = u_displacementTexture.sample(linearSampler, _surface.diffuseTexcoord, int2(0, -1)).r;
float threshold = 0.01 / scn_commonprofile.displacementIntensity;
if (abs(x_up - center) > threshold || abs(x_down - center) > threshold || abs(y_up - center) > threshold || abs(y_down - center) > threshold) {
discard_fragment();
}
I think distortions appear (meaning scaled triangles) like in the image below