This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Be sure to to set the WrapS and WrapT properties of your texture to .repeat | |
| float4 worldPos = scn_frame.inverseViewTransform * float4(_surface.position, 1.0); | |
| float4 worldNormal = scn_frame.inverseViewTransform * float4(_surface.normal, 0.0); | |
| float3 blending = abs(worldNormal).xyz; | |
| blending = normalize(max(blending, 0.00001)); // Force weights to sum to 1.0 | |
| float b = (blending.x + blending.y + blending.z); | |
| blending /= float3(b, b, b); | |
| float scale = 2.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ARSession+GeoTracking.swift | |
| // ARExperienceKit | |
| // | |
| // Created by Arthur Schiller on 22.04.20. | |
| // | |
| import ARKit | |
| import CoreLocation |
NewerOlder