Post

Replies

Boosts

Views

Activity

Reply to ARKit + SceneKit. Scaled triangles appear after applying depth video with alpha channel on SCNPlane
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(); }
Topic: Graphics & Games SubTopic: Metal Tags:
Mar ’23
Reply to WebGL issues after iOS 16.4 update.
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.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to ARKit + SceneKit. Scaled triangles appear after applying depth video with alpha channel on SCNPlane
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(); }
Topic: Graphics & Games SubTopic: Metal Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to ARKit + SceneKit. Scaled triangles appear after applying depth video with alpha channel on SCNPlane
I think distortions appear (meaning scaled triangles) like in the image below
Topic: Graphics & Games SubTopic: Metal Tags:
Replies
Boosts
Views
Activity
Feb ’23