text:
load glb file by filament1.12.4  crash

Device: OPPO/CPH1909/CPH1909:8.1.0  Android:8.1.0
This is logcat error:
2021-09-18 14:41:26.484 24595-25025/com.badambiz.pk A/libc: Fatal signal 11 (SIGSEGV), code 0, fault addr 0x283b00006013 in tid 25025 (FEngine::loop), pid 24595 (adambiz.pk.arab)
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG: Build fingerprint: 'OPPO/CPH1909/CPH1909:8.1.0/O11019/1563001939:user/release-keys'
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG: Revision: '0'
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG: ABI: 'arm64'
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG: pid: 24595, tid: 25025, name: FEngine::loop  >>> com.badambiz.pk <<<
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG: signal 11 (SIGSEGV), code 0 (SI_USER), fault addr --------
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG:     x0   0000006fcddee610  x1   0000006fca70ae40  x2   0000006fc9eb6e90  x3   0000000000000000
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG:     x4   0000000000000000  x5   0000000000000001  x6   0000006fca70ab18  x7   0000000000000000
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG:     x8   0000006fcdfcec00  x9   0000000007ffffff  x10  00000000ffffffff  x11  0000006fedf5dffc
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG:     x12  0000000000000001  x13  0000000000000001  x14  3fffffffffffffff  x15  0000100000000000
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG:     x16  0000000000000001  x17  00000070807b8570  x18  000000000000000b  x19  0000006fcdfe1610
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG:     x20  0000006fd4db2e10  x21  0000006fcdf5e000  x22  00000000ffffffff  x23  0000006fd4db2e14
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG:     x24  0000006fcddee610  x25  0000000000000000  x26  0000000000000000  x27  0000000000000000
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG:     x28  0000000000000001  x29  0000006fca70b0a0  x30  0000006fef3bf318
2021-09-18 14:41:26.677 25069-25069/? A/DEBUG:     sp   0000006fca70abc0  pc   0000006fef3bf48c  pstate 0000000080000000
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG: backtrace:
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #00 pc 000000000009548c  /vendor/lib64/libusc.so
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #01 pc 00000000000a7c04  /vendor/lib64/libusc.so
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #02 pc 000000000009cf04  /vendor/lib64/libusc.so
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #03 pc 000000000009b560  /vendor/lib64/libusc.so
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #04 pc 000000000000bcac  /vendor/lib64/libusc.so (PVRUniFlexCompileToHw+4012)
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #05 pc 00000000000a0164  /vendor/lib64/libglslcompiler.so
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #06 pc 00000000000b8158  /vendor/lib64/libglslcompiler.so (GLSLCompileToUniflex+2356)
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #07 pc 000000000005b2f0  /vendor/lib64/egl/libGLESv2_mtk.so
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #08 pc 000000000005b030  /vendor/lib64/egl/libGLESv2_mtk.so
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #09 pc 000000000006eedc  /vendor/lib64/egl/libGLESv2_mtk.so (glCompileShader+128)
2021-09-18 14:41:26.688 25069-25069/? A/DEBUG:     #10 pc 000000000011abd8  /data/app/com.badambiz.pk-dRUa-8fecirKhz5GgZw9Iw==/lib/arm64/libfilament-jni.so
2021-09-18 14:41:39.729 25069-25069/? E/crash_dump64: failed to notify tombstoned of completion
2021-09-18 14:41:39.757 1119-2935/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
After execute this line " scene.addEntities(list.toIntArray())", then "renderer.beginFrame(swapChain!!, frameTimeNanos)" return false, and then app crash after a while.
What cause the crash?

May be some error occur after "resourceLoader.asyncUpdateLoad()" or "scene.addEntities(list.toIntArray()", this crash
occur probabilistically.

2021-09-18 18:11:05.366 26194-26194/com.badambiz.pk.arab I/Filament: FEngine (64 bits) created at 0x6fdba00000 (threading is enabled)
2021-09-18 18:11:05.368 26194-26343/com.badambiz.pk.arab D/Filament: FEngine resolved backend: OpenGL
2021-09-18 18:11:05.369 26194-26194/com.badambiz.pk.arab W/FEngine::loop: type=1400 audit(0.0:134698): avc: denied { search } for name="clients" dev="debugfs" ino=7185 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs_ion:s0 tclass=dir permissive=0
2021-09-18 18:11:23.609 26194-26194/com.badambiz.pk.arab W/FEngine::loop: type=1400 audit(0.0:134763): avc: denied { search } for name="clients" dev="debugfs" ino=7185 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs_ion:s0 tclass=dir permissive=0
2021-09-18 18:11:26.174 26194-26556/com.badambiz.pk.arab E/CrashReport-Native: Failed to get java thread with thread name: FEngine::loop
2021-09-18 18:11:27.101 26194-26343/com.badambiz.pk.arab A/libc: Fatal signal 11 (SIGSEGV), code 0, fault addr 0x283b00006652 in tid 26343 (FEngine::loop), pid 26194 (adambiz.pk.arab)
2021-09-18 18:11:27.281 26564-26564/? A/DEBUG: pid: 26194, tid: 26343, name: FEngine::loop  >>> com.badambiz.pk.arab <<<

I build debug aar to run in my project, and find this error:
2021-09-18 21:45:39.723 32373-32765/com.badambiz.pk.arab E/IMGSRV: :0: DoCompileShader: Failed to compile shader
2021-09-18 21:45:39.723 32373-32765/com.badambiz.pk.arab E/Filament: Compilation error in fragment shader "gltflite_lit_opaque":
"Compile failed.
WARNING: 0:4: Extension GL_GOOGLE_cpp_style_line_directive not supported
WARNING: 0:56: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:66: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:87: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:94: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:99: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 6 compilation warnings.

2021-09-18 21:45:29.700 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:30.915 32373-32373/com.badambiz.pk.arab E/ResourceType: Style contains key with bad entry: 0x0101058c
2021-09-18 21:45:30.936 32373-32373/com.badambiz.pk.arab E/ResourceType: Style contains key with bad entry: 0x0101058c
2021-09-18 21:45:31.670 32373-32373/com.badambiz.pk.arab E/AudioRoom: MESSAGE
release
2021-09-18 21:45:31.672 32373-32373/com.badambiz.pk.arab E/AudioRoom: MUSIC
release
2021-09-18 21:45:31.672 32373-32373/com.badambiz.pk.arab E/AudioRoom: ROOM
release
2021-09-18 21:45:31.672 32373-32373/com.badambiz.pk.arab E/AudioRoom: SEAT_MIC
release
2021-09-18 21:45:31.673 32373-32373/com.badambiz.pk.arab E/AudioRoom: SOCKET
release
2021-09-18 21:45:31.673 32373-32373/com.badambiz.pk.arab E/AudioRoom: USERS
release
2021-09-18 21:45:31.674 32373-32373/com.badambiz.pk.arab E/AudioRoom: TOP_UI
release
2021-09-18 21:45:31.674 32373-32373/com.badambiz.pk.arab E/AudioRoom: CONSUME
release
2021-09-18 21:45:31.675 32373-32373/com.badambiz.pk.arab E/AudioRoom: AUDIO
release
2021-09-18 21:45:31.675 32373-32373/com.badambiz.pk.arab E/AudioRoom: RESOURCES
release
2021-09-18 21:45:31.676 32373-32373/com.badambiz.pk.arab E/AudioRoom: AUDIO
join_room
2021-09-18 21:45:31.766 32373-32373/com.badambiz.pk.arab E/OcsBase.d: init color client impl
2021-09-18 21:45:31.819 32373-32373/com.badambiz.pk.arab E/CheckPermission: _bluetooth code = 3
2021-09-18 21:45:31.820 32373-32373/com.badambiz.pk.arab E/CheckPermission: _bluetooth code = 11
2021-09-18 21:45:31.836 32373-32679/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:45:31.836 32373-32679/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:45:31.837 32373-32679/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:45:31.837 32373-32679/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:45:31.843 32373-32682/com.badambiz.pk.arab E/AudioRoom: AUDIO
event:8,2
2021-09-18 21:45:31.988 32373-32682/com.badambiz.pk.arab E/AudioRoom: AUDIO
event:1,3
2021-09-18 21:45:31.996 32373-32373/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:45:31.996 32373-32373/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:45:31.996 32373-32373/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:45:31.996 32373-32373/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:45:32.043 32373-32373/com.badambiz.pk.arab E/AudioRoom: MESSAGE
join_room
2021-09-18 21:45:32.046 32373-32373/com.badambiz.pk.arab E/AudioRoom: MUSIC
join_room
2021-09-18 21:45:32.047 32373-32373/com.badambiz.pk.arab E/AudioRoom: ROOM
join_room
2021-09-18 21:45:32.048 32373-32373/com.badambiz.pk.arab E/AudioRoom: SEAT_MIC
join_room
2021-09-18 21:45:32.050 32373-32373/com.badambiz.pk.arab E/AudioRoom: SOCKET
join_room
2021-09-18 21:45:32.056 32373-32373/com.badambiz.pk.arab E/AudioRoom: USERS
join_room
2021-09-18 21:45:32.072 32373-32373/com.badambiz.pk.arab E/AudioRoom: TOP_UI
join_room
2021-09-18 21:45:32.083 32373-32373/com.badambiz.pk.arab E/AudioRoom: CONSUME
join_room
2021-09-18 21:45:32.084 32373-32373/com.badambiz.pk.arab E/AudioRoom: RESOURCES
join_room
2021-09-18 21:45:32.119 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:32.381 32373-32682/com.badambiz.pk.arab E/AudioRoom: AUDIO
event:3,-2147483648
2021-09-18 21:45:32.386 32373-32682/com.badambiz.pk.arab E/AudioRoom: AUDIO
event:6,441
2021-09-18 21:45:32.400 429-29335/? E/se.dirac.effect: first processing
2021-09-18 21:45:32.413 32373-32682/com.badambiz.pk.arab E/AudioRoom: AUDIO
event:7,494
2021-09-18 21:45:32.427 429-29334/? E/AudioALSAPlaybackHandlerBase: -getHardwareBufferInfo(), pcm_get_htimestamp fail, ret = -1, pcm_get_error =
2021-09-18 21:45:32.928 32373-32373/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:45:32.929 32373-32373/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:45:32.929 32373-32373/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:45:32.929 32373-32373/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:45:33.061 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:33.111 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:35.535 32373-32373/com.badambiz.pk.arab E/ResourceType: Style contains key with bad entry: 0x0101058c
2021-09-18 21:45:35.537 32373-32373/com.badambiz.pk.arab E/ResourceType: Style contains key with bad entry: 0x0101058c
2021-09-18 21:45:35.553 32373-32373/com.badambiz.pk.arab E/ResourceType: Style contains key with bad entry: 0x0101058c
2021-09-18 21:45:36.035 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:45:36.036 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:45:36.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:45:36.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:45:36.823 32373-32373/com.badambiz.pk.arab E/ResourceType: Style contains key with bad entry: 0x0101058c
2021-09-18 21:45:36.893 1119-2589/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:38.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:45:38.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:45:38.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:45:38.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:45:39.723 32373-32765/com.badambiz.pk.arab E/IMGSRV: :0: DoCompileShader: Failed to compile shader
2021-09-18 21:45:39.723 32373-32765/com.badambiz.pk.arab E/Filament: Compilation error in fragment shader "gltflite_lit_opaque":
"Compile failed.
WARNING: 0:4: Extension GL_GOOGLE_cpp_style_line_directive not supported
WARNING: 0:56: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:66: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:87: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:94: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:99: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 6 compilation warnings.
"

2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 1:   #version 300 es
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 2:
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 3:   #define TARGET_MOBILE
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 4:   #extension GL_GOOGLE_cpp_style_line_directive : enable
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 5:
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 6:   #define TARGET_GLES_ENVIRONMENT
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 7:
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 8:   #define FILAMENT_OPENGL_SEMANTICS
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 9:
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 10:   precision mediump float;
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 11:   precision mediump int;
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 12:   precision lowp sampler2DArray;
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 13:   precision lowp sampler3D;
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 14:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 15:   #line 0
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 16:   #endif
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 17:   #if defined(FILAMENT_VULKAN_SEMANTICS)
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 18:   #define LAYOUT_LOCATION(x) layout(location = x)
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 19:   #else
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 20:   #define LAYOUT_LOCATION(x)
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 21:   #endif
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 22:
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 23:   #define bool2    bvec2
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 24:   #define bool3    bvec3
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 25:   #define bool4    bvec4
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 26:
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 27:   #define int2     ivec2
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 28:   #define int3     ivec3
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 29:   #define int4     ivec4
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 30:
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 31:   #define uint2    uvec2
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 32:   #define uint3    uvec3
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 33:   #define uint4    uvec4
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 34:
2021-09-18 21:45:39.724 32373-32765/com.badambiz.pk.arab E/Filament: 35:   #define float2   vec2
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 36:   #define float3   vec3
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 37:   #define float4   vec4
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 38:
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 39:   #define float3x3 mat3
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 40:   #define float4x4 mat4
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 41:
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 42:   #define FILAMENT_QUALITY_LOW    0
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 43:   #define FILAMENT_QUALITY_NORMAL 1
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 44:   #define FILAMENT_QUALITY_HIGH   2
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 45:   #define FILAMENT_QUALITY FILAMENT_QUALITY_LOW
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 46:   #define GEOMETRIC_SPECULAR_AA
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 47:   #define CLEAR_COAT_IOR_CHANGE
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 48:   #define MAX_SHADOW_CASTING_SPOTS 6
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 49:   #define SPECULAR_AMBIENT_OCCLUSION 1
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 50:   #define MULTI_BOUNCE_AMBIENT_OCCLUSION 0
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 51:   #define MATERIAL_HAS_DOUBLE_SIDED_CAPABILITY
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 52:   #define BLEND_MODE_OPAQUE
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 53:   #define POST_LIGHTING_BLEND_MODE_TRANSPARENT
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 54:   #define SHADING_MODEL_LIT
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 55:   #define MATERIAL_HAS_BASE_COLOR
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 56:   #define MATERIAL_HAS_ROUGHNESS
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 57:   #define MATERIAL_HAS_METALLIC
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 58:   #define MATERIAL_HAS_REFLECTANCE
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 59:   #define MATERIAL_HAS_AMBIENT_OCCLUSION
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 60:   #define MATERIAL_HAS_EMISSIVE
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 61:   #define MATERIAL_HAS_NORMAL
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 62:   #define MATERIAL_NEEDS_TBN
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 63:   #define SHADING_INTERPOLATION
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 64:   #define HAS_ATTRIBUTE_TANGENTS
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 65:   #define HAS_ATTRIBUTE_COLOR
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 66:   #define HAS_ATTRIBUTE_UV0
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 67:   #define HAS_ATTRIBUTE_UV1
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 68:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 69:   #line 0
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 70:   #endif
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 71:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 72:   // Attributes and uniforms
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 73:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 74:
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 75:   LAYOUT_LOCATION(4) in highp vec3 vertex_worldPosition;
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 76:
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 77:   #if defined(HAS_ATTRIBUTE_TANGENTS)
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 78:   LAYOUT_LOCATION(5) SHADING_INTERPOLATION in mediump vec3 vertex_worldNormal;
2021-09-18 21:45:39.725 32373-32765/com.badambiz.pk.arab E/Filament: 79:   #if defined(MATERIAL_NEEDS_TBN)
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 80:   LAYOUT_LOCATION(6) SHADING_INTERPOLATION in mediump vec4 vertex_worldTangent;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 81:   #endif
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 82:   #endif
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 83:
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 84:   LAYOUT_LOCATION(7) in highp vec4 vertex_position;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 85:
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 86:   #if defined(HAS_ATTRIBUTE_COLOR)
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 87:   LAYOUT_LOCATION(9) in mediump vec4 vertex_color;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 88:   #endif
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 89:
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 90:   #if defined(HAS_ATTRIBUTE_UV0) && !defined(HAS_ATTRIBUTE_UV1)
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 91:   LAYOUT_LOCATION(10) in highp vec2 vertex_uv01;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 92:   #elif defined(HAS_ATTRIBUTE_UV1)
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 93:   LAYOUT_LOCATION(10) in highp vec4 vertex_uv01;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 94:   #endif
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 95:
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 96:   #if defined(HAS_SHADOWING) && defined(HAS_DIRECTIONAL_LIGHTING)
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 97:   LAYOUT_LOCATION(11) in highp vec4 vertex_lightSpacePosition;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 98:   #endif
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 99:
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 100:   // Note that fragColor is an output and is not declared here; see main.fs and depth_main.fs
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 101:
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 102:   layout(std140) uniform FrameUniforms {
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 103:       highp mat4 viewFromWorldMatrix;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 104:       highp mat4 worldFromViewMatrix;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 105:       highp mat4 clipFromViewMatrix;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 106:       highp mat4 viewFromClipMatrix;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 107:       highp mat4 clipFromWorldMatrix;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 108:       highp mat4 worldFromClipMatrix;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 109:       highp mat4 lightFromWorldMatrix[4];
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 110:       highp vec4 cascadeSplits;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 111:       highp vec4 resolution;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 112:       highp vec3 cameraPosition;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 113:       highp float time;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 114:       vec4 lightColorIntensity;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 115:       vec4 sun;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 116:       vec4 padding0;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 117:       vec3 lightDirection;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 118:       uint fParamsX;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 119:       vec3 shadowBias;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 120:       float oneOverFroxelDimensionY;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 121:       vec4 zParams;
2021-09-18 21:45:39.726 32373-32765/com.badambiz.pk.arab E/Filament: 122:       uvec2 fParams;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 123:       vec2 origin;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 124:       float oneOverFroxelDimension;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 125:       float iblLuminance;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 126:       highp float exposure;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 127:       float ev100;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 128:       vec3 iblSH[9];
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 129:       vec4 userTime;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 130:       float iblRoughnessOneLevel;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 131:       float cameraFar;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 132:       float refractionLodOffset;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 133:       uint directionalShadows;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 134:       vec3 worldOffset;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 135:       float ssContactShadowDistance;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 136:       float fogStart;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 137:       float fogMaxOpacity;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 138:       float fogHeight;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 139:       float fogHeightFalloff;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 140:       vec3 fogColor;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 141:       float fogDensity;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 142:       float fogInscatteringStart;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 143:       float fogInscatteringSize;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 144:       float fogColorFromIbl;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 145:       uint cascades;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 146:       float aoSamplingQualityAndEdgeDistance;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 147:       float aoReserved1;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 148:       float aoReserved2;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 149:       float aoReserved3;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 150:       vec2 clipControl;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 151:       vec2 padding1;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 152:       float vsmExponent;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 153:       float vsmDepthScale;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 154:       float vsmLightBleedReduction;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 155:       float vsmReserved0;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 156:       vec4 padding2[59];
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 157:   } frameUniforms;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 158:
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 159:   layout(std140) uniform ObjectUniforms {
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 160:       highp mat4 worldFromModelMatrix;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 161:       highp mat3 worldFromModelNormalMatrix;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 162:       highp vec4 morphWeights;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 163:       int skinningEnabled;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 164:       int morphingEnabled;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 165:       uint screenSpaceContactShadows;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 166:       float userData;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 167:   } objectUniforms;
2021-09-18 21:45:39.727 32373-32765/com.badambiz.pk.arab E/Filament: 168:
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 169:   layout(std140) uniform LightsUniforms {
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 170:       highp mat4 lights[256];
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 171:   } lightsUniforms;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 172:
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 173:   layout(std140) uniform FroxelRecordUniforms {
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 174:       highp uvec4 records[1024];
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 175:   } froxelRecordUniforms;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 176:
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 177:   layout(std140) uniform MaterialParams {
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 178:       int baseColorIndex;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 179:       vec4 baseColorFactor;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 180:       int metallicRoughnessIndex;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 181:       float metallicFactor;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 182:       float roughnessFactor;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 183:       int normalIndex;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 184:       float normalScale;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 185:       int aoIndex;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 186:       float aoStrength;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 187:       int emissiveIndex;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 188:       vec3 emissiveFactor;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 189:       float reflectance;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 190:       float _specularAntiAliasingVariance;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 191:       float _specularAntiAliasingThreshold;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 192:       bool _doubleSided;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 193:   } materialParams;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 194:
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 195:   uniform mediump sampler2DArrayShadow light_shadowMap;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 196:   uniform mediump usampler2D light_froxels;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 197:   uniform mediump sampler2D light_iblDFG;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 198:   uniform mediump samplerCube light_iblSpecular;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 199:   uniform mediump sampler2D light_ssao;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 200:   uniform mediump sampler2D light_ssr;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 201:   uniform mediump sampler2D light_structure;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 202:
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 203:   uniform  sampler2D materialParams_baseColorMap;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 204:   uniform  sampler2D materialParams_metallicRoughnessMap;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 205:   uniform  sampler2D materialParams_normalMap;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 206:   uniform  sampler2D materialParams_occlusionMap;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 207:   uniform  sampler2D materialParams_emissiveMap;
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 208:
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 209:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.728 32373-32765/com.badambiz.pk.arab E/Filament: 210:   #line 0
2021-09-18 21:45:39.729 32373-32765/com.badambiz.pk.arab E/Filament: 211:   #endif
2021-09-18 21:45:39.729 32373-32765/com.badambiz.pk.arab E/Filament: 212:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 213:   // Common math
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 214:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 215:
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 216:   /** @public-api /
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 217:   #define PI                 3.14159265359
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 218:   /* @public-api /
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 219:   #define HALF_PI            1.570796327
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 220:
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 221:   #define MEDIUMP_FLT_MAX    65504.0
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 222:   #define MEDIUMP_FLT_MIN    0.00006103515625
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 223:
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 224:   #ifdef TARGET_MOBILE
2021-09-18 21:45:39.730 32373-32765/com.badambiz.pk.arab E/Filament: 225:   #define FLT_EPS            MEDIUMP_FLT_MIN
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 226:   #define saturateMediump(x) min(x, MEDIUMP_FLT_MAX)
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 227:   #else
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 228:   #define FLT_EPS            1e-5
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 229:   #define saturateMediump(x) x
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 230:   #endif
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 231:
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 232:   #define saturate(x)        clamp(x, 0.0, 1.0)
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 233:   #define atan2(x, y)        atan(y, x)
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 234:
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 235:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 236:   // Scalar operations
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 237:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 238:
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 239:   /*
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 240:    * Computes x^5 using only multiply operations.
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 241:    *
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 242:    * @public-api
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 243:    /
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 244:   float pow5(float x) {
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 245:       float x2 = x * x;
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 246:       return x2 * x2 * x;
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 247:   }
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 248:
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 249:   /*
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 250:    * Computes x^2 as a single multiplication.
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 251:    *
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 252:    * @public-api
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 253:    /
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 254:   float sq(float x) {
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 255:       return x * x;
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 256:   }
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 257:
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 258:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 259:   // Vector operations
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 260:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 261:
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 262:   /*
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 263:    * Returns the maximum component of the specified vector.
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 264:    *
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 265:    * @public-api
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 266:    /
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 267:   float max3(const vec3 v) {
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 268:       return max(v.x, max(v.y, v.z));
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 269:   }
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 270:
2021-09-18 21:45:39.731 32373-32765/com.badambiz.pk.arab E/Filament: 271:   /*
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 272:    * Returns the minimum component of the specified vector.
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 273:    *
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 274:    * @public-api
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 275:    /
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 276:   float min3(const vec3 v) {
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 277:       return min(v.x, min(v.y, v.z));
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 278:   }
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 279:
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 280:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 281:   // Trigonometry
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 282:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 283:
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 284:   /*
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 285:    * Approximates acos(x) with a max absolute error of 9.0x10^-3.
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 286:    * Valid in the range -1..1.
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 287:    /
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 288:   float acosFast(float x) {
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 289:       // Lagarde 2014, "Inverse trigonometric functions GPU optimization for AMD GCN architecture"
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 290:       // This is the approximation of degree 1, with a max absolute error of 9.0x10^-3
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 291:       float y = abs(x);
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 292:       float p = -0.1565827 * y + 1.570796;
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 293:       p = sqrt(1.0 - y);
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 294:       return x >= 0.0 ? p : PI - p;
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 295:   }
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 296:
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 297:   /
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 298:    * Approximates acos(x) with a max absolute error of 9.0x10^-3.
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 299:    * Valid only in the range 0..1.
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 300:    /
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 301:   float acosFastPositive(float x) {
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 302:       float p = -0.1565827 * x + 1.570796;
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 303:       return p * sqrt(1.0 - x);
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 304:   }
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 305:
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 306:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 307:   // Matrix and quaternion operations
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 308:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 309:
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 310:   /*
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 311:    * Multiplies the specified 3-component vector by the 4x4 matrix (m * v) in
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 312:    * high precision.
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 313:    *
2021-09-18 21:45:39.732 32373-32765/com.badambiz.pk.arab E/Filament: 314:    * @public-api
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 315:    /
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 316:   vec4 mulMat4x4Float3(const highp mat4 m, const highp vec3 v) {
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 317:       return v.x * m[0] + (v.y * m[1] + (v.z * m[2] + m[3]));
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 318:   }
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 319:
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 320:   /*
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 321:    * Multiplies the specified 3-component vector by the 3x3 matrix (m * v) in
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 322:    * high precision.
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 323:    *
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 324:    * @public-api
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 325:    /
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 326:   vec3 mulMat3x3Float3(const highp mat4 m, const highp vec3 v) {
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 327:       return v.x * m[0].xyz + (v.y * m[1].xyz + (v.z * m[2].xyz));
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 328:   }
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 329:
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 330:   /*
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 331:    * Extracts the normal vector of the tangent frame encoded in the specified quaternion.
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 332:    /
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 333:   void toTangentFrame(const highp vec4 q, out highp vec3 n) {
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 334:       n = vec3( 0.0,  0.0,  1.0) +
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 335:           vec3( 2.0, -2.0, -2.0) * q.x * q.zwx +
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 336:           vec3( 2.0,  2.0, -2.0) * q.y * q.wzy;
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 337:   }
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 338:
2021-09-18 21:45:39.733 32373-32765/com.badambiz.pk.arab E/Filament: 339:   /*
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 349:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 350:   #line 0
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 351:   #endif
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 352:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 353:   // Shadowing
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 354:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 357:   /**
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 358:    * Computes the light space position of the specified world space point.
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 359:    * The returned point may contain a bias to attempt to eliminate common
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 360:    * shadowing artifacts such as "acne". To achieve this, the world space
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 361:    * normal at the point must also be passed to this function.
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 362:    /
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 363:   highp vec4 computeLightSpacePosition(const highp vec3 p, const highp vec3 n, const highp vec3 l,
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 369:       float NoL = saturate(dot(n, l));
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 370:       float sinTheta = sqrt(1.0 - NoL * NoL);
2021-09-18 21:45:39.734 32373-32765/com.badambiz.pk.arab E/Filament: 371:       highp vec3 offsetPosition = p + n * (sinTheta * b);
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 375:   }
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 376:   #endif
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 377:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 378:   #line 0
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 379:   #endif
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 380:   // These variables should be in a struct but some GPU drivers ignore the
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 381:   // precision qualifier on individual struct members
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 387:         vec3  shading_reflected;        // reflection of view about normal
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 388:         float shading_NoV;              // dot(normal, view), always strictly >= MIN_N_DOT_V
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 389:
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 390:   #if defined(MATERIAL_HAS_BENT_NORMAL)
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 391:         vec3  shading_bentNormal;       // normalized transformed normal, in world space
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 393:
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 394:   #if defined(MATERIAL_HAS_CLEAR_COAT)
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 396:   #endif
2021-09-18 21:45:39.735 32373-32765/com.badambiz.pk.arab E/Filament: 397:
2021-09-18 21:45:39.736 32373-32765/com.badambiz.pk.arab E/Filament: 405:
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 415:
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 417:    * Computes the pre-exposed intensity using the specified intensity and exposure.
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 418:    * This function exists to force highp precision on the two parameters
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 419:    /
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 420:   float computePreExposedIntensity(const highp float intensity, const highp float exposure) {
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 421:       return intensity * exposure;
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 424:   void unpremultiply(inout vec4 color) {
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 425:       color.rgb /= max(color.a, FLT_EPS);
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 426:   }
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 427:
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 428:   /
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 430:    *
2021-09-18 21:45:39.737 32373-32765/com.badambiz.pk.arab E/Filament: 431:    * @public-api
2021-09-18 21:45:39.738 32373-32765/com.badambiz.pk.arab E/Filament: 444:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.739 32373-32765/com.badambiz.pk.arab E/Filament: 463:       // sRGB input
2021-09-18 21:45:39.739 32373-32765/com.badambiz.pk.arab E/Filament: 470:    * linear RGB color and returns a linear RGB color. The inverse tone mapping operator
2021-09-18 21:45:39.739 32373-32765/com.badambiz.pk.arab E/Filament: 471:    * may be an approximation of the real inverse operation.
2021-09-18 21:45:39.739 32373-32765/com.badambiz.pk.arab E/Filament: 472:    *
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 473:    * @public-api
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 478:       return Inverse_Tonemap_Unreal(pow(linear, vec3(1.0 / 2.2)));
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 479:   }
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 480:
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 481:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 482:   // Common texture operations
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 483:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 486:    * Decodes the specified RGBM value to linear HDR RGB.
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 487:    /
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 488:   vec3 decodeRGBM(vec4 c) {
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 489:       c.rgb = (c.a * 16.0);
2021-09-18 21:45:39.740 32373-32765/com.badambiz.pk.arab E/Filament: 491:   }
2021-09-18 21:45:39.741 32373-32765/com.badambiz.pk.arab E/Filament: 501:
2021-09-18 21:45:39.741 32373-32765/com.badambiz.pk.arab E/Filament: 505:       } else if (v == 1u) {
2021-09-18 21:45:39.741 32373-32765/com.badambiz.pk.arab E/Filament: 506:           return vec3(0.0, 0.0, 1.0);     // blue
2021-09-18 21:45:39.741 32373-32765/com.badambiz.pk.arab E/Filament: 508:           return vec3(1.0, 1.0, 0.0);     // yellow
2021-09-18 21:45:39.741 32373-32765/com.badambiz.pk.arab E/Filament: 514:           return vec3(0.0, 1.0, 1.0);     // cyan
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 517:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 518:   #line 0
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 520:   #if defined(TARGET_MOBILE)
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 521:       // min roughness such that (MIN_PERCEPTUAL_ROUGHNESS^4) > 0 in fp16 (i.e. 2^(-14/4), rounded up)
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 522:       #define MIN_PERCEPTUAL_ROUGHNESS 0.089
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 524:   #else
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 525:       #define MIN_PERCEPTUAL_ROUGHNESS 0.045
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 530:
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 531:   float clampNoV(float NoV) {
2021-09-18 21:45:39.742 32373-32765/com.badambiz.pk.arab E/Filament: 534:   }
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 539:
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 540:   vec3 computeF0(const vec4 baseColor, float metallic, float reflectance) {
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 544:   float computeDielectricF0(float reflectance) {
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 545:       return 0.16 * reflectance * reflectance;
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 546:   }
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 547:
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 548:   float computeMetallicFromSpecularColor(const vec3 specularColor) {
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 549:       return max3(specularColor);
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 550:   }
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 551:
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 552:   float computeRoughnessFromGlossiness(float glossiness) {
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 553:       return 1.0 - glossiness;
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 554:   }
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 557:       return perceptualRoughness * perceptualRoughness;
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 558:   }
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 560:   float roughnessToPerceptualRoughness(float roughness) {
2021-09-18 21:45:39.743 32373-32765/com.badambiz.pk.arab E/Filament: 561:       return sqrt(roughness);
2021-09-18 21:45:39.744 32373-32765/com.badambiz.pk.arab E/Filament: 562:   }
2021-09-18 21:45:39.744 32373-32765/com.badambiz.pk.arab E/Filament: 563:
2021-09-18 21:45:39.744 32373-32765/com.badambiz.pk.arab E/Filament: 564:   float iorToF0(float transmittedIor, float incidentIor) {
2021-09-18 21:45:39.744 32373-32765/com.badambiz.pk.arab E/Filament: 565:       return sq((transmittedIor - incidentIor) / (transmittedIor + incidentIor));
2021-09-18 21:45:39.744 32373-32765/com.badambiz.pk.arab E/Filament: 570:       return (1.0 + r) / (1.0 - r);
2021-09-18 21:45:39.744 32373-32765/com.badambiz.pk.arab E/Filament: 572:
2021-09-18 21:45:39.744 32373-32765/com.badambiz.pk.arab E/Filament: 576:   #if FILAMENT_QUALITY == FILAMENT_QUALITY_LOW
2021-09-18 21:45:39.745 32373-32765/com.badambiz.pk.arab E/Filament: 582:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 599:   / @public-api /
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 600:   highp mat4 getClipFromViewMatrix() {
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 601:       return frameUniforms.clipFromViewMatrix;
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 602:   }
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 603:
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 604:   /* @public-api /
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 605:   highp mat4 getViewFromClipMatrix() {
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 606:       return frameUniforms.viewFromClipMatrix;
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 609:   /* @public-api /
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 610:   highp mat4 getClipFromWorldMatrix() {
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 613:
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 614:   /* @public-api /
2021-09-18 21:45:39.746 32373-32765/com.badambiz.pk.arab E/Filament: 615:   highp mat4 getWorldFromClipMatrix() {
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 618:
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 619:   /* @public-api /
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 622:   }
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 623:
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 626:       return frameUniforms.cameraPosition;
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 627:   }
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 630:   highp vec3 getWorldOffset() {
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 631:       return frameUniforms.worldOffset;
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 632:   }
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 635:   float getTime() {
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 636:       return frameUniforms.time;
2021-09-18 21:45:39.747 32373-32765/com.badambiz.pk.arab E/Filament: 640:   highp vec4 getUserTime() {
2021-09-18 21:45:39.748 32373-32765/com.badambiz.pk.arab E/Filament: 641:       return frameUniforms.userTime;
2021-09-18 21:45:39.748 32373-32765/com.badambiz.pk.arab E/Filament: 642:   }
2021-09-18 21:45:39.748 32373-32765/com.badambiz.pk.arab E/Filament: 658:       return frameUniforms.ev100;
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 659:   }
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 662:   #endif
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 663:   #if defined(HAS_ATTRIBUTE_COLOR)
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 666:       return vertex_color;
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 667:   }
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 671:   /* @public-api /
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 673:       return vertex_uv01.xy;
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 676:
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 677:   #if defined(HAS_ATTRIBUTE_UV1)
2021-09-18 21:45:39.749 32373-32765/com.badambiz.pk.arab E/Filament: 681:   }
2021-09-18 21:45:39.750 32373-32765/com.badambiz.pk.arab E/Filament: 682:   #endif
2021-09-18 21:45:39.750 32373-32765/com.badambiz.pk.arab E/Filament: 685:   /* @public-api /
2021-09-18 21:45:39.750 32373-32765/com.badambiz.pk.arab E/Filament: 686:   float getMaskThreshold() {
2021-09-18 21:45:39.751 32373-32765/com.badambiz.pk.arab E/Filament: 714:   }
2021-09-18 21:45:39.752 32373-32765/com.badambiz.pk.arab E/Filament: 719:   }
2021-09-18 21:45:39.753 32373-32765/com.badambiz.pk.arab E/Filament: 732:    * the first row of texels in glTexImage2D is interpreted as the bottom row.
2021-09-18 21:45:39.753 32373-32765/com.badambiz.pk.arab E/Filament: 733:    *
2021-09-18 21:45:39.754 32373-32765/com.badambiz.pk.arab E/Filament: 757:   #endif
2021-09-18 21:45:39.754 32373-32765/com.badambiz.pk.arab E/Filament: 764:    /
2021-09-18 21:45:39.755 32373-32765/com.badambiz.pk.arab E/Filament: 769:
2021-09-18 21:45:39.755 32373-32765/com.badambiz.pk.arab E/Filament: 775:               vertex_worldNormal, dir, bias, shadowUniforms.spotLightFromWorldMatrix[index]);
2021-09-18 21:45:39.755 32373-32765/com.badambiz.pk.arab E/Filament: 779:       // See the computeVsmLightSpaceMatrix comments in ShadowMap.cpp.
2021-09-18 21:45:39.756 32373-32765/com.badambiz.pk.arab E/Filament: 785:   #endif
2021-09-18 21:45:39.756 32373-32765/com.badambiz.pk.arab E/Filament: 788:   bool isDoubleSided() {
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 812:       }
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 818:       // For VSM, do not project the Z coordinate. It remains as linear Z in light space.
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 819:       // See the computeVsmLightSpaceMatrix comments in ShadowMap.cpp.
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 821:   #else
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 822:       return pos.xyz * (1.0 / pos.w);
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 825:
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 826:   #endif
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 827:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 828:   #line 0
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 829:   #endif
2021-09-18 21:45:39.758 32373-32765/com.badambiz.pk.arab E/Filament: 830:   // Decide if we can skip lighting when dot(n, l) <= 0.0
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 835:   #elif defined(SHADING_MODEL_SUBSURFACE) || defined(MATERIAL_HAS_CUSTOM_SURFACE_SHADING)
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 836:       // Cannot skip lighting
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 837:   #else
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 841:   struct MaterialInputs {
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 842:       vec4  baseColor;
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 845:       float roughness;
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 846:   #endif
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 847:   #if !defined(SHADING_MODEL_CLOTH) && !defined(SHADING_MODEL_SPECULAR_GLOSSINESS)
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 848:       float metallic;
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 849:       float reflectance;
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 850:   #endif
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 851:       float ambientOcclusion;
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 852:   #endif
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 853:       vec4  emissive;
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 854:
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 857:       float sheenRoughness;
2021-09-18 21:45:39.759 32373-32765/com.badambiz.pk.arab E/Filament: 858:   #endif
2021-09-18 21:45:39.760 32373-32765/com.badambiz.pk.arab E/Filament: 866:   #if defined(SHADING_MODEL_SUBSURFACE) || defined(HAS_REFRACTION)
2021-09-18 21:45:39.760 32373-32765/com.badambiz.pk.arab E/Filament: 867:       float thickness;
2021-09-18 21:45:39.760 32373-32765/com.badambiz.pk.arab E/Filament: 868:   #endif
2021-09-18 21:45:39.760 32373-32765/com.badambiz.pk.arab E/Filament: 871:       vec3  subsurfaceColor;
2021-09-18 21:45:39.760 32373-32765/com.badambiz.pk.arab E/Filament: 874:   #if defined(SHADING_MODEL_CLOTH)
2021-09-18 21:45:39.760 32373-32765/com.badambiz.pk.arab E/Filament: 876:   #if defined(MATERIAL_HAS_SUBSURFACE_COLOR)
2021-09-18 21:45:39.760 32373-32765/com.badambiz.pk.arab E/Filament: 877:       vec3  subsurfaceColor;
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 878:   #endif
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 884:   #endif
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 885:
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 886:   #if defined(MATERIAL_HAS_NORMAL)
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 889:   #if defined(MATERIAL_HAS_BENT_NORMAL)
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 890:       vec3  bentNormal;
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 892:   #if defined(MATERIAL_HAS_CLEAR_COAT) && defined(MATERIAL_HAS_CLEAR_COAT_NORMAL)
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 896:   #if defined(MATERIAL_HAS_POST_LIGHTING_COLOR)
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 897:       vec4  postLightingColor;
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 898:   #endif
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 899:
2021-09-18 21:45:39.761 32373-32765/com.badambiz.pk.arab E/Filament: 900:   #if !defined(SHADING_MODEL_CLOTH) && !defined(SHADING_MODEL_SUBSURFACE) && !defined(SHADING_MODEL_UNLIT)
2021-09-18 21:45:39.762 32373-32765/com.badambiz.pk.arab E/Filament: 903:       vec3 absorption;
2021-09-18 21:45:39.762 32373-32765/com.badambiz.pk.arab E/Filament: 904:   #endif
2021-09-18 21:45:39.762 32373-32765/com.badambiz.pk.arab E/Filament: 905:   #if defined(MATERIAL_HAS_TRANSMISSION)
2021-09-18 21:45:39.762 32373-32765/com.badambiz.pk.arab E/Filament: 906:       float transmission;
2021-09-18 21:45:39.762 32373-32765/com.badambiz.pk.arab E/Filament: 908:   #if defined(MATERIAL_HAS_IOR)
2021-09-18 21:45:39.762 32373-32765/com.badambiz.pk.arab E/Filament: 909:       float ior;
2021-09-18 21:45:39.762 32373-32765/com.badambiz.pk.arab E/Filament: 913:   #endif
2021-09-18 21:45:39.763 32373-32765/com.badambiz.pk.arab E/Filament: 938:       material.sheenColor = vec3(0.0);
2021-09-18 21:45:39.763 32373-32765/com.badambiz.pk.arab E/Filament: 939:       material.sheenRoughness = 0.0;
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 942:
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 943:   #if defined(MATERIAL_HAS_CLEAR_COAT)
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 944:       material.clearCoat = 1.0;
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 946:   #endif
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 947:
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 948:   #if defined(MATERIAL_HAS_ANISOTROPY)
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 949:       material.anisotropy = 0.0;
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 950:       material.anisotropyDirection = vec3(1.0, 0.0, 0.0);
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 953:   #if defined(SHADING_MODEL_SUBSURFACE) || defined(HAS_REFRACTION)
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 954:       material.thickness = 0.5;
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 955:   #endif
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 958:       material.subsurfaceColor = vec3(1.0);
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 959:   #endif
2021-09-18 21:45:39.764 32373-32765/com.badambiz.pk.arab E/Filament: 961:   #if defined(SHADING_MODEL_CLOTH)
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 964:       material.subsurfaceColor = vec3(0.0);
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 966:   #endif
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 967:
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 970:       material.specularColor = vec3(0.0);
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 971:   #endif
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 972:
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 975:   #endif
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 978:   #endif
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 979:   #if defined(MATERIAL_HAS_CLEAR_COAT) && defined(MATERIAL_HAS_CLEAR_COAT_NORMAL)
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 980:       material.clearCoatNormal = vec3(0.0, 0.0, 1.0);
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 982:
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 983:   #if defined(MATERIAL_HAS_POST_LIGHTING_COLOR)
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 984:       material.postLightingColor = vec4(0.0);
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 985:   #endif
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 986:
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 987:   #if !defined(SHADING_MODEL_CLOTH) && !defined(SHADING_MODEL_SUBSURFACE) && !defined(SHADING_MODEL_UNLIT)
2021-09-18 21:45:39.765 32373-32765/com.badambiz.pk.arab E/Filament: 990:       material.absorption = vec3(0.0);
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 991:   #endif
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 992:   #if defined(MATERIAL_HAS_TRANSMISSION)
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 993:       material.transmission = 1.0;
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 994:   #endif
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 996:       material.ior = 1.5;
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 997:   #endif
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 998:   #if defined(MATERIAL_HAS_MICRO_THICKNESS) && (REFRACTION_TYPE == REFRACTION_TYPE_THIN)
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 1003:       material.ior = 1.5;
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 1009:   #if defined(MATERIAL_HAS_CUSTOM_SURFACE_SHADING)
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 1010:   / @public-api /
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 1011:   struct LightData {
2021-09-18 21:45:39.766 32373-32765/com.badambiz.pk.arab E/Filament: 1012:       vec4  colorIntensity;
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1013:       vec3  l;
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1014:       float NdotL;
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1015:       vec3  worldPosition;
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1020:   /* @public-api /
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1023:       float perceptualRoughness;
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1024:       vec3  f0;
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1025:       float roughness;
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1028:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1029:   #line 0
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1030:   #endif
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1033:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1034:
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1035:   /*
2021-09-18 21:45:39.767 32373-32765/com.badambiz.pk.arab E/Filament: 1038:    */
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1039:   void computeShadingParams() {
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1040:   #if defined(HAS_ATTRIBUTE_TANGENTS)
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1041:       highp vec3 n = vertex_worldNormal;
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1042:   #if defined(MATERIAL_NEEDS_TBN)
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1044:       highp vec3 b = cross(n, t) * sign(vertex_worldTangent.w);
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1045:   #endif
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1046:
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1052:           b = gl_FrontFacing ? b : -b;
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1053:   #endif
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1055:   #endif
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1056:
2021-09-18 21:45:39.768 32373-32765/com.badambiz.pk.arab E/Filament: 1057:       shading_geometricNormal = normalize(n);
2021-09-18 21:45:39.769 32373-32765/com.badambiz.pk.arab E/Filament: 1064:
2021-09-18 21:45:39.769 32373-32765/com.badambiz.pk.arab E/Filament: 1069:       //    p = clipFromWorldMatrix * shading_position;
2021-09-18 21:45:39.769 32373-32765/com.badambiz.pk.arab E/Filament: 1070:       //    shading_normalizedViewportCoord = p.xy * 0.5 / p.w + 0.5
2021-09-18 21:45:39.769 32373-32765/com.badambiz.pk.arab E/Filament: 1073:
2021-09-18 21:45:39.769 32373-32765/com.badambiz.pk.arab E/Filament: 1077:    * applying the normal map). These parameters can be useful to material authors
2021-09-18 21:45:39.769 32373-32765/com.badambiz.pk.arab E/Filament: 1078:    * to compute other material properties.
2021-09-18 21:45:39.769 32373-32765/com.badambiz.pk.arab E/Filament: 1079:    *
2021-09-18 21:45:39.769 32373-32765/com.badambiz.pk.arab E/Filament: 1080:    * This function must be invoked by the user's material code (guaranteed by
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1081:    * the material compiler) after setting a value for MaterialInputs.normal.
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1082:    */
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1083:   void prepareMaterial(const MaterialInputs material) {
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1084:   #if defined(HAS_ATTRIBUTE_TANGENTS)
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1087:   #else
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1088:       shading_normal = getWorldGeometricNormalVector();
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1090:       shading_NoV = clampNoV(dot(shading_normal, shading_view));
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1091:       shading_reflected = reflect(-shading_view, shading_normal);
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1092:
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1093:   #if defined(MATERIAL_HAS_BENT_NORMAL)
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1094:       shading_bentNormal = normalize(shading_tangentToWorld * material.bentNormal);
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1095:   #endif
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1096:
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1102:   #endif
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1103:   #endif
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1104:   #endif
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1105:   }
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1106:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1107:   #line 0
2021-09-18 21:45:39.770 32373-32765/com.badambiz.pk.arab E/Filament: 1108:   #endif
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1112:
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1113:   vec4 fog(vec4 color, vec3 view) {
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1114:       if (frameUniforms.fogDensity > 0.0) {
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1115:           float A = frameUniforms.fogDensity;
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1116:           float B = frameUniforms.fogHeightFalloff;
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1117:
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1120:           float h = max(0.001, view.y);
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1121:           // The function below is continuous at h=0, so to avoid a divide-by-zero, we just clamp h
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1122:           float fogIntegralFunctionOfDistance = A * ((1.0 - exp(-B * h)) / h);
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1123:           float fogIntegral = fogIntegralFunctionOfDistance * max(d - frameUniforms.fogStart, 0.0);
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1124:           float fogOpacity = max(1.0 - exp2(-fogIntegral), 0.0);
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1127:           fogOpacity = min(fogOpacity, frameUniforms.fogMaxOpacity);
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1128:
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1131:
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1132:           if (frameUniforms.fogColorFromIbl > 0.0) {
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1133:               // get fog color from envmap
2021-09-18 21:45:39.771 32373-32765/com.badambiz.pk.arab E/Filament: 1134:               float lod = frameUniforms.iblRoughnessOneLevel;
2021-09-18 21:45:39.772 32373-32765/com.badambiz.pk.arab E/Filament: 1148:               float sunInscattering = pow(sunAmount, frameUniforms.fogInscatteringSize);
2021-09-18 21:45:39.772 32373-32765/com.badambiz.pk.arab E/Filament: 1149:
2021-09-18 21:45:39.772 32373-32765/com.badambiz.pk.arab E/Filament: 1150:               fogColor += sunColor * (sunInscattering * inscatteringOpacity);
2021-09-18 21:45:39.772 32373-32765/com.badambiz.pk.arab E/Filament: 1151:           }
2021-09-18 21:45:39.772 32373-32765/com.badambiz.pk.arab E/Filament: 1152:
2021-09-18 21:45:39.772 32373-32765/com.badambiz.pk.arab E/Filament: 1156:           fogColor *= color.a;
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1157:   #elif defined(BLEND_MODE_ADD)
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1158:           fogColor = vec3(0.0);
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1161:   #elif defined(BLEND_MODE_MULTIPLY)
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1162:           // FIXME: unclear what to do here
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1163:   #elif defined(BLEND_MODE_SCREEN)
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1164:           // FIXME: unclear what to do here
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1166:
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1167:           color.rgb = color.rgb * (1.0 - fogOpacity) + fogColor;
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1169:       return color;
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1170:   }
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1172:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1174:   #endif
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1175:
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1177:           float2 uvs[2];
2021-09-18 21:45:39.773 32373-32765/com.badambiz.pk.arab E/Filament: 1178:           uvs[0] = getUV0();
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1182:               if (materialParams.normalIndex > -1) {
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1183:                   float2 uv = uvs[materialParams.normalIndex];
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1184:                   material.normal = texture(materialParams_normalMap, uv).xyz * 2.0 - 1.0;
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1185:                   material.normal.xy = materialParams.normalScale;
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1186:               }
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1189:           prepareMaterial(material);
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1190:           material.baseColor = materialParams.baseColorFactor;
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1191:
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1192:           if (materialParams.baseColorIndex > -1) {
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1195:           }
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1196:
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1197:           #if defined(BLEND_MODE_TRANSPARENT)
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1198:               material.baseColor.rgb = material.baseColor.a;
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1199:           #endif
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1200:
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1203:           #if !defined(SHADING_MODEL_UNLIT)
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1204:               #if defined(SHADING_MODEL_LIT)
2021-09-18 21:45:39.774 32373-32765/com.badambiz.pk.arab E/Filament: 1205:                   material.roughness = materialParams.roughnessFactor;
2021-09-18 21:45:39.775 32373-32765/com.badambiz.pk.arab E/Filament: 1207:                   material.reflectance = materialParams.reflectance;
2021-09-18 21:45:39.775 32373-32765/com.badambiz.pk.arab E/Filament: 1208:               #endif
2021-09-18 21:45:39.775 32373-32765/com.badambiz.pk.arab E/Filament: 1213:                   float2 uv = uvs[materialParams.metallicRoughnessIndex];
2021-09-18 21:45:39.775 32373-32765/com.badambiz.pk.arab E/Filament: 1222:                   material.ambientOcclusion = texture(materialParams_occlusionMap, uv).r *
2021-09-18 21:45:39.777 32373-32765/com.badambiz.pk.arab E/Filament: 1250:       float perceptualRoughnessUnclamped;
2021-09-18 21:45:39.777 32373-32765/com.badambiz.pk.arab E/Filament: 1253:       vec3  dfg;
2021-09-18 21:45:39.777 32373-32765/com.badambiz.pk.arab E/Filament: 1254:       vec3  energyCompensation;
2021-09-18 21:45:39.777 32373-32765/com.badambiz.pk.arab E/Filament: 1258:       float clearCoatPerceptualRoughness;
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1261:
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1262:   #if defined(MATERIAL_HAS_SHEEN_COLOR)
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1263:       vec3  sheenColor;
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1264:   #if !defined(SHADING_MODEL_CLOTH)
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1270:   #endif
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1271:
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1274:       vec3  anisotropicB;
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1275:       float anisotropy;
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1278:   #if defined(SHADING_MODEL_SUBSURFACE) || defined(HAS_REFRACTION)
2021-09-18 21:45:39.778 32373-32765/com.badambiz.pk.arab E/Filament: 1281:   #if defined(SHADING_MODEL_SUBSURFACE)
2021-09-18 21:45:39.780 32373-32765/com.badambiz.pk.arab E/Filament: 1307:   #endif
2021-09-18 21:45:39.780 32373-32765/com.badambiz.pk.arab E/Filament: 1311:
2021-09-18 21:45:39.780 32373-32765/com.badambiz.pk.arab E/Filament: 1312:   // Diffuse BRDFs
2021-09-18 21:45:39.780 32373-32765/com.badambiz.pk.arab E/Filament: 1315:
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1316:   // Specular BRDF
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1317:   // Normal distribution functions
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1318:   #define SPECULAR_D_GGX              0
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1319:
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1320:   // Anisotropic NDFs
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1321:   #define SPECULAR_D_GGX_ANISOTROPIC  0
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1322:
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1323:   // Cloth NDFs
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1324:   #define SPECULAR_D_CHARLIE          0
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1327:   #define SPECULAR_V_SMITH_GGX        0
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1328:   #define SPECULAR_V_SMITH_GGX_FAST   1
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1331:   #define SPECULAR_V_NEUBELT          4
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1332:
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1333:   // Fresnel functions
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1334:   #define SPECULAR_F_SCHLICK          0
2021-09-18 21:45:39.781 32373-32765/com.badambiz.pk.arab E/Filament: 1335:
2021-09-18 21:45:39.782 32373-32765/com.badambiz.pk.arab E/Filament: 1356:
2021-09-18 21:45:39.782 32373-32765/com.badambiz.pk.arab E/Filament: 1357:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.783 32373-32765/com.badambiz.pk.arab E/Filament: 1358:   // Specular BRDF implementations
2021-09-18 21:45:39.783 32373-32765/com.badambiz.pk.arab E/Filament: 1361:   float D_GGX(float roughness, float NoH, const vec3 h) {
2021-09-18 21:45:39.783 32373-32765/com.badambiz.pk.arab E/Filament: 1362:       // Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces"
2021-09-18 21:45:39.783 32373-32765/com.badambiz.pk.arab E/Filament: 1363:
2021-09-18 21:45:39.783 32373-32765/com.badambiz.pk.arab E/Filament: 1364:       // In mediump, there are two problems computing 1.0 - NoH^2
2021-09-18 21:45:39.783 32373-32765/com.badambiz.pk.arab E/Filament: 1365:       // 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights)
2021-09-18 21:45:39.783 32373-32765/com.badambiz.pk.arab E/Filament: 1370:       //      ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2
2021-09-18 21:45:39.783 32373-32765/com.badambiz.pk.arab E/Filament: 1377:       float oneMinusNoHSquared = dot(NxH, NxH);
2021-09-18 21:45:39.784 32373-32765/com.badambiz.pk.arab E/Filament: 1378:   #else
2021-09-18 21:45:39.784 32373-32765/com.badambiz.pk.arab E/Filament: 1380:   #endif
2021-09-18 21:45:39.784 32373-32765/com.badambiz.pk.arab E/Filament: 1381:
2021-09-18 21:45:39.784 32373-32765/com.badambiz.pk.arab E/Filament: 1383:       float k = roughness / (oneMinusNoHSquared + a * a);
2021-09-18 21:45:39.784 32373-32765/com.badambiz.pk.arab E/Filament: 1392:       // The dot product below computes perceptualRoughness^8. We cannot fit in fp16 without clamping
2021-09-18 21:45:39.784 32373-32765/com.badambiz.pk.arab E/Filament: 1393:       // the roughness to too high values so we perform the dot product and the division in fp32
2021-09-18 21:45:39.784 32373-32765/com.badambiz.pk.arab E/Filament: 1395:       highp vec3 d = vec3(ab * ToH, at * BoH, a2 * NoH);
2021-09-18 21:45:39.784 32373-32765/com.badambiz.pk.arab E/Filament: 1397:       float b2 = a2 / d2;
2021-09-18 21:45:39.784 32373-32765/com.badambiz.pk.arab E/Filament: 1398:       return a2 * b2 * b2 * (1.0 / PI);
2021-09-18 21:45:39.785 32373-32765/com.badambiz.pk.arab E/Filament: 1399:   }
2021-09-18 21:45:39.785 32373-32765/com.badambiz.pk.arab E/Filament: 1400:
2021-09-18 21:45:39.785 32373-32765/com.badambiz.pk.arab E/Filament: 1403:       float invAlpha  = 1.0 / roughness;
2021-09-18 21:45:39.785 32373-32765/com.badambiz.pk.arab E/Filament: 1406:       return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1418:       // clamp to the maximum value representable in mediump
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1421:
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1422:   float V_SmithGGXCorrelated_Fast(float roughness, float NoV, float NoL) {
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1424:       float v = 0.5 / mix(2.0 * NoL * NoV, NoL + NoV, roughness);
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1425:       return saturateMediump(v);
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1426:   }
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1427:
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1428:   float V_SmithGGXCorrelated_Anisotropic(float at, float ab, float ToV, float BoV,
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1431:       // TODO: lambdaV can be pre-computed for all the lights, it should be moved out of this function
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1436:   }
2021-09-18 21:45:39.786 32373-32765/com.badambiz.pk.arab E/Filament: 1439:       // Kelemen 2001, "A Microfacet Based Coupled Specular-Matte BRDF Model with Importance Sampling"
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1440:       return saturateMediump(0.25 / (LoH * LoH));
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1441:   }
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1442:
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1447:
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1448:   vec3 F_Schlick(const vec3 f0, float f90, float VoH) {
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1449:       // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering"
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1452:
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1453:   vec3 F_Schlick(const vec3 f0, float VoH) {
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1454:       float f = pow(1.0 - VoH, 5.0);
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1455:       return f + f0 * (1.0 - f);
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1456:   }
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1457:
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1458:   float F_Schlick(float f0, float f90, float VoH) {
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1459:       return f0 + (f90 - f0) * pow5(1.0 - VoH);
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1460:   }
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1461:
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1462:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1463:   // Specular BRDF dispatch
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1464:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1465:
2021-09-18 21:45:39.787 32373-32765/com.badambiz.pk.arab E/Filament: 1467:   #if BRDF_SPECULAR_D == SPECULAR_D_GGX
2021-09-18 21:45:39.788 32373-32765/com.badambiz.pk.arab E/Filament: 1468:       return D_GGX(roughness, NoH, h);
2021-09-18 21:45:39.788 32373-32765/com.badambiz.pk.arab E/Filament: 1470:   }
2021-09-18 21:45:39.788 32373-32765/com.badambiz.pk.arab E/Filament: 1481:   #if BRDF_SPECULAR_F == SPECULAR_F_SCHLICK
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1484:   #else
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1485:       float f90 = saturate(dot(f0, vec3(50.0 * 0.33)));
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1486:       return F_Schlick(f0, f90, LoH);
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1487:   #endif
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1490:
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1491:   float distributionAnisotropic(float at, float ab, float ToH, float BoH, float NoH) {
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1492:   #if BRDF_ANISOTROPIC_D == SPECULAR_D_GGX_ANISOTROPIC
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1493:       return D_GGX_Anisotropic(at, ab, ToH, BoH, NoH);
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1495:   }
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1496:
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1497:   float visibilityAnisotropic(float roughness, float at, float ab,
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1499:   #if BRDF_ANISOTROPIC_V == SPECULAR_V_SMITH_GGX
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1500:       return V_SmithGGXCorrelated(roughness, NoV, NoL);
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1501:   #elif BRDF_ANISOTROPIC_V == SPECULAR_V_GGX_ANISOTROPIC
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1503:   #endif
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1504:   }
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1505:
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1506:   float distributionClearCoat(float roughness, float NoH, const vec3 h) {
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1507:   #if BRDF_CLEAR_COAT_D == SPECULAR_D_GGX
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1508:       return D_GGX(roughness, NoH, h);
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1511:
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1512:   float visibilityClearCoat(float LoH) {
2021-09-18 21:45:39.789 32373-32765/com.badambiz.pk.arab E/Filament: 1513:   #if BRDF_CLEAR_COAT_V == SPECULAR_V_KELEMEN
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1516:   }
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1517:
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1521:   #endif
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1522:   }
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1523:
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1525:   #if BRDF_CLOTH_V == SPECULAR_V_NEUBELT
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1526:       return V_Neubelt(NoV, NoL);
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1528:   }
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1529:
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1531:   // Diffuse BRDF implementations
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1532:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1535:       return 1.0 / PI;
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1536:   }
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1537:
2021-09-18 21:45:39.790 32373-32765/com.badambiz.pk.arab E/Filament: 1538:   float Fd_Burley(float roughness, float NoV, float NoL, float LoH) {
2021-09-18 21:45:39.791 32373-32765/com.badambiz.pk.arab E/Filament: 1542:       float viewScatter  = F_Schlick(1.0, f90, NoV);
2021-09-18 21:45:39.791 32373-32765/com.badambiz.pk.arab E/Filament: 1543:       return lightScatter * viewScatter * (1.0 / PI);
2021-09-18 21:45:39.791 32373-32765/com.badambiz.pk.arab E/Filament: 1544:   }
2021-09-18 21:45:39.791 32373-32765/com.badambiz.pk.arab E/Filament: 1545:
2021-09-18 21:45:39.791 32373-32765/com.badambiz.pk.arab E/Filament: 1548:       return saturate((NoL + w) / sq(1.0 + w));
2021-09-18 21:45:39.791 32373-32765/com.badambiz.pk.arab E/Filament: 1549:   }
2021-09-18 21:45:39.791 32373-32765/com.badambiz.pk.arab E/Filament: 1555:   float diffuse(float roughness, float NoV, float NoL, float LoH) {
2021-09-18 21:45:39.791 32373-32765/com.badambiz.pk.arab E/Filament: 1556:   #if BRDF_DIFFUSE == DIFFUSE_LAMBERT
2021-09-18 21:45:39.792 32373-32765/com.badambiz.pk.arab E/Filament: 1562:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.792 32373-32765/com.badambiz.pk.arab E/Filament: 1565:   #if defined(MATERIAL_HAS_SHEEN_COLOR)
2021-09-18 21:45:39.792 32373-32765/com.badambiz.pk.arab E/Filament: 1568:       float V = visibilityCloth(NoV, NoL);
2021-09-18 21:45:39.792 32373-32765/com.badambiz.pk.arab E/Filament: 1569:
2021-09-18 21:45:39.792 32373-32765/com.badambiz.pk.arab E/Filament: 1571:   }
2021-09-18 21:45:39.792 32373-32765/com.badambiz.pk.arab E/Filament: 1573:
2021-09-18 21:45:39.792 32373-32765/com.badambiz.pk.arab E/Filament: 1575:   float clearCoatLobe(const PixelParams pixel, const vec3 h, float NoH, float LoH, out float Fcc) {
2021-09-18 21:45:39.792 32373-32765/com.badambiz.pk.arab E/Filament: 1576:   #if defined(MATERIAL_HAS_NORMAL) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL)
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1579:       float clearCoatNoH = saturate(dot(shading_clearCoatNormal, h));
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1580:   #else
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1581:       float clearCoatNoH = NoH;
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1583:
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1585:       float D = distributionClearCoat(pixel.clearCoatRoughness, clearCoatNoH, h);
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1586:       float V = visibilityClearCoat(LoH);
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1587:       float F = F_Schlick(0.04, 1.0, LoH) * pixel.clearCoat; // fix IOR to 1.5
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1588:
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1589:       Fcc = F;
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1590:       return D * V * F;
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1591:   }
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1592:   #endif
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1593:
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1594:   #if defined(MATERIAL_HAS_ANISOTROPY)
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1595:   vec3 anisotropicLobe(const PixelParams pixel, const Light light, const vec3 h,
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1596:           float NoV, float NoL, float NoH, float LoH) {
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1597:
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1598:       vec3 l = light.l;
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1599:       vec3 t = pixel.anisotropicT;
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1600:       vec3 b = pixel.anisotropicB;
2021-09-18 21:45:39.793 32373-32765/com.badambiz.pk.arab E/Filament: 1604:       float BoV = dot(b, v);
2021-09-18 21:45:39.794 32373-32765/com.badambiz.pk.arab E/Filament: 1609:
2021-09-18 21:45:39.794 32373-32765/com.badambiz.pk.arab E/Filament: 1610:       // Anisotropic parameters: at and ab are the roughness along the tangent and bitangent
2021-09-18 21:45:39.794 32373-32765/com.badambiz.pk.arab E/Filament: 1611:       // to simplify materials, we derive them from a single roughness parameter
2021-09-18 21:45:39.794 32373-32765/com.badambiz.pk.arab E/Filament: 1615:
2021-09-18 21:45:39.794 32373-32765/com.badambiz.pk.arab E/Filament: 1616:       // specular anisotropic BRDF
2021-09-18 21:45:39.794 32373-32765/com.badambiz.pk.arab E/Filament: 1617:       float D = distributionAnisotropic(at, ab, ToH, BoH, NoH);
2021-09-18 21:45:39.794 32373-32765/com.badambiz.pk.arab E/Filament: 1620:
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1631:
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1632:       return (D * V) * F;
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1633:   }
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1636:           float NoV, float NoL, float NoH, float LoH) {
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1637:   #if defined(MATERIAL_HAS_ANISOTROPY)
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1639:   #else
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1640:       return isotropicLobe(pixel, light, h, NoV, NoL, NoH, LoH);
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1641:   #endif
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1642:   }
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1643:
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1644:   vec3 diffuseLobe(const PixelParams pixel, float NoV, float NoL, float LoH) {
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1645:       return pixel.diffuseColor * diffuse(pixel.roughness, NoV, NoL, LoH);
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1646:   }
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1648:   /
2021-09-18 21:45:39.795 32373-32765/com.badambiz.pk.arab E/Filament: 1651:    *
2021-09-18 21:45:39.796 32373-32765/com.badambiz.pk.arab E/Filament: 1652:    * Surface BRDF
2021-09-18 21:45:39.796 32373-32765/com.badambiz.pk.arab E/Filament: 1655:    * micro-facet model (see brdf.fs for more details). In addition, the specular
2021-09-18 21:45:39.796 32373-32765/com.badambiz.pk.arab E/Filament: 1656:    * can be either isotropic or anisotropic.
2021-09-18 21:45:39.796 32373-32765/com.badambiz.pk.arab E/Filament: 1657:    *
2021-09-18 21:45:39.796 32373-32765/com.badambiz.pk.arab E/Filament: 1663:    * BRDF's specular lobe (see brdf.fs).
2021-09-18 21:45:39.796 32373-32765/com.badambiz.pk.arab E/Filament: 1664:    */
2021-09-18 21:45:39.796 32373-32765/com.badambiz.pk.arab E/Filament: 1665:   vec3 surfaceShading(const PixelParams pixel, const Light light, float occlusion) {
2021-09-18 21:45:39.796 32373-32765/com.badambiz.pk.arab E/Filament: 1668:       float NoV = shading_NoV;
2021-09-18 21:45:39.796 32373-32765/com.badambiz.pk.arab E/Filament: 1669:       float NoL = saturate(light.NoL);
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1673:       vec3 Fr = specularLobe(pixel, light, h, NoV, NoL, NoH, LoH);
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1674:       vec3 Fd = diffuseLobe(pixel, NoV, NoL, LoH);
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1675:   #if defined(HAS_REFRACTION)
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1676:       Fd = (1.0 - pixel.transmission);
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1677:   #endif
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1680:
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1681:       // The energy compensation term is used to counteract the darkening effect
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1682:       // at high roughness
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1683:       vec3 color = Fd + Fr * pixel.energyCompensation;
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1686:       color = pixel.sheenScaling;
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1687:       color += sheenLobe(pixel, NoV, NoL, NoH);
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1689:
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1690:   #if defined(MATERIAL_HAS_CLEAR_COAT)
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1692:       float clearCoat = clearCoatLobe(pixel, h, NoH, LoH, Fcc);
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1693:       float attenuation = 1.0 - Fcc;
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1694:
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1695:   #if defined(MATERIAL_HAS_NORMAL) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL)
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1696:       color = attenuation * NoL;
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1698:       // If the material has a normal map, we want to use the geometric normal
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1699:       // instead to avoid applying the normal map details to the clear coat layer
2021-09-18 21:45:39.797 32373-32765/com.badambiz.pk.arab E/Filament: 1701:       color += clearCoat * clearCoatNoL;
2021-09-18 21:45:39.798 32373-32765/com.badambiz.pk.arab E/Filament: 1703:       // Early exit to avoid the extra multiplication by NoL
2021-09-18 21:45:39.798 32373-32765/com.badambiz.pk.arab E/Filament: 1704:       return (color * light.colorIntensity.rgb) *
2021-09-18 21:45:39.798 32373-32765/com.badambiz.pk.arab E/Filament: 1721:
2021-09-18 21:45:39.800 32373-32765/com.badambiz.pk.arab E/Filament: 1746:           // Read four AO samples and their depths values
2021-09-18 21:45:39.800 32373-32765/com.badambiz.pk.arab E/Filament: 1753:           vec3 s11 = textureLodOffset(light_ssao, uv, 0.0, ivec2(1, 1)).rgb;
2021-09-18 21:45:39.800 32373-32765/com.badambiz.pk.arab E/Filament: 1754:           vec3 s10 = textureLodOffset(light_ssao, uv, 0.0, ivec2(1, 0)).rgb;
2021-09-18 21:45:39.801 32373-32765/com.badambiz.pk.arab E/Filament: 1761:           vec2 f = fract(uv * size - 0.5);
2021-09-18 21:45:39.801 32373-32765/com.badambiz.pk.arab E/Filament: 1765:           b.z = f.x * (1.0 - f.y);
2021-09-18 21:45:39.801 32373-32765/com.badambiz.pk.arab E/Filament: 1767:
2021-09-18 21:45:39.801 32373-32765/com.badambiz.pk.arab E/Filament: 1770:           depths.x = unpack(vec2(dg.x, db.x));
2021-09-18 21:45:39.802 32373-32765/com.badambiz.pk.arab E/Filament: 1784:       // SSAO is not applied when blending is enabled
2021-09-18 21:45:39.802 32373-32765/com.badambiz.pk.arab E/Filament: 1785:       return 1.0;
2021-09-18 21:45:39.802 32373-32765/com.badambiz.pk.arab E/Filament: 1791:       return saturate(pow(NoV + visibility, exp2(-16.0 * roughness - 1.0)) - 1.0 + visibility);
2021-09-18 21:45:39.803 32373-32765/com.badambiz.pk.arab E/Filament: 1801:
2021-09-18 21:45:39.803 32373-32765/com.badambiz.pk.arab E/Filament: 1804:       // We also remove a multiplication by 2 * PI to simplify the computation
2021-09-18 21:45:39.803 32373-32765/com.badambiz.pk.arab E/Filament: 1805:       // since we divide by 2 * PI in computeBentSpecularAO()
2021-09-18 21:45:39.803 32373-32765/com.badambiz.pk.arab E/Filament: 1809:       } else if (r1 + r2 <= d) {
2021-09-18 21:45:39.803 32373-32765/com.badambiz.pk.arab E/Filament: 1810:           return 0.0;
2021-09-18 21:45:39.804 32373-32765/com.badambiz.pk.arab E/Filament: 1822:   float SpecularAO_Cones(float NoV, float visibility, float roughness) {
2021-09-18 21:45:39.805 32373-32765/com.badambiz.pk.arab E/Filament: 1835:       float ao = sphericalCapsIntersection(cosAv, cosAs, cosB) / (1.0 - cosAs);
2021-09-18 21:45:39.806 32373-32765/com.badambiz.pk.arab E/Filament: 1851:       return SpecularAO_Cones(NoV, visibility, roughness);
2021-09-18 21:45:39.806 32373-32765/com.badambiz.pk.arab E/Filament: 1852:   #else
2021-09-18 21:45:39.809 32373-32765/com.badambiz.pk.arab E/Filament: 1895:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.809 32373-32765/com.badambiz.pk.arab E/Filament: 1897:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.809 32373-32765/com.badambiz.pk.arab E/Filament: 1909:
2021-09-18 21:45:39.809 32373-32765/com.badambiz.pk.arab E/Filament: 1910:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1911:   // IBL utilities
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1912:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1915:       return data.rgb;
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1916:   }
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1917:
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1918:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1923:       // coord = sqrt(linear_roughness), which is the mapping used by cmgen.
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1924:       return textureLod(light_iblDFG, vec2(NoV, lod), 0.0).rgb;
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1927:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1928:   // IBL environment BRDF dispatch
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1929:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1930:
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1931:   vec3 prefilteredDFG(float perceptualRoughness, float NoV) {
2021-09-18 21:45:39.810 32373-32765/com.badambiz.pk.arab E/Filament: 1934:   }
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1935:
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1940:   vec3 Irradiance_SphericalHarmonics(const vec3 n) {
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1946:           + frameUniforms.iblSH[3] * (n.x)
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1947:   #endif
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1948:   #if SPHERICAL_HARMONICS_BANDS >= 3
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1949:           + frameUniforms.iblSH[4] * (n.y * n.x)
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1950:           + frameUniforms.iblSH[5] * (n.y * n.z)
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1951:           + frameUniforms.iblSH[6] * (3.0 * n.z * n.z - 1.0)
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1954:   #endif
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1955:           , 0.0);
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1956:   }
2021-09-18 21:45:39.811 32373-32765/com.badambiz.pk.arab E/Filament: 1957:
2021-09-18 21:45:39.812 32373-32765/com.badambiz.pk.arab E/Filament: 1961:   }
2021-09-18 21:45:39.812 32373-32765/com.badambiz.pk.arab E/Filament: 1962:
2021-09-18 21:45:39.812 32373-32765/com.badambiz.pk.arab E/Filament: 1963:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 1995:   float perceptualRoughnessToLod(float perceptualRoughness) {
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 1998:       // a 256 cubemap with 5 levels used. But also scales well for other iblRoughnessOneLevel values.
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 1999:       return frameUniforms.iblRoughnessOneLevel * perceptualRoughness * (2.0 - perceptualRoughness);
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2002:   vec3 prefilteredRadiance(const vec3 r, float perceptualRoughness) {
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2003:       float lod = perceptualRoughnessToLod(perceptualRoughness);
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2004:       return decodeDataForIBL(textureLod(light_iblSpecular, r, lod));
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2005:   }
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2007:   vec3 prefilteredRadiance(const vec3 r, float roughness, float offset) {
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2008:       float lod = frameUniforms.iblRoughnessOneLevel * roughness;
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2009:       return decodeDataForIBL(textureLod(light_iblSpecular, r, lod + offset));
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2010:   }
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2011:
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2012:   vec3 getSpecularDominantDirection(const vec3 n, const vec3 r, float roughness) {
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2013:       return mix(r, n, roughness * roughness);
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2014:   }
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2015:
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2016:   vec3 specularDFG(const PixelParams pixel) {
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2017:   #if defined(SHADING_MODEL_CLOTH)
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2018:       return pixel.f0 * pixel.dfg.z;
2021-09-18 21:45:39.814 32373-32765/com.badambiz.pk.arab E/Filament: 2019:   #else
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2020:       return mix(pixel.dfg.xxx, pixel.dfg.yyy, pixel.f0);
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2021:   #endif
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2022:   }
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2023:
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2024:   /
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2025:    * Returns the reflected vector at the current shading point. The reflected vector
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2026:    * return by this function might be different from shading_reflected:
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2027:    * - For anisotropic material, we bend the reflection vector to simulate
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2028:    *   anisotropic indirect lighting
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2031:    /
2021-09-18 21:45:39.815 32373-32765/com.badambiz.pk.arab E/Filament: 2032:
2021-09-18 21:45:39.816 32373-32765/com.badambiz.pk.arab E/Filament: 2042:   #else
2021-09-18 21:45:39.816 32373-32765/com.badambiz.pk.arab E/Filament: 2045:       return r;
2021-09-18 21:45:39.816 32373-32765/com.badambiz.pk.arab E/Filament: 2047:
2021-09-18 21:45:39.816 32373-32765/com.badambiz.pk.arab E/Filament: 2048:   vec3 getReflectedVector(const PixelParams pixel, const vec3 n) {
2021-09-18 21:45:39.816 32373-32765/com.badambiz.pk.arab E/Filament: 2049:   #if defined(MATERIAL_HAS_ANISOTROPY)
2021-09-18 21:45:39.816 32373-32765/com.badambiz.pk.arab E/Filament: 2050:       vec3 r = getReflectedVector(pixel, shading_view, n);
2021-09-18 21:45:39.816 32373-32765/com.badambiz.pk.arab E/Filament: 2051:   #else
2021-09-18 21:45:39.816 32373-32765/com.badambiz.pk.arab E/Filament: 2055:   }
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2065:       const float tof = 0.5 / float(0x80000000U);
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2066:       uint bits = index;
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2068:       bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2069:       bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2070:       bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2071:       bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2073:   }
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2074:
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2077:       float a2 = roughness * roughness;
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2078:       float phi = 2.0 * PI * u.x;
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2079:       float cosTheta2 = (1.0 - u.y) / (1.0 + (a2 - 1.0) * u.y);
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2080:       float cosTheta = sqrt(cosTheta2);
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2081:       float sinTheta = sqrt(1.0 - cosTheta2);
2021-09-18 21:45:39.817 32373-32765/com.badambiz.pk.arab E/Filament: 2084:
2021-09-18 21:45:39.818 32373-32765/com.badambiz.pk.arab E/Filament: 2085:   vec3 hemisphereCosSample(vec2 u) {
2021-09-18 21:45:39.818 32373-32765/com.badambiz.pk.arab E/Filament: 2086:       float phi = 2.0f * PI * u.x;
2021-09-18 21:45:39.818 32373-32765/com.badambiz.pk.arab E/Filament: 2087:       float cosTheta2 = 1.0 - u.y;
2021-09-18 21:45:39.818 32373-32765/com.badambiz.pk.arab E/Filament: 2088:       float cosTheta = sqrt(cosTheta2);
2021-09-18 21:45:39.818 32373-32765/com.badambiz.pk.arab E/Filament: 2101:       vec3 up = abs(v.z) < 0.9999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2113:       vec3 h = p1 * t + p2 * b + sqrt(max(0.0, 1.0 - p1p1 - p2p2)) * v;
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2114:
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2117:       return h;
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2118:   }
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2119:
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2120:   float prefilteredImportanceSampling(float ipdf, float omegaP) {
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2121:       // See: "Real-time Shading with Filtered Importance Sampling", Jaroslav Krivanek
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2123:       const float numSamples = float(IBL_INTEGRATION_IMPORTANCE_SAMPLING_COUNT);
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2124:       const float invNumSamples = 1.0 / float(numSamples);
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2125:       const float K = 4.0;
2021-09-18 21:45:39.819 32373-32765/com.badambiz.pk.arab E/Filament: 2126:       float omegaS = invNumSamples * ipdf;
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2127:       float mipLevel = log2(K * omegaS / omegaP) * 0.5;    // log4
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2131:   vec3 isEvaluateSpecularIBL(const PixelParams pixel, vec3 n, vec3 v, float NoV) {
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2132:       const uint numSamples = uint(IBL_INTEGRATION_IMPORTANCE_SAMPLING_COUNT);
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2136:       // TODO: for a true anisotropic BRDF, we need a real tangent space
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2137:       // tangent space
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2138:       mat3 T;
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2139:       T[0] = normalize(cross(up, n));
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2140:       T[1] = cross(n, T[0]);
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2141:       T[2] = n;
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2142:
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2144:       const vec3 m = vec3(0.06711056, 0.00583715, 52.9829189);
2021-09-18 21:45:39.820 32373-32765/com.badambiz.pk.arab E/Filament: 2148:       mat3 R;
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2149:       R[0] = vec3( c, s, 0);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2151:       R[2] = vec3( 0, 0, 1);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2152:       T *= R;
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2153:
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2154:       float roughness = pixel.roughness;
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2155:       float dim = float(textureSize(light_iblSpecular, 0).x);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2156:       float omegaP = (4.0 * PI) / (6.0 * dim * dim);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2157:
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2158:       vec3 indirectSpecular = vec3(0.0);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2159:       for (uint i = 0u; i < numSamples; i++) {
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2160:           vec2 u = hammersley(i);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2161:           vec3 h = T * importanceSamplingNdfDggx(u, roughness);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2162:
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2165:           vec3 l = getReflectedVector(pixel, v, h);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2166:
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2167:           // Compute this sample's contribution to the brdf
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2168:           float NoL = saturate(dot(n, l));
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2169:           if (NoL > 0.0) {
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2170:               float NoH = dot(n, h);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2171:               float LoH = saturate(dot(l, h));
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2172:
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2173:               // PDF inverse (we must use D_GGX() here, which is used to generate samples)
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2174:               float ipdf = (4.0 * LoH) / (D_GGX(roughness, NoH, h) * NoH);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2175:               float mipLevel = prefilteredImportanceSampling(ipdf, omegaP);
2021-09-18 21:45:39.821 32373-32765/com.badambiz.pk.arab E/Filament: 2179:               float V = visibility(roughness, NoV, NoL);
2021-09-18 21:45:39.822 32373-32765/com.badambiz.pk.arab E/Filament: 2181:               vec3 Fr = F * (D * V * NoL * ipdf * invNumSamples);
2021-09-18 21:45:39.822 32373-32765/com.badambiz.pk.arab E/Filament: 2187:       return indirectSpecular;
2021-09-18 21:45:39.822 32373-32765/com.badambiz.pk.arab E/Filament: 2188:   }
2021-09-18 21:45:39.822 32373-32765/com.badambiz.pk.arab E/Filament: 2189:
2021-09-18 21:45:39.822 32373-32765/com.badambiz.pk.arab E/Filament: 2192:       const float invNumSamples = 1.0 / float(numSamples);
2021-09-18 21:45:39.822 32373-32765/com.badambiz.pk.arab E/Filament: 2194:
2021-09-18 21:45:39.822 32373-32765/com.badambiz.pk.arab E/Filament: 2195:       // TODO: for a true anisotropic BRDF, we need a real tangent space
2021-09-18 21:45:39.822 32373-32765/com.badambiz.pk.arab E/Filament: 2199:       T[1] = cross(n, T[0]);
2021-09-18 21:45:39.822 32373-32765/com.badambiz.pk.arab E/Filament: 2200:       T[2] = n;
2021-09-18 21:45:39.823 32373-32765/com.badambiz.pk.arab E/Filament: 2201:
2021-09-18 21:45:39.823 32373-32765/com.badambiz.pk.arab E/Filament: 2202:       // Random rotation around N per pixel
2021-09-18 21:45:39.823 32373-32765/com.badambiz.pk.arab E/Filament: 2203:       const vec3 m = vec3(0.06711056, 0.00583715, 52.9829189);
2021-09-18 21:45:39.823 32373-32765/com.badambiz.pk.arab E/Filament: 2216:       vec3 indirectDiffuse = vec3(0.0);
2021-09-18 21:45:39.823 32373-32765/com.badambiz.pk.arab E/Filament: 2217:       for (uint i = 0u; i < numSamples; i++) {
2021-09-18 21:45:39.824 32373-32765/com.badambiz.pk.arab E/Filament: 2225:           // Compute this sample's contribution to the brdf
2021-09-18 21:45:39.824 32373-32765/com.badambiz.pk.arab E/Filament: 2226:           float NoL = saturate(dot(n, l));
2021-09-18 21:45:39.824 32373-32765/com.badambiz.pk.arab E/Filament: 2229:               float ipdf = PI / NoL;
2021-09-18 21:45:39.824 32373-32765/com.badambiz.pk.arab E/Filament: 2233:               indirectDiffuse += L;
2021-09-18 21:45:39.824 32373-32765/com.badambiz.pk.arab E/Filament: 2234:           }
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2240:   void isEvaluateClearCoatIBL(const PixelParams pixel, float specularAO, inout vec3 Fd, inout vec3 Fr) {
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2241:   #if defined(MATERIAL_HAS_CLEAR_COAT)
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2242:   #if defined(MATERIAL_HAS_NORMAL) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL)
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2248:       vec3 clearCoatNormal = shading_normal;
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2249:   #endif
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2250:       // The clear coat layer assumes an IOR of 1.5 (4% reflectance)
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2251:       float Fc = F_Schlick(0.04, 1.0, clearCoatNoV) * pixel.clearCoat;
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2252:       float attenuation = 1.0 - Fc;
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2256:       PixelParams p;
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2257:       p.perceptualRoughness = pixel.clearCoatPerceptualRoughness;
2021-09-18 21:45:39.825 32373-32765/com.badambiz.pk.arab E/Filament: 2260:   #if defined(MATERIAL_HAS_ANISOTROPY)
2021-09-18 21:45:39.826 32373-32765/com.badambiz.pk.arab E/Filament: 2261:       p.anisotropy = 0.0;
2021-09-18 21:45:39.826 32373-32765/com.badambiz.pk.arab E/Filament: 2262:   #endif
2021-09-18 21:45:39.826 32373-32765/com.badambiz.pk.arab E/Filament: 2265:       Fr += clearCoatLobe * (specularAO * pixel.clearCoat);
2021-09-18 21:45:39.826 32373-32765/com.badambiz.pk.arab E/Filament: 2266:   #endif
2021-09-18 21:45:39.826 32373-32765/com.badambiz.pk.arab E/Filament: 2267:   }
2021-09-18 21:45:39.826 32373-32765/com.badambiz.pk.arab E/Filament: 2270:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.826 32373-32765/com.badambiz.pk.arab E/Filament: 2277:       // Simulate subsurface scattering with a wrap diffuse term
2021-09-18 21:45:39.826 32373-32765/com.badambiz.pk.arab E/Filament: 2278:       diffuse *= Fd_Wrap(shading_NoV, 0.5);
2021-09-18 21:45:39.826 32373-32765/com.badambiz.pk.arab E/Filament: 2279:   #endif
2021-09-18 21:45:39.827 32373-32765/com.badambiz.pk.arab E/Filament: 2285:   #if defined(MATERIAL_HAS_SHEEN_COLOR)
2021-09-18 21:45:39.827 32373-32765/com.badambiz.pk.arab E/Filament: 2290:       vec3 reflectance = pixel.sheenDFG * pixel.sheenColor;
2021-09-18 21:45:39.827 32373-32765/com.badambiz.pk.arab E/Filament: 2297:   #if IBL_INTEGRATION == IBL_INTEGRATION_IMPORTANCE_SAMPLING
2021-09-18 21:45:39.827 32373-32765/com.badambiz.pk.arab E/Filament: 2301:
2021-09-18 21:45:39.828 32373-32765/com.badambiz.pk.arab E/Filament: 2305:       float clearCoatNoV = clampNoV(dot(shading_clearCoatNormal, shading_view));
2021-09-18 21:45:39.828 32373-32765/com.badambiz.pk.arab E/Filament: 2315:       Fr = attenuation;
2021-09-18 21:45:39.830 32373-32765/com.badambiz.pk.arab E/Filament: 2342:       r = refract(r, n, pixel.etaIR);
2021-09-18 21:45:39.830 32373-32765/com.badambiz.pk.arab E/Filament: 2345:       ray.position = vec3(shading_position + r * d);
2021-09-18 21:45:39.831 32373-32765/com.badambiz.pk.arab E/Filament: 2352:       const vec3 n, vec3 r, out Refraction ray) {
2021-09-18 21:45:39.831 32373-32765/com.badambiz.pk.arab E/Filament: 2353:       vec3 rr = refract(r, n, pixel.etaIR);
2021-09-18 21:45:39.831 32373-32765/com.badambiz.pk.arab E/Filament: 2356:       ray.position = vec3(shading_position + rr * d);
2021-09-18 21:45:39.831 32373-32765/com.badambiz.pk.arab E/Filament: 2364:   }
2021-09-18 21:45:39.831 32373-32765/com.badambiz.pk.arab E/Filament: 2365:
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2369:   #if defined(MATERIAL_HAS_MICRO_THICKNESS)
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2370:       // note: we need the refracted ray to calculate the distance traveled
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2374:       d = pixel.uThickness / max(-NoR, 0.001);
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2376:   #else
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2377:       ray.position = vec3(shading_position);
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2379:       ray.direction = r;
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2381:   }
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2383:   void applyRefraction(
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2384:       const PixelParams pixel,
2021-09-18 21:45:39.832 32373-32765/com.badambiz.pk.arab E/Filament: 2385:       const vec3 n0, vec3 E, vec3 Fd, vec3 Fr,
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2387:
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2388:       Refraction ray;
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2390:   #if REFRACTION_TYPE == REFRACTION_TYPE_SOLID
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2391:       refractionSolidSphere(pixel, n0, -shading_view, ray);
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2392:   #elif REFRACTION_TYPE == REFRACTION_TYPE_THIN
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2393:       refractionThinSphere(pixel, n0, -shading_view, ray);
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2396:   #endif
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2397:
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2398:       // compute transmission T
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2401:       vec3 T = min(vec3(1.0), exp(-pixel.absorption * ray.d));
2021-09-18 21:45:39.833 32373-32765/com.badambiz.pk.arab E/Filament: 2402:   #else
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2412:       // For thin surfaces, the light will bounce off at the second interface in the direction of
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2413:       // the reflection, effectively adding to the specular, but this process will repeat itself.
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2416:       // This infinite series converges and is easy to simplify.
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2421:
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2422:       / sample the cubemap or screen-space */
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2425:       // which is not the case when we'll read from the screen-space buffer
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2426:       vec3 Ft = prefilteredRadiance(ray.direction, perceptualRoughness) * frameUniforms.iblLuminance;
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2427:   #else
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2428:       // compute the point where the ray exits the medium, if needed
2021-09-18 21:45:39.834 32373-32765/com.badambiz.pk.arab E/Filament: 2431:
2021-09-18 21:45:39.835 32373-32765/com.badambiz.pk.arab E/Filament: 2433:       // Empirical factor to compensate for the gaussian approximation of Dggx, chosen so
2021-09-18 21:45:39.835 32373-32765/com.badambiz.pk.arab E/Filament: 2434:       // cubemap and screen-space modes match at perceptualRoughness 0.125
2021-09-18 21:45:39.835 32373-32765/com.badambiz.pk.arab E/Filament: 2435:       float tweakedPerceptualRoughness = perceptualRoughness * 1.74;
2021-09-18 21:45:39.835 32373-32765/com.badambiz.pk.arab E/Filament: 2438:       vec3 Ft = textureLod(light_ssr, p.xy, lod).rgb;
2021-09-18 21:45:39.835 32373-32765/com.badambiz.pk.arab E/Filament: 2439:   #endif
2021-09-18 21:45:39.835 32373-32765/com.badambiz.pk.arab E/Filament: 2440:
2021-09-18 21:45:39.836 32373-32765/com.badambiz.pk.arab E/Filament: 2454:       color.rgb += Fr + mix(Fd, Ft, pixel.transmission);
2021-09-18 21:45:39.836 32373-32765/com.badambiz.pk.arab E/Filament: 2463:       applyRefraction(pixel, n, E, Fd, Fr, color);
2021-09-18 21:45:39.836 32373-32765/com.badambiz.pk.arab E/Filament: 2467:   }
2021-09-18 21:45:39.837 32373-32765/com.badambiz.pk.arab E/Filament: 2468:
2021-09-18 21:45:39.837 32373-32765/com.badambiz.pk.arab E/Filament: 2474:       // specular layer
2021-09-18 21:45:39.837 32373-32765/com.badambiz.pk.arab E/Filament: 2478:       vec3 r = getReflectedVector(pixel, shading_normal);
2021-09-18 21:45:39.839 32373-32765/com.badambiz.pk.arab E/Filament: 2514:       multiBounceSpecularAO(specularAO, pixel.f0, Fr);
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2523:   // Lighting
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2524:   //------------------------------------------------------------------------------
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2527:   #if defined(BLEND_MODE_TRANSPARENT) || defined(BLEND_MODE_FADE) || defined(BLEND_MODE_MASKED)
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2528:       return a;
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2529:   #else
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2530:       return 1.0;
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2531:   #endif
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2532:   }
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2533:
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2535:   float computeMaskedAlpha(float a) {
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2536:       // Use derivatives to smooth alpha tested edges
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2537:       return (a - getMaskThreshold()) / max(fwidth(a), 1e-3) + 0.5;
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2539:   #endif
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2540:
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2541:   void applyAlphaMask(inout vec4 baseColor) {
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2542:   #if defined(BLEND_MODE_MASKED)
2021-09-18 21:45:39.840 32373-32765/com.badambiz.pk.arab E/Filament: 2543:       baseColor.a = computeMaskedAlpha(baseColor.a);
2021-09-18 21:45:39.841 32373-32765/com.badambiz.pk.arab E/Filament: 2544:       if (baseColor.a <= 0.0) {
2021-09-18 21:45:39.841 32373-32765/com.badambiz.pk.arab E/Filament: 2548:   }
2021-09-18 21:45:39.841 32373-32765/com.badambiz.pk.arab E/Filament: 2549:
2021-09-18 21:45:39.841 32373-32765/com.badambiz.pk.arab E/Filament: 2553:       // Tokuyoshi 2017, "Error Reduction and Simplification for Shading Anti-Aliasing"
2021-09-18 21:45:39.842 32373-32765/com.badambiz.pk.arab E/Filament: 2565:
2021-09-18 21:45:39.842 32373-32765/com.badambiz.pk.arab E/Filament: 2566:       float variance = materialParams._specularAntiAliasingVariance * (dot(du, du) + dot(dv, dv));
2021-09-18 21:45:39.842 32373-32765/com.badambiz.pk.arab E/Filament: 2567:
2021-09-18 21:45:39.842 32373-32765/com.badambiz.pk.arab E/Filament: 2570:       float squareRoughness = saturate(roughness * roughness + kernelRoughness);
2021-09-18 21:45:39.842 32373-32765/com.badambiz.pk.arab E/Filament: 2573:   }
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2582:       // in fade mode so we can apply alpha to both the specular and diffuse
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2584:       unpremultiply(baseColor);
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2585:   #endif
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2586:
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2590:       float metallic = computeMetallicFromSpecularColor(specularColor);
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2591:
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2592:       pixel.diffuseColor = computeDiffuseColor(baseColor, metallic);
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2593:       pixel.f0 = specularColor;
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2594:   #elif !defined(SHADING_MODEL_CLOTH)
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2595:       pixel.diffuseColor = computeDiffuseColor(baseColor, material.metallic);
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2596:   #if !defined(SHADING_MODEL_SUBSURFACE) && (!defined(MATERIAL_HAS_REFLECTANCE) && defined(MATERIAL_HAS_IOR))
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2597:       float reflectance = iorToF0(max(1.0, material.ior), 1.0);
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2599:       // Assumes an interface from air to an IOR of 1.5 for dielectrics
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2600:       float reflectance = computeDielectricF0(material.reflectance);
2021-09-18 21:45:39.843 32373-32765/com.badambiz.pk.arab E/Filament: 2602:       pixel.f0 = computeF0(baseColor, material.metallic, reflectance);
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2605:       pixel.f0 = material.sheenColor;
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2607:       pixel.subsurfaceColor = material.subsurfaceColor;
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2608:   #endif
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2611:   #if !defined(SHADING_MODEL_CLOTH) && !defined(SHADING_MODEL_SUBSURFACE)
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2612:   #if defined(HAS_REFRACTION)
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2613:       // Air's Index of refraction is 1.000277 at STP but everybody uses 1.0
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2615:   #if !defined(MATERIAL_HAS_IOR)
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2616:       // [common case] ior is not set in the material, deduce it from F0
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2618:   #else
2021-09-18 21:45:39.844 32373-32765/com.badambiz.pk.arab E/Filament: 2619:       // if ior is set in the material, use it (can lead to unrealistic materials)
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2626:   #else
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2628:   #endif
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2629:   #if defined(MATERIAL_HAS_ABSORPTION)
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2633:       pixel.absorption = saturate(material.absorption);
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2634:   #endif
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2635:   #else
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2638:   #if defined(MATERIAL_HAS_THICKNESS)
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2640:   #endif
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2641:   #if defined(MATERIAL_HAS_MICRO_THICKNESS) && (REFRACTION_TYPE == REFRACTION_TYPE_THIN)
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2642:       pixel.uThickness = max(0.0, material.microThickness);
2021-09-18 21:45:39.845 32373-32765/com.badambiz.pk.arab E/Filament: 2643:   #else
2021-09-18 21:45:39.847 32373-32765/com.badambiz.pk.arab E/Filament: 2666:
2021-09-18 21:45:39.847 32373-32765/com.badambiz.pk.arab E/Filament: 2667:   void getClearCoatPixelParams(const MaterialInputs material, inout PixelParams pixel) {
2021-09-18 21:45:39.848 32373-32765/com.badambiz.pk.arab E/Filament: 2682:       pixel.clearCoatRoughness = perceptualRoughnessToRoughness(clearCoatPerceptualRoughness);
2021-09-18 21:45:39.848 32373-32765/com.badambiz.pk.arab E/Filament: 2686:       // of 1.5, but the clear coat layer forms an interface from IOR 1.5 to IOR
2021-09-18 21:45:39.848 32373-32765/com.badambiz.pk.arab E/Filament: 2687:       // 1.5. We recompute f0 by first computing its IOR, then reconverting to f0
2021-09-18 21:45:39.848 32373-32765/com.badambiz.pk.arab E/Filament: 2694:   void getRoughnessPixelParams(const MaterialInputs material, inout PixelParams pixel) {
2021-09-18 21:45:39.848 32373-32765/com.badambiz.pk.arab E/Filament: 2698:       float perceptualRoughness = material.roughness;
2021-09-18 21:45:39.849 32373-32765/com.badambiz.pk.arab E/Filament: 2704:   #if defined(GEOMETRIC_SPECULAR_AA)
2021-09-18 21:45:39.849 32373-32765/com.badambiz.pk.arab E/Filament: 2705:       perceptualRoughness = normalFiltering(perceptualRoughness, getWorldGeometricNormalVector());
2021-09-18 21:45:39.849 32373-32765/com.badambiz.pk.arab E/Filament: 2706:   #endif
2021-09-18 21:45:39.849 32373-32765/com.badambiz.pk.arab E/Filament: 2712:       float basePerceptualRoughness = max(perceptualRoughness, pixel.clearCoatPerceptualRoughness);
2021-09-18 21:45:39.849 32373-32765/com.badambiz.pk.arab E/Filament: 2713:       perceptualRoughness = mix(perceptualRoughness, basePerceptualRoughness, pixel.clearCoat);
2021-09-18 21:45:39.849 32373-32765/com.badambiz.pk.arab E/Filament: 2714:   #endif
2021-09-18 21:45:39.850 32373-32765/com.badambiz.pk.arab E/Filament: 2722:   void getSubsurfacePixelParams(const MaterialInputs material, inout PixelParams pixel) {
2021-09-18 21:45:39.850 32373-32765/com.badambiz.pk.arab E/Filament: 2723:   #if defined(SHADING_MODEL_SUBSURFACE)
2021-09-18 21:45:39.850 32373-32765/com.badambiz.pk.arab E/Filament: 2726:       pixel.thickness = saturate(material.thickness);
2021-09-18 21:45:39.850 32373-32765/com.badambiz.pk.arab E/Filament: 2736:   #endif
2021-09-18 21:45:39.851 32373-32765/com.badambiz.pk.arab E/Filament: 2747:   #else
2021-09-18 21:45:39.853 32373-32765/com.badambiz.pk.arab E/Filament: 2781:    * - Punctual lights
2021-09-18 21:45:39.855 32373-32765/com.badambiz.pk.arab E/Filament: 2807:
2021-09-18 21:45:39.855 32373-32765/com.badambiz.pk.arab E/Filament: 2808:   #if defined(BLEND_MODE_FADE) && !defined(SHADING_MODEL_UNLIT)
2021-09-18 21:45:39.855 32373-32765/com.badambiz.pk.arab E/Filament: 2809:       // In fade mode we un-premultiply baseColor early on, so we need to
2021-09-18 21:45:39.855 32373-32765/com.badambiz.pk.arab E/Filament: 2810:       // premultiply again at the end (affects diffuse and specular lighting)
2021-09-18 21:45:39.855 32373-32765/com.badambiz.pk.arab E/Filament: 2817:   void addEmissive(const MaterialInputs material, inout vec4 color) {
2021-09-18 21:45:39.856 32373-32765/com.badambiz.pk.arab E/Filament: 2822:   #endif
2021-09-18 21:45:39.856 32373-32765/com.badambiz.pk.arab E/Filament: 2823:   }
2021-09-18 21:45:39.856 32373-32765/com.badambiz.pk.arab E/Filament: 2829:    * Returns a pre-exposed HDR RGBA color in linear space.
2021-09-18 21:45:39.856 32373-32765/com.badambiz.pk.arab E/Filament: 2836:   #if defined(GL_GOOGLE_cpp_style_line_directive)
2021-09-18 21:45:39.857 32373-32765/com.badambiz.pk.arab E/Filament: 2838:   #endif
2021-09-18 21:45:39.857 32373-32765/com.badambiz.pk.arab E/Filament: 2847:   #elif defined(POST_LIGHTING_BLEND_MODE_ADD)
2021-09-18 21:45:39.857 32373-32765/com.badambiz.pk.arab E/Filament: 2848:       color += material.postLightingColor;
2021-09-18 21:45:39.857 32373-32765/com.badambiz.pk.arab E/Filament: 2849:   #elif defined(POST_LIGHTING_BLEND_MODE_MULTIPLY)
2021-09-18 21:45:39.857 32373-32765/com.badambiz.pk.arab E/Filament: 2855:   #endif
2021-09-18 21:45:39.858 32373-32765/com.badambiz.pk.arab E/Filament: 2856:
2021-09-18 21:45:39.858 32373-32765/com.badambiz.pk.arab E/Filament: 2859:       // Computes global variables we need to evaluate material and lighting
2021-09-18 21:45:39.858 32373-32765/com.badambiz.pk.arab E/Filament: 2869:       fragColor = evaluateMaterial(inputs);
2021-09-18 21:45:39.858 32373-32765/com.badambiz.pk.arab E/Filament: 2874:           fragColor.rgb *= uintToColorDebug(getShadowCascade());
2021-09-18 21:45:39.859 32373-32765/com.badambiz.pk.arab E/Filament: 2875:       }
2021-09-18 21:45:39.859 32373-32765/com.badambiz.pk.arab E/Filament: 2882:
2021-09-18 21:45:39.859 32373-32765/com.badambiz.pk.arab E/Filament: 2883:   #if defined(MATERIAL_HAS_POST_LIGHTING_COLOR)
2021-09-18 21:45:39.859 32373-32765/com.badambiz.pk.arab E/Filament: 2886:   }
2021-09-18 21:45:39.859 32373-32765/com.badambiz.pk.arab E/Filament: 2887:
2021-09-18 21:45:40.034 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:45:40.035 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:45:40.035 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:45:40.035 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:45:40.296 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:42.034 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:45:42.035 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:45:42.035 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:45:42.036 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:45:43.311 1119-2882/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:46.320 1119-2882/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:46.672 32217-32219/? E/rutils: releaseProcess gCount = 0
2021-09-18 21:45:48.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:45:48.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:45:48.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:45:48.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:45:49.324 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:52.330 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:54.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:45:54.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:45:54.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:45:54.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:45:55.439 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:45:58.570 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:00.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:46:00.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:46:00.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:00.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:02.173 1119-2589/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:05.777 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:06.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:46:06.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:46:06.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:06.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:09.381 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:12.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:46:12.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:46:12.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:12.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:12.968 1119-2589/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:16.478 1119-2589/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:18.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:46:18.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:18.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:20.175 1119-2589/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:23.778 1119-2589/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:24.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:46:24.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:46:24.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:24.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:27.365 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:28.347 1119-1170/? E/BiometricsService.Main: return mBrightness != 0
2021-09-18 21:46:30.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:46:30.037 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:46:30.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:30.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:30.968 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:30.984 1119-1170/? E/BiometricsService.Main: return mBrightness != 0
2021-09-18 21:46:34.368 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:36.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:46:36.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:46:36.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:36.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:37.376 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:40.879 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:42.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:46:42.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:46:42.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:42.039 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:44.466 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:48.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:46:48.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:48.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:48.069 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:51.672 1119-2589/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:54.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:46:54.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:46:54.038 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:46:55.277 1119-2589/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:46:58.391 1119-2589/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:00.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:47:00.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:00.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:47:00.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:47:01.566 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:05.170 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:06.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:47:06.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:06.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:47:06.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:47:08.773 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:12.040 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:12.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:47:12.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:47:12.377 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:15.964 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:18.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:18.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:47:18.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:47:19.413 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:22.420 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:24.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:47:24.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:24.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:47:24.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:47:24.296 1119-1170/? E/BiometricsService.Main: return mBrightness != 0
2021-09-18 21:47:25.875 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:27.017 1119-1170/? E/BiometricsService.Main: return mBrightness != 0
2021-09-18 21:47:29.595 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:30.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:47:30.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:30.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:47:30.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:47:33.182 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:36.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:47:36.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:36.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:47:36.043 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:47:36.785 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:40.389 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:42.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:47:42.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:43.437 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:46.696 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:48.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:47:48.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:48.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:47:48.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:47:50.283 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:53.886 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:47:54.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:47:54.043 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:47:54.044 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:47:54.044 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:47:57.490 1119-2479/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:00.041 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:48:00.042 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:48:01.094 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:04.393 14312-626/? E/memtrack: Couldn't load memtrack module
2021-09-18 21:48:04.459 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:06.043 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:48:06.044 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:48:06.044 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:48:06.045 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:48:07.465 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:10.987 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:12.044 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:48:12.044 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:48:12.045 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:48:12.045 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:48:14.591 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:18.043 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:48:18.043 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:48:18.044 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:48:18.044 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:48:18.194 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:20.131 1119-1170/? E/BiometricsService.Main: return mBrightness != 0
2021-09-18 21:48:21.782 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:22.242 1119-1170/? E/BiometricsService.Main: return mBrightness != 0
2021-09-18 21:48:24.045 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:48:24.046 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:48:24.046 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:48:24.046 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:48:25.385 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:28.483 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:30.045 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:48:30.046 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:48:30.046 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:48:30.047 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"
2021-09-18 21:48:31.692 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:35.295 1119-2333/? E/Process: get_ion_cache_memory: Unable to open /d/ion/heaps/system
2021-09-18 21:48:36.046 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns1"
2021-09-18 21:48:36.047 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns2"
2021-09-18 21:48:36.047 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns3"
2021-09-18 21:48:36.047 32373-307/com.badambiz.pk.arab E/libc: Access denied finding property "net.dns4"

Could you share the glb file that's causing issue?

The crash in your first log happens in the GL driver's shader compiler. Probably not much we can do about it.

We've had a lot of issue with IMG drivers' glsl compiler. You might have more luck using the vulkan backend (not guaranteed). In any case, we can't do anything about it, unfortunately.

authors: pixelflinger romainguy sniperPqc