Compare commits
315 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb460d78d8 | ||
|
|
838835a715 | ||
|
|
63acd53e23 | ||
|
|
fcd2d0457b | ||
|
|
58fc26461b | ||
|
|
fd82f6b04e | ||
|
|
519ae4d143 | ||
|
|
8d72869437 | ||
|
|
2cbacb532a | ||
|
|
1da2bf2f7a | ||
|
|
cef3200533 | ||
|
|
634500c398 | ||
|
|
802bc7a5dc | ||
|
|
8875806c5d | ||
|
|
c9df807f1f | ||
|
|
b3e294ac54 | ||
|
|
3feef4e84b | ||
|
|
2bf7535ad0 | ||
|
|
3315f75de9 | ||
|
|
bbe7dbfa92 | ||
|
|
15001524bd | ||
|
|
c1713e7501 | ||
|
|
0181584735 | ||
|
|
df06e8dc41 | ||
|
|
5697922a65 | ||
|
|
4da83df2b9 | ||
|
|
8f156d6588 | ||
|
|
b0ce077ace | ||
|
|
9d29d2e32c | ||
|
|
a29b438161 | ||
|
|
50a042bb16 | ||
|
|
cec0871c11 | ||
|
|
41a809368b | ||
|
|
f690015a88 | ||
|
|
342deb5a64 | ||
|
|
fdc480ff6e | ||
|
|
378b7cd4dd | ||
|
|
f779fc7a0e | ||
|
|
fe11f495d6 | ||
|
|
265876c849 | ||
|
|
c9c52518c0 | ||
|
|
96c9ac6f8b | ||
|
|
bdeb30a847 | ||
|
|
ea53eb9290 | ||
|
|
05875057c9 | ||
|
|
d67210155b | ||
|
|
ae92c50cee | ||
|
|
43429dc0ec | ||
|
|
04cf92a27f | ||
|
|
57a57f50f6 | ||
|
|
5e5a75e6c5 | ||
|
|
109c86aaf7 | ||
|
|
10e7e7727a | ||
|
|
a39775050a | ||
|
|
44125926d1 | ||
|
|
60734349de | ||
|
|
fbfd5ec0ec | ||
|
|
157c0264af | ||
|
|
9bacfdb390 | ||
|
|
f9aaf5c42e | ||
|
|
a74a95cc65 | ||
|
|
21db695e79 | ||
|
|
cf917f1093 | ||
|
|
a8d3a61c25 | ||
|
|
80f13a8149 | ||
|
|
e172f3a67f | ||
|
|
c382c0a9cc | ||
|
|
bc0ea16ff0 | ||
|
|
b2dc8aa84c | ||
|
|
78b29fe967 | ||
|
|
9987e8b6ab | ||
|
|
0d9bdcc008 | ||
|
|
81fa33abeb | ||
|
|
af7f87e19b | ||
|
|
3073b03d56 | ||
|
|
23dab0a013 | ||
|
|
fd68144ba2 | ||
|
|
51e92cd142 | ||
|
|
50f33f7196 | ||
|
|
b5c634045e | ||
|
|
1f05531d53 | ||
|
|
88f382f0e3 | ||
|
|
3e59925900 | ||
|
|
1182d30fb9 | ||
|
|
095179eeb3 | ||
|
|
69b48eaadb | ||
|
|
4031c6f0d3 | ||
|
|
7a22f7dfc5 | ||
|
|
728ebf5023 | ||
|
|
62476d2f06 | ||
|
|
ea404f8d4f | ||
|
|
602a550d93 | ||
|
|
12abbe2d23 | ||
|
|
5fea428243 | ||
|
|
fb0ee97588 | ||
|
|
56ef48c9c3 | ||
|
|
47c3dd3dd1 | ||
|
|
9a3c9ccbf3 | ||
|
|
ef4dfcecd6 | ||
|
|
5943382d23 | ||
|
|
c181648bfa | ||
|
|
0cf78b3abe | ||
|
|
1dcf347b87 | ||
|
|
47714007f7 | ||
|
|
22889a7ad9 | ||
|
|
a14451d0ac | ||
|
|
5dfdab10b7 | ||
|
|
54277572d2 | ||
|
|
52f2c0e107 | ||
|
|
59abc8cc20 | ||
|
|
e15796b348 | ||
|
|
1711eaa4d6 | ||
|
|
acbd6a5ca8 | ||
|
|
775090fdda | ||
|
|
0915b86927 | ||
|
|
c10f7b01f4 | ||
|
|
84142ac506 | ||
|
|
ff190847a1 | ||
|
|
3ceec28189 | ||
|
|
d6f2e3b8e9 | ||
|
|
481038152f | ||
|
|
60bd72730d | ||
|
|
df30517743 | ||
|
|
8f80643c1a | ||
|
|
eabfd08473 | ||
|
|
a66af0ac58 | ||
|
|
15187e9d99 | ||
|
|
681e8f8b59 | ||
|
|
fbb406ca7d | ||
|
|
5aea9be2fb | ||
|
|
aacaf5055e | ||
|
|
a5dbddfd12 | ||
|
|
764a0df669 | ||
|
|
f04864c216 | ||
|
|
11a1b31a4c | ||
|
|
fb86a77cf8 | ||
|
|
d512357928 | ||
|
|
b850bc827e | ||
|
|
0229077293 | ||
|
|
23f2679bbe | ||
|
|
e6243b3df3 | ||
|
|
375b46d866 | ||
|
|
4577c8d57f | ||
|
|
24d1e9c3d2 | ||
|
|
f7a630d614 | ||
|
|
1c1cb11cf5 | ||
|
|
3ac8a6a21c | ||
|
|
c524c39867 | ||
|
|
ad02e483d0 | ||
|
|
f463d53036 | ||
|
|
e203edc12a | ||
|
|
b8d4408524 | ||
|
|
5447baab00 | ||
|
|
904989f7f4 | ||
|
|
4846ccd86d | ||
|
|
0fd1c3182e | ||
|
|
7d80052dae | ||
|
|
b71ee48477 | ||
|
|
7a285dc55a | ||
|
|
a0f3a4d9bb | ||
|
|
304090d39f | ||
|
|
fef70be848 | ||
|
|
bdb12d9b24 | ||
|
|
510f51d934 | ||
|
|
47c9fd67e2 | ||
|
|
43ad283a83 | ||
|
|
1f403fdae0 | ||
|
|
2e4936afc4 | ||
|
|
891ffabd11 | ||
|
|
e2c19498b4 | ||
|
|
c32630b265 | ||
|
|
1a3cee9da9 | ||
|
|
3acfd6fc78 | ||
|
|
bf21e78d02 | ||
|
|
83a9bb3a6f | ||
|
|
0744876327 | ||
|
|
8b92519113 | ||
|
|
525d4e08a3 | ||
|
|
2e9bf6d694 | ||
|
|
1980107925 | ||
|
|
e845f01d85 | ||
|
|
409a84be1f | ||
|
|
b2fef7988e | ||
|
|
82623c8fd4 | ||
|
|
552a3ab103 | ||
|
|
52c376a8a7 | ||
|
|
dd3b7ca65c | ||
|
|
9776a38d48 | ||
|
|
ceeccde92c | ||
|
|
1a8550e8e0 | ||
|
|
2feb0ad325 | ||
|
|
7f2c9c2326 | ||
|
|
9e5f4be85d | ||
|
|
b5874af40b | ||
|
|
bef48be7b4 | ||
|
|
b54fdc9e6e | ||
|
|
cc70b827a8 | ||
|
|
cedbf2e30b | ||
|
|
9ff195ce19 | ||
|
|
8e7aaaa662 | ||
|
|
77a744b20b | ||
|
|
51fd1ef645 | ||
|
|
592f8d1b0d | ||
|
|
29612a684e | ||
|
|
3500cc693d | ||
|
|
807b9882c5 | ||
|
|
b2920a68fb | ||
|
|
f4ef283908 | ||
|
|
09a38f4e43 | ||
|
|
04acd1885a | ||
|
|
d9fde833b4 | ||
|
|
378ba4e1df | ||
|
|
4522ce342b | ||
|
|
04402ed412 | ||
|
|
dc3cf5df49 | ||
|
|
9261769c5a | ||
|
|
f5e74f8d5a | ||
|
|
e87c140255 | ||
|
|
00d36110d5 | ||
|
|
c11364b89f | ||
|
|
89f8b8663c | ||
|
|
6734cdd923 | ||
|
|
3bf4ff78d9 | ||
|
|
b52cef2fd0 | ||
|
|
66747e69c5 | ||
|
|
4085336db5 | ||
|
|
c666a79d12 | ||
|
|
22a464f76f | ||
|
|
60e88a6069 | ||
|
|
ff3a9a46cc | ||
|
|
8c53ad0906 | ||
|
|
93cc32f34d | ||
|
|
dd764d2c3f | ||
|
|
5a7ae8f1c7 | ||
|
|
4ed5085422 | ||
|
|
0e574f3fce | ||
|
|
dcfc27857f | ||
|
|
e6d5807399 | ||
|
|
fa2553251f | ||
|
|
b04c398202 | ||
|
|
fe8e1d0734 | ||
|
|
7387718852 | ||
|
|
a503a6209a | ||
|
|
9f5d6e79da | ||
|
|
ce3e5f74e8 | ||
|
|
9b06ab6084 | ||
|
|
f37112358e | ||
|
|
76d4fc08f1 | ||
|
|
90548a148b | ||
|
|
270bbe4218 | ||
|
|
3f26c8b893 | ||
|
|
f368b14621 | ||
|
|
6960b1148a | ||
|
|
9cea332f61 | ||
|
|
93ce14659a | ||
|
|
2d49b36b3e | ||
|
|
3cc23aac25 | ||
|
|
ab9d132964 | ||
|
|
11dc8740f2 | ||
|
|
b30e4f9a4b | ||
|
|
4b797cff88 | ||
|
|
22afc3a93b | ||
|
|
8aba6f0dcd | ||
|
|
97cee30383 | ||
|
|
7f4832706b | ||
|
|
5f16fe45b1 | ||
|
|
8c8e0ce8a3 | ||
|
|
1b9dea5b75 | ||
|
|
7ed073ec3f | ||
|
|
e2c5bb025b | ||
|
|
a86077e9fe | ||
|
|
cd903b412f | ||
|
|
dd914066f3 | ||
|
|
7af07a1c0f | ||
|
|
b980d0a7fd | ||
|
|
5f10ab56bc | ||
|
|
383da5f661 | ||
|
|
8f0591c9a6 | ||
|
|
afb0ceac57 | ||
|
|
fc2660eb39 | ||
|
|
1b8f4b97dd | ||
|
|
3671469046 | ||
|
|
53d4fa3095 | ||
|
|
94999e55e1 | ||
|
|
ba9415b514 | ||
|
|
fe1c1736cd | ||
|
|
abb6ae304c | ||
|
|
885a69710e | ||
|
|
4058ef5f09 | ||
|
|
e7bebcdea9 | ||
|
|
5ef234153d | ||
|
|
bbee5599f1 | ||
|
|
a4212d5ace | ||
|
|
6d0e719e06 | ||
|
|
3fa9b08a52 | ||
|
|
4b1a451804 | ||
|
|
f9d7d60f7d | ||
|
|
aaf9d95411 | ||
|
|
90d1ebefae | ||
|
|
a7e4a759e9 | ||
|
|
283992088f | ||
|
|
75c9ee5982 | ||
|
|
4d88ff116c | ||
|
|
cf3cc37392 | ||
|
|
f804c9e346 | ||
|
|
4e33e9c3d1 | ||
|
|
18ac9fd0cc | ||
|
|
d0f28a48a8 | ||
|
|
706780e3a6 | ||
|
|
b5f9c66503 | ||
|
|
41f34b8d55 | ||
|
|
04731b937a | ||
|
|
7278e5b5ba | ||
|
|
891184bc77 | ||
|
|
3d51f9ab23 |
3
.github/workflows/mac-continuous.yml
vendored
3
.github/workflows/mac-continuous.yml
vendored
@@ -21,3 +21,6 @@ jobs:
|
||||
with:
|
||||
name: filament-mac
|
||||
path: out/filament-release-darwin.tgz
|
||||
- name: Check public headers
|
||||
run: |
|
||||
build/common/check-headers.sh out/release/filament/include
|
||||
|
||||
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
@@ -1,14 +1,25 @@
|
||||
name: Release
|
||||
|
||||
# This Workflow can be triggered two ways:
|
||||
# 1. A GitHub release is created (using the GitHub web UI). This triggers all of the platforms to build and upload assets.
|
||||
# 2. A repository_dispatch API event is sent. This triggers a build for only the platform specified in the dispatch event.
|
||||
# 1. A GitHub release is created (using the GitHub web UI). This triggers all of the platforms to
|
||||
# build and upload assets.
|
||||
# 2. A workflow_dispatch event is triggered from the GitHub web UI. This triggers a build for only
|
||||
# the platform specified in the dispatch event.
|
||||
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.event.client_payload.release_tag }}
|
||||
RELEASE_TAG: ${{ github.event.inputs.release_tag }}
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform to build (desktop, web, android, ios, windows)'
|
||||
required: true
|
||||
default: 'desktop'
|
||||
release_tag:
|
||||
description: 'Release tag to build (e.g., v1.13.0)'
|
||||
required: true
|
||||
default: 'v1.13.0'
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
@@ -16,7 +27,7 @@ jobs:
|
||||
build-desktop:
|
||||
name: build-desktop
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.event_name == 'release' || github.event.client_payload.platform == 'desktop'
|
||||
if: github.event_name == 'release' || github.event.inputs.platform == 'desktop'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -51,7 +62,7 @@ jobs:
|
||||
build-web:
|
||||
name: build-web
|
||||
runs-on: macos-latest
|
||||
if: github.event_name == 'release' || github.event.client_payload.platform == 'web'
|
||||
if: github.event_name == 'release' || github.event.inputs.platform == 'web'
|
||||
|
||||
steps:
|
||||
- name: Decide Git ref
|
||||
@@ -80,7 +91,7 @@ jobs:
|
||||
build-android:
|
||||
name: build-android
|
||||
runs-on: macos-latest
|
||||
if: github.event_name == 'release' || github.event.client_payload.platform == 'android'
|
||||
if: github.event_name == 'release' || github.event.inputs.platform == 'android'
|
||||
|
||||
steps:
|
||||
- name: Decide Git ref
|
||||
@@ -129,7 +140,7 @@ jobs:
|
||||
build-ios:
|
||||
name: build-ios
|
||||
runs-on: macos-latest
|
||||
if: github.event_name == 'release' || github.event.client_payload.platform == 'ios'
|
||||
if: github.event_name == 'release' || github.event.inputs.platform == 'ios'
|
||||
|
||||
steps:
|
||||
- name: Decide Git ref
|
||||
@@ -158,7 +169,7 @@ jobs:
|
||||
build-windows:
|
||||
name: build-windows
|
||||
runs-on: windows-latest
|
||||
if: github.event_name == 'release' || github.event.client_payload.platform == 'windows'
|
||||
if: github.event_name == 'release' || github.event.inputs.platform == 'windows'
|
||||
|
||||
steps:
|
||||
- name: Decide Git ref
|
||||
|
||||
@@ -15,7 +15,7 @@ To build Filament for Android you must also install the following:
|
||||
|
||||
- Android Studio Arctic Fox or more recent
|
||||
- Android SDK
|
||||
- Android NDK "side-by-side" 22.1 or higher
|
||||
- Android NDK "side-by-side" 23.1 or higher
|
||||
|
||||
### Environment variables
|
||||
|
||||
@@ -291,11 +291,11 @@ Alternatively you can build the AAR from the command line by executing the follo
|
||||
`android/` directory:
|
||||
|
||||
```
|
||||
$ ./gradlew -Pfilament_dist_dir=../../out/android-release/filament assembleRelease
|
||||
$ ./gradlew -Pcom.google.android.filament.dist-dir=../../out/android-release/filament assembleRelease
|
||||
```
|
||||
|
||||
The `-Pfilament_dist_dir` can be used to specify a different installation directory (it must match
|
||||
the CMake install prefix used in the previous steps).
|
||||
The `-Pcom.google.android.filament.dist-dir` can be used to specify a different installation
|
||||
directory (it must match the CMake install prefix used in the previous steps).
|
||||
|
||||
#### Using Filament's AAR
|
||||
|
||||
|
||||
@@ -131,27 +131,35 @@ if (WIN32)
|
||||
# __declspec(dllexport) in front of each functions).
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
|
||||
# The CMAKE_CXX_FLAGS vars can be overriden by some Visual Studio generators, so we use an alternative
|
||||
# global method here:
|
||||
if (${USE_STATIC_CRT})
|
||||
set(CRT_FLAGS_RELEASE "/MT")
|
||||
set(CRT_FLAGS_DEBUG "/MTd")
|
||||
add_compile_options(
|
||||
$<$<CONFIG:>:/MT>
|
||||
$<$<CONFIG:Debug>:/MTd>
|
||||
$<$<CONFIG:Release>:/MT>
|
||||
)
|
||||
else()
|
||||
set(CRT_FLAGS_RELEASE "/MD")
|
||||
set(CRT_FLAGS_DEBUG "/MDd")
|
||||
add_compile_options(
|
||||
$<$<CONFIG:>:/MD>
|
||||
$<$<CONFIG:Debug>:/MDd>
|
||||
$<$<CONFIG:Release>:/MD>
|
||||
)
|
||||
endif()
|
||||
|
||||
# TODO: Figure out why pdb generation messes with incremental compilaton.
|
||||
# IN RELEASE_WITH_DEBUG_INFO, generate debug info in .obj, no in pdb.
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CRT_FLAGS_RELEASE} /Z7")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CRT_FLAGS_RELEASE} /Z7")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Z7")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /Z7")
|
||||
|
||||
# In RELEASE, also generate PDBs.
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CRT_FLAGS_RELEASE} /Zi")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CRT_FLAGS_RELEASE} /Zi")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi")
|
||||
|
||||
# In DEBUG, avoid generating a PDB file which seems to mess with incremental compilation.
|
||||
# Instead generate debug info directly inside obj files.
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CRT_FLAGS_DEBUG} /Z7")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CRT_FLAGS_DEBUG} /Z7")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Z7")
|
||||
|
||||
# Special settings when building on CI.
|
||||
if (${FILAMENT_WINDOWS_CI_BUILD})
|
||||
@@ -494,11 +502,15 @@ function(list_licenses OUTPUT MODULES)
|
||||
foreach(module ${_MODULES})
|
||||
set(license_path "../../third_party/${module}/LICENSE")
|
||||
get_filename_component(fullname "${license_path}" ABSOLUTE)
|
||||
string(APPEND CONTENT "${STR_OPENER}License and copyrights for ${module}:\n${STR_CLOSER},\n")
|
||||
file(READ ${license_path} license_long)
|
||||
string(REPLACE "\n" "${STR_CLOSER},\n${STR_OPENER}" license ${license_long})
|
||||
string(APPEND CONTENT ${STR_OPENER}${license}\n${STR_CLOSER},)
|
||||
string(APPEND CONTENT "\n\n")
|
||||
if(EXISTS ${fullname})
|
||||
string(APPEND CONTENT "${STR_OPENER}License and copyrights for ${module}:\n${STR_CLOSER},\n")
|
||||
file(READ ${license_path} license_long)
|
||||
string(REPLACE "\n" "${STR_CLOSER},\n${STR_OPENER}" license ${license_long})
|
||||
string(APPEND CONTENT ${STR_OPENER}${license}\n${STR_CLOSER},)
|
||||
string(APPEND CONTENT "\n\n")
|
||||
else()
|
||||
message(AUTHOR_WARNING "${license_path} not found. You can ignore this warning if you have devendored ${module}.")
|
||||
endif()
|
||||
endforeach()
|
||||
configure_file(${FILAMENT}/build/licenses.inc.in ${OUTPUT})
|
||||
endfunction(list_licenses)
|
||||
@@ -514,7 +526,12 @@ function(combine_static_libs TARGET OUTPUT DEPS)
|
||||
# Loop through the dependent libraries and query their location on disk.
|
||||
set(DEPS_FILES )
|
||||
foreach(DEPENDENCY ${DEPS})
|
||||
list(APPEND DEPS_FILES "$<TARGET_FILE:${DEPENDENCY}>")
|
||||
if(TARGET ${DEPENDENCY})
|
||||
get_property(dep_type TARGET ${DEPENDENCY} PROPERTY TYPE)
|
||||
if(dep_type STREQUAL "STATIC_LIBRARY")
|
||||
list(APPEND DEPS_FILES "$<TARGET_FILE:${DEPENDENCY}>")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
@@ -683,6 +700,7 @@ if (IS_HOST_PLATFORM)
|
||||
add_subdirectory(${TOOLS}/mipgen)
|
||||
add_subdirectory(${TOOLS}/normal-blending)
|
||||
add_subdirectory(${TOOLS}/resgen)
|
||||
add_subdirectory(${TOOLS}/rgb-to-lmsr)
|
||||
add_subdirectory(${TOOLS}/roughness-prefilter)
|
||||
add_subdirectory(${TOOLS}/specular-color)
|
||||
endif()
|
||||
|
||||
13
README.md
13
README.md
@@ -31,7 +31,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.google.android.filament:filament-android:1.12.0'
|
||||
implementation 'com.google.android.filament:filament-android:1.15.0'
|
||||
}
|
||||
```
|
||||
|
||||
@@ -52,7 +52,7 @@ Here are all the libraries available in the group `com.google.android.filament`:
|
||||
iOS projects can use CocoaPods to install the latest release:
|
||||
|
||||
```
|
||||
pod 'Filament', '~> 1.12.0'
|
||||
pod 'Filament', '~> 1.15.0'
|
||||
```
|
||||
|
||||
### Snapshots
|
||||
@@ -128,15 +128,16 @@ steps:
|
||||
- Screen-space ambient occlusion
|
||||
- Screen-space refraction
|
||||
- Global fog
|
||||
- Dynamic resolution
|
||||
- Dynamic resolution (with support for AMD FidelityFX FSR)
|
||||
|
||||
### Post processing
|
||||
|
||||
- HDR bloom
|
||||
- Depth of field bokeh
|
||||
- Multiple tone mappers: ACES, filmic, etc.
|
||||
- Color grading: white balance, channel mixer, shadows/mid-tones/highlights, ASC CDL,
|
||||
contrast, saturation, etc.
|
||||
- Multiple tone mappers: generic (customizable), ACES, filmic, etc.
|
||||
- Color and tone management: luminance scaling, gamut mapping
|
||||
- Color grading: exposure, night adaptation, white balance, channel mixer,
|
||||
shadows/mid-tones/highlights, ASC CDL, contrast, saturation, etc.
|
||||
- TAA, FXAA, MSAA
|
||||
- Screen-space lens flares
|
||||
|
||||
|
||||
117
RELEASE_NOTES.md
117
RELEASE_NOTES.md
@@ -3,7 +3,122 @@
|
||||
This file contains one line summaries of commits that are worthy of mentioning in release notes.
|
||||
A new header is inserted each time a *tag* is created.
|
||||
|
||||
## v1.12.1 (currently main branch)
|
||||
## v1.15.0 (currently main branch)
|
||||
|
||||
- engine: Fix spotlights normal bias calculation [⚠️ **Material breakage**].
|
||||
- libimage: Fix loading spherical harmonics on certain locals.
|
||||
|
||||
## v1.14.2
|
||||
|
||||
- Metal: Fix validation error when rendering to `RenderTarget` without depth attachment.
|
||||
- engine: Fix rendering glitch with zero-scale bone transforms.
|
||||
|
||||
## v1.14.1
|
||||
|
||||
- engine: Improvements to shadowing.
|
||||
|
||||
## v1.14.0
|
||||
|
||||
- engine: Internal materials can use structures as parameters [⚠️ **Material breakage**].
|
||||
- engine: `readPixels` on a `SwapChain` must be called within `beginFrame` / `endFrame` [⚠️ **API
|
||||
Change**].
|
||||
- engine: Fix normal bias and improve spotlight quality.
|
||||
- Java: Fix shadow biases.
|
||||
|
||||
## v1.13.0
|
||||
|
||||
- Android: Gradle configuration caching is now enabled.
|
||||
- Android: Filament's Gradle properties have all been renamed to `com.google.android.filament.xxx`
|
||||
where `xxx` is the property name. See `android/build.gradle` for a complete list [⚠️]
|
||||
- Android: The Gradle property `filament_tools_dir` (now called
|
||||
`com.google.android.filament.tools-dir`) does not have a default value anymore. Please specify one
|
||||
in your `gradle.properties` if you reuse the Gradle plugin in your projects [⚠️]
|
||||
- engine: Fix spotlights direction and falloff [⚠️ **Material breakage**].
|
||||
- engine: Improvements to VSM and spotlight shadows.
|
||||
|
||||
## v1.12.11
|
||||
|
||||
- Metal: Color grading performance improvement on M1 devices.
|
||||
- samples: Fix glitchy animation seen in gltf-viewer iOS sample.
|
||||
|
||||
## v1.12.10
|
||||
|
||||
- engine: rewrite dynamic resolution scaling controller for better accuracy and less jittering.
|
||||
- Java: fix missing ASTC texture enum.
|
||||
- tools: Fix normal map issues in mipgen.
|
||||
- WebGL: expose some `SurfaceOrientation` functions.
|
||||
|
||||
## v1.12.9
|
||||
|
||||
- engine: New API: `MultiSampleAntiAliasingOptions` and HDR-aware MSAA resolve. When `customResolve`
|
||||
is enabled, improves anti-aliasing quality [**NEW API**].
|
||||
- engine: Fixes and improvements for FSR.
|
||||
- engine: All APIs that take a callback as argument now also take a `CallbackHandler*`, a new
|
||||
interface that provides more flexibility around callback dispatch [**NEW API**].
|
||||
- Android: Fix JNI bindings for `DepthOfFieldOptions`.
|
||||
- Android: workarounds for Adreno-specific fraembuffer issue.
|
||||
- JavaScript: updates to JS bindings.
|
||||
|
||||
## v1.12.8
|
||||
|
||||
- engine: Added picking API to `View` [⚠️ **Materials need to be rebuilt to access this new feature**].
|
||||
- engine: A new `Engine::pumpMessageQueues()` method can be used to trigger all pending user
|
||||
callbacks right away [**NEW API**].
|
||||
- engine: new inline helpers to more easily use lambdas, functors and method callbacks with
|
||||
`{Pixel}BufferDescriptor`.
|
||||
- Vulkan: fix vertical offset for `readPixels`.
|
||||
- Vulkan: various internal improvements.
|
||||
- Metal: support integer formats with `readPixels`.
|
||||
|
||||
## v1.12.7
|
||||
|
||||
- engine: Fix, apply emissive after shadowing.
|
||||
|
||||
## v1.12.6
|
||||
|
||||
- engine: Added concept of lod bias to materials.
|
||||
[⚠️ **Materials need to be rebuilt to access this new feature**].
|
||||
- engine: Fix, BGRA ordering respected for external images with OpenGL on iOS.
|
||||
- engine: Use more sensible defaults for spot light inner outer cone angles.
|
||||
- engine: Fix potential race condition that caused stalls in `endFrame`.
|
||||
- gltfio: Improved handling of transparent materials.
|
||||
- Metal: Fix potential crash on earlier versions of iOS (<= 13.0).
|
||||
- Android: Fix `filament-utils-android` 'lite' flavor.
|
||||
- Java: Fix potential crash with `IBLPrefilter`.
|
||||
|
||||
## v1.12.5
|
||||
|
||||
- engine: work around a job scheduling issue in `endFrame` that caused stuttering on some Android
|
||||
devices.
|
||||
|
||||
## v1.12.4
|
||||
|
||||
- engine: New night adaptation API on `ColorGrading`. This API can be used to create an effect that
|
||||
that simulates color and brightness shifts in human vision in low-light conditions.
|
||||
- engine: improved performance of AMD FidelityFX FSR1 by 4.6x, it now runs in about 2ms in 4K.
|
||||
- engine: Dynamic resolution quality `MEDIUM`, `HIGH` and `ULTRA` now all use AMD FidelityFX FSR1.
|
||||
- engine: Fix crash when duplicating material instances.
|
||||
- gltfio: generate tangents if requested by the material.
|
||||
|
||||
## v1.12.3
|
||||
|
||||
- engine: Support AMD FidelityFX Super Resolution for dynamic resolution scaling
|
||||
|
||||
## v1.12.2
|
||||
|
||||
- engine: New API on `ColorGrading` to enable or disable gamut mapping at will [**New API**].
|
||||
- engine: Fix typo causing ShadowOptions::shadowFar to not work properly.
|
||||
- engine: Fix, CSM glitch when using shadowMultiplier materials.
|
||||
- engine: Improve precision when computing camera projection.
|
||||
- engine: Increase the number of supported spot shadows to 14 (from 6).
|
||||
- Metal: Add texture swizzling support for external textures.
|
||||
|
||||
## v1.12.1
|
||||
|
||||
- engine: `double` precision translation support in TransformManager. Disabled by default.
|
||||
Augment model (and view) matrix on `Camera` to accept double precision matrices. When enabled,
|
||||
double precision translations allow filament to handle a very large world space [**New API**].
|
||||
- engine: Fix, Views with custom render targets are now blendable.
|
||||
|
||||
## v1.12.0
|
||||
|
||||
|
||||
@@ -122,20 +122,20 @@ The Gradle project used to generate the AAR is located at `<filament>\android`.
|
||||
|
||||
```
|
||||
cd android
|
||||
gradlew -Pfilament_dist_dir=..\out\android-release\filament assembleRelease
|
||||
gradlew -Pcom.google.android.filament.dist-dir=..\out\android-release\filament assembleRelease
|
||||
copy filament-android\build\outputs\aar\filament-android-release.aar ..\..\out\
|
||||
```
|
||||
|
||||
If you're only interested in building for a single ABI, you'll need to pass a `filament_abis` parameter:
|
||||
If you're only interested in building for a single ABI, you'll need to pass a `com.google.android.filament.abis` parameter:
|
||||
|
||||
```
|
||||
gradlew -Pfilament_dist_dir=..\out\android-release\filament assembleRelease -Pfilament_abis=x86
|
||||
gradlew -Pcom.google.android.filament.dist-dir=..\out\android-release\filament assembleRelease -Pcom.google.android.filament.abis=x86
|
||||
```
|
||||
|
||||
If you're only interested in building SDK, you may skip samples build by passing a `filament_skip_samples` flag:
|
||||
If you're only interested in building SDK, you may skip samples build by passing a `com.google.android.filament.skip-samples` flag:
|
||||
|
||||
```
|
||||
gradlew -Pfilament_dist_dir=..\out\android-release\filament assembleRelease -Pfilament_skip_samples
|
||||
gradlew -Pcom.google.android.filament.dist-dir=..\out\android-release\filament assembleRelease -Pfilament_skip_samples
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
// This script accepts the following parameters:
|
||||
//
|
||||
// filament_dist_dir
|
||||
// com.google.android.filament.dist-dir
|
||||
// Path to the Filament distribution/install directory for Android
|
||||
// (produced by make/ninja install). This directory must contain lib/arm64-v8a/ etc.
|
||||
//
|
||||
// filament_tools_dir
|
||||
// com.google.android.filament.tools-dir
|
||||
// Path to the Filament distribution/install directory for desktop.
|
||||
// This directory must contain bin/matc.
|
||||
//
|
||||
// filament_exclude_vulkan
|
||||
// com.google.android.filament.exclude-vulkan
|
||||
// When set, support for Vulkan will be excluded.
|
||||
//
|
||||
// filament_skip_samples
|
||||
// com.google.android.filament.skip-samples
|
||||
// Exclude samples from the project. Useful to speed up compilation.
|
||||
//
|
||||
// filament_abis
|
||||
// com.google.android.filament.abis
|
||||
// List of supported ABIs to build as a comma separated list. Available options are:
|
||||
// arm64-v8a, armeabi-v7a, x86_64, x86, all
|
||||
// Defaults to all.
|
||||
//
|
||||
// Example:
|
||||
// ./gradlew -Pfilament_dist_dir=../dist-android-release assembleRelease -Pfilament_abis=x86
|
||||
// ./gradlew -Pcom.google.android.filament.dist-dir=../dist-android-release \
|
||||
// -Pcom.google.android.filament.abis=x86 \
|
||||
// assembleRelease
|
||||
|
||||
// Publishing to Maven Central:
|
||||
// - Build and upload artifacts with ./gradlew publish
|
||||
@@ -40,44 +42,53 @@
|
||||
//
|
||||
|
||||
buildscript {
|
||||
def filamentPath = file("../out/android-release/filament").absolutePath
|
||||
if (project.hasProperty("filament_dist_dir")) {
|
||||
filamentPath = file(project.property("filament_dist_dir")).absolutePath
|
||||
}
|
||||
def path = providers
|
||||
.gradleProperty("com.google.android.filament.dist-dir")
|
||||
.forUseAtConfigurationTime().get()
|
||||
|
||||
def directory = objects.fileProperty().fileValue(new File(path)).getAsFile().get()
|
||||
def filamentPath = directory.absolutePath
|
||||
|
||||
// Our CMake scripts require a forward-slash path for the FILAMENT_DIST_DIR
|
||||
// variable, so here we convert the native path to a forward-slash path.
|
||||
filamentPath = filamentPath.replace(File.separator, '/')
|
||||
|
||||
// Warning: changing this property does not work well with incremental builds.
|
||||
def excludeVulkan = project.hasProperty("filament_exclude_vulkan")
|
||||
def excludeVulkan = providers
|
||||
.gradleProperty("com.google.android.filament.exclude-vulkan")
|
||||
.forUseAtConfigurationTime()
|
||||
.isPresent()
|
||||
|
||||
def abis = ["arm64-v8a", "armeabi-v7a", "x86_64", "x86"]
|
||||
if (project.hasProperty("filament_abis")) {
|
||||
def newAbis = project.property("filament_abis").split(',')
|
||||
if (!newAbis.contains("all")) {
|
||||
abis = newAbis
|
||||
}
|
||||
def newAbis = providers
|
||||
.gradleProperty("com.google.android.filament.abis")
|
||||
.forUseAtConfigurationTime()
|
||||
.get()
|
||||
.split(',')
|
||||
if (!newAbis.contains("all")) {
|
||||
abis = newAbis
|
||||
}
|
||||
|
||||
ext.versions = [
|
||||
'minSdk': 19,
|
||||
'targetSdk': 30,
|
||||
'compileSdk': 30,
|
||||
'kotlin': '1.5.21',
|
||||
'buildTools': '30.0.3',
|
||||
'ndk': '22.1.7171670'
|
||||
'targetSdk': 31,
|
||||
'compileSdk': 31,
|
||||
'kotlin': '1.6.0',
|
||||
'buildTools': '31.0.0',
|
||||
'ndk': '23.1.7779620'
|
||||
]
|
||||
|
||||
ext.deps = [
|
||||
'androidx': [
|
||||
'annotations': "androidx.annotation:annotation:1.1.0",
|
||||
'annotations': "androidx.annotation:annotation:1.3.0",
|
||||
'core': "androidx.core:core:1.3.0",
|
||||
],
|
||||
'kotlin': "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}"
|
||||
]
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.0'
|
||||
// NOTE: See TODO in gradle.properties once we move to Gradle 7.2
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
|
||||
}
|
||||
|
||||
@@ -118,7 +129,7 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'io.codearte.nexus-staging' version '0.22.0'
|
||||
id 'io.codearte.nexus-staging' version '0.30.0'
|
||||
}
|
||||
|
||||
// Nexus Staging configuration
|
||||
@@ -187,7 +198,8 @@ subprojects {
|
||||
gradle.taskGraph.whenReady {
|
||||
gradle.taskGraph.allTasks.each {
|
||||
it.onlyIf {
|
||||
!it.project.ext.has('isSample') || !project.hasProperty('filament_skip_samples')
|
||||
!it.project.ext.has('isSample') ||
|
||||
!project.hasProperty('com.google.android.filament.skip-samples')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
|
||||
plugins {
|
||||
id 'groovy-gradle-plugin'
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
create("filament-tools-plugin") {
|
||||
id = "filament-tools-plugin"
|
||||
implementationClass = "FilamentToolsPlugin"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
// This plugin accepts the following parameters:
|
||||
//
|
||||
// filament_tools_dir
|
||||
// com.google.android.filament.tools-dir
|
||||
// Path to the Filament distribution/install directory for desktop.
|
||||
// This directory must contain bin/matc.
|
||||
//
|
||||
// filament_exclude_vulkan
|
||||
// com.google.android.filament.exclude-vulkan
|
||||
// When set, support for Vulkan will be excluded.
|
||||
//
|
||||
// Example:
|
||||
// ./gradlew -Pfilament_tools_dir=../../dist-release assembleDebug
|
||||
// ./gradlew -Pcom.google.android.filament.tools-dir=../../dist-release assembleDebug
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.GradleException
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.provider.ProviderFactory
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.file.FileSystemOperations
|
||||
import org.gradle.api.file.FileType
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.logging.LogLevel
|
||||
@@ -27,14 +29,18 @@ import org.gradle.api.tasks.Optional
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.api.tasks.incremental.InputFileDetails
|
||||
import org.gradle.api.model.ObjectFactory
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
import org.gradle.process.ExecOperations
|
||||
import org.gradle.work.ChangeType
|
||||
import org.gradle.work.Incremental
|
||||
import org.gradle.work.InputChanges
|
||||
|
||||
import java.nio.file.Paths
|
||||
|
||||
class TaskWithBinary extends DefaultTask {
|
||||
import javax.inject.Inject
|
||||
|
||||
abstract class TaskWithBinary extends DefaultTask {
|
||||
private final String binaryName
|
||||
private Property<String> binaryPath = null
|
||||
|
||||
@@ -42,15 +48,23 @@ class TaskWithBinary extends DefaultTask {
|
||||
binaryName = name
|
||||
}
|
||||
|
||||
@Inject abstract ObjectFactory getObjects()
|
||||
@Inject abstract ProviderFactory getProviders()
|
||||
|
||||
@Input
|
||||
Property<String> getBinary() {
|
||||
if (binaryPath == null) {
|
||||
def tool = ["/bin/${binaryName}.exe", "/bin/${binaryName}"]
|
||||
def fullPath = tool.collect { path ->
|
||||
Paths.get(project.ext.filamentToolsPath.absolutePath, path).toFile()
|
||||
def filamentToolsPath = providers
|
||||
.gradleProperty("com.google.android.filament.tools-dir")
|
||||
.forUseAtConfigurationTime().get()
|
||||
def directory = objects.fileProperty()
|
||||
.fileValue(new File(filamentToolsPath)).getAsFile().get()
|
||||
Paths.get(directory.absolutePath, path).toFile()
|
||||
}
|
||||
|
||||
binaryPath = project.objects.property(String.class)
|
||||
binaryPath = objects.property(String.class)
|
||||
binaryPath.set(
|
||||
(OperatingSystem.current().isWindows() ? fullPath[0] : fullPath[1]).toString())
|
||||
}
|
||||
@@ -84,6 +98,11 @@ abstract class MaterialCompiler extends TaskWithBinary {
|
||||
@OutputDirectory
|
||||
abstract DirectoryProperty getOutputDir()
|
||||
|
||||
@Inject abstract FileSystemOperations getFs()
|
||||
@Inject abstract ExecOperations getExec()
|
||||
@Inject abstract ObjectFactory getObjects()
|
||||
@Inject abstract ProviderFactory getProviders()
|
||||
|
||||
MaterialCompiler() {
|
||||
super("matc")
|
||||
}
|
||||
@@ -91,7 +110,9 @@ abstract class MaterialCompiler extends TaskWithBinary {
|
||||
@TaskAction
|
||||
void execute(InputChanges inputs) {
|
||||
if (!inputs.incremental) {
|
||||
project.delete(project.fileTree(outputDir.asFile.get()).matching { include '*.filamat' })
|
||||
fs.delete({
|
||||
delete(objects.fileTree().from(outputDir).matching { include '*.filamat' })
|
||||
})
|
||||
}
|
||||
|
||||
inputs.getFileChanges(inputDir).each { InputFileDetails change ->
|
||||
@@ -115,12 +136,15 @@ abstract class MaterialCompiler extends TaskWithBinary {
|
||||
}
|
||||
|
||||
def matcArgs = []
|
||||
if (!project.hasProperty("filament_exclude_vulkan")) {
|
||||
def exclude_vulkan = providers
|
||||
.gradleProperty("com.google.android.filament.exclude-vulkan")
|
||||
.forUseAtConfigurationTime().present
|
||||
if (!exclude_vulkan) {
|
||||
matcArgs += ['-a', 'vulkan']
|
||||
}
|
||||
matcArgs += ['-a', 'opengl', '-p', 'mobile', '-o', getOutputFile(file), file]
|
||||
|
||||
project.exec {
|
||||
exec.exec {
|
||||
standardOutput out
|
||||
errorOutput err
|
||||
executable "${binary.get()}"
|
||||
@@ -149,6 +173,10 @@ abstract class IblGenerator extends TaskWithBinary {
|
||||
@OutputDirectory
|
||||
abstract DirectoryProperty getOutputDir()
|
||||
|
||||
@Inject abstract FileSystemOperations getFs()
|
||||
@Inject abstract ExecOperations getExec()
|
||||
@Inject abstract ObjectFactory getObjects()
|
||||
|
||||
IblGenerator() {
|
||||
super("cmgen")
|
||||
}
|
||||
@@ -156,7 +184,9 @@ abstract class IblGenerator extends TaskWithBinary {
|
||||
@TaskAction
|
||||
void execute(InputChanges inputs) {
|
||||
if (!inputs.incremental) {
|
||||
project.delete(project.fileTree(outputDir.asFile.get()).matching { include '*' })
|
||||
fs.delete({
|
||||
delete(objects.fileTree().from(outputDir).matching { include '*' })
|
||||
})
|
||||
}
|
||||
|
||||
inputs.getFileChanges(inputFile).each { InputFileDetails change ->
|
||||
@@ -188,7 +218,7 @@ abstract class IblGenerator extends TaskWithBinary {
|
||||
}
|
||||
commandArgs = commandArgs + " " + file
|
||||
|
||||
project.exec {
|
||||
exec.exec {
|
||||
standardOutput out
|
||||
errorOutput err
|
||||
executable "${binary.get()}"
|
||||
@@ -213,6 +243,9 @@ abstract class MeshCompiler extends TaskWithBinary {
|
||||
@OutputDirectory
|
||||
abstract DirectoryProperty getOutputDir()
|
||||
|
||||
@Inject abstract FileSystemOperations getFs()
|
||||
@Inject abstract ExecOperations getExec()
|
||||
|
||||
MeshCompiler() {
|
||||
super("filamesh")
|
||||
}
|
||||
@@ -220,7 +253,9 @@ abstract class MeshCompiler extends TaskWithBinary {
|
||||
@TaskAction
|
||||
void execute(InputChanges inputs) {
|
||||
if (!inputs.incremental) {
|
||||
project.delete(project.fileTree(outputDir.asFile.get()).matching { include '*.filamesh' })
|
||||
fs.delete({
|
||||
delete(objects.fileTree().from(outputDir).matching { include '*.filamesh' })
|
||||
})
|
||||
}
|
||||
|
||||
inputs.getFileChanges(inputFile).each { InputFileDetails change ->
|
||||
@@ -243,7 +278,7 @@ abstract class MeshCompiler extends TaskWithBinary {
|
||||
" Ensure Filament has been built/installed before building this app.")
|
||||
}
|
||||
|
||||
project.exec {
|
||||
exec.exec {
|
||||
standardOutput out
|
||||
errorOutput err
|
||||
executable "${binary.get()}"
|
||||
@@ -280,11 +315,6 @@ class FilamentToolsPlugin implements Plugin<Project> {
|
||||
extension.meshInputFile = project.objects.fileProperty()
|
||||
extension.meshOutputDir = project.objects.directoryProperty()
|
||||
|
||||
project.ext.filamentToolsPath = project.file("../../../out/release/filament")
|
||||
if (project.hasProperty("filament_tools_dir")) {
|
||||
project.ext.filamentToolsPath = project.file(project.property("filament_tools_dir"))
|
||||
}
|
||||
|
||||
project.tasks.register("filamentCompileMaterials", MaterialCompiler) {
|
||||
enabled =
|
||||
extension.materialInputDir.isPresent() &&
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
|
||||
#include "CallbackUtils.h"
|
||||
|
||||
#include "private/backend/VirtualMachineEnv.h"
|
||||
|
||||
void acquireCallbackJni(JNIEnv* env, CallbackJni& callbackUtils) {
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
callbackUtils.handlerClass = env->FindClass("android/os/Handler");
|
||||
callbackUtils.handlerClass = (jclass) env->NewGlobalRef(callbackUtils.handlerClass);
|
||||
callbackUtils.post = env->GetMethodID(callbackUtils.handlerClass,
|
||||
@@ -32,7 +34,7 @@ void acquireCallbackJni(JNIEnv* env, CallbackJni& callbackUtils) {
|
||||
|
||||
void releaseCallbackJni(JNIEnv* env, CallbackJni callbackUtils, jobject handler, jobject callback) {
|
||||
if (handler && callback) {
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
if (env->IsInstanceOf(handler, callbackUtils.handlerClass)) {
|
||||
env->CallBooleanMethod(handler, callbackUtils.post, callback);
|
||||
}
|
||||
@@ -43,59 +45,12 @@ void releaseCallbackJni(JNIEnv* env, CallbackJni callbackUtils, jobject handler,
|
||||
}
|
||||
env->DeleteGlobalRef(handler);
|
||||
env->DeleteGlobalRef(callback);
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
env->DeleteGlobalRef(callbackUtils.handlerClass);
|
||||
#endif
|
||||
env->DeleteGlobalRef(callbackUtils.executorClass);
|
||||
}
|
||||
|
||||
JniBufferCallback* JniBufferCallback::make(filament::Engine* engine,
|
||||
JNIEnv* env, jobject handler, jobject callback, AutoBuffer&& buffer) {
|
||||
return new JniBufferCallback(env, handler, callback, std::move(buffer));
|
||||
}
|
||||
|
||||
JniBufferCallback::JniBufferCallback(JNIEnv* env, jobject handler, jobject callback,
|
||||
AutoBuffer&& buffer)
|
||||
: mEnv(env)
|
||||
, mHandler(env->NewGlobalRef(handler))
|
||||
, mCallback(env->NewGlobalRef(callback))
|
||||
, mBuffer(std::move(buffer)) {
|
||||
acquireCallbackJni(env, mCallbackUtils);
|
||||
}
|
||||
|
||||
JniBufferCallback::~JniBufferCallback() {
|
||||
releaseCallbackJni(mEnv, mCallbackUtils, mHandler, mCallback);
|
||||
}
|
||||
|
||||
void JniBufferCallback::invoke(void*, size_t, void* user) {
|
||||
JniBufferCallback* data = reinterpret_cast<JniBufferCallback*>(user);
|
||||
delete data;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
|
||||
JniImageCallback* JniImageCallback::make(filament::Engine* engine,
|
||||
JNIEnv* env, jobject handler, jobject callback, long image) {
|
||||
return new JniImageCallback(env, handler, callback, image);
|
||||
}
|
||||
|
||||
JniImageCallback::JniImageCallback(JNIEnv* env, jobject handler, jobject callback, long image)
|
||||
: mEnv(env)
|
||||
, mHandler(env->NewGlobalRef(handler))
|
||||
, mCallback(env->NewGlobalRef(callback))
|
||||
, mImage(image) {
|
||||
acquireCallbackJni(env, mCallbackUtils);
|
||||
}
|
||||
|
||||
JniImageCallback::~JniImageCallback() {
|
||||
releaseCallbackJni(mEnv, mCallbackUtils, mHandler, mCallback);
|
||||
}
|
||||
|
||||
void JniImageCallback::invoke(void*, void* user) {
|
||||
JniImageCallback* data = reinterpret_cast<JniImageCallback*>(user);
|
||||
delete data;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
|
||||
JniCallback* JniCallback::make(JNIEnv* env, jobject handler, jobject callback) {
|
||||
@@ -103,17 +58,65 @@ JniCallback* JniCallback::make(JNIEnv* env, jobject handler, jobject callback) {
|
||||
}
|
||||
|
||||
JniCallback::JniCallback(JNIEnv* env, jobject handler, jobject callback)
|
||||
: mEnv(env)
|
||||
, mHandler(env->NewGlobalRef(handler))
|
||||
, mCallback(env->NewGlobalRef(callback)) {
|
||||
: mHandler(env->NewGlobalRef(handler)),
|
||||
mCallback(env->NewGlobalRef(callback)) {
|
||||
acquireCallbackJni(env, mCallbackUtils);
|
||||
}
|
||||
|
||||
JniCallback::~JniCallback() {
|
||||
releaseCallbackJni(mEnv, mCallbackUtils, mHandler, mCallback);
|
||||
JniCallback::~JniCallback() = default;
|
||||
|
||||
void JniCallback::post(void* user, filament::backend::CallbackHandler::Callback callback) {
|
||||
callback(user);
|
||||
}
|
||||
|
||||
void JniCallback::invoke(void* user) {
|
||||
JniCallback* data = reinterpret_cast<JniCallback*>(user);
|
||||
delete data;
|
||||
void JniCallback::postToJavaAndDestroy(JniCallback* callback) {
|
||||
JNIEnv* env = filament::VirtualMachineEnv::get().getEnvironment();
|
||||
releaseCallbackJni(env, callback->mCallbackUtils, callback->mHandler, callback->mCallback);
|
||||
delete callback;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
|
||||
JniBufferCallback* JniBufferCallback::make(filament::Engine*,
|
||||
JNIEnv* env, jobject handler, jobject callback, AutoBuffer&& buffer) {
|
||||
return new JniBufferCallback(env, handler, callback, std::move(buffer));
|
||||
}
|
||||
|
||||
JniBufferCallback::JniBufferCallback(JNIEnv* env, jobject handler, jobject callback,
|
||||
AutoBuffer&& buffer)
|
||||
: JniCallback(env, handler, callback),
|
||||
mBuffer(std::move(buffer)) {
|
||||
acquireCallbackJni(env, mCallbackUtils);
|
||||
}
|
||||
|
||||
JniBufferCallback::~JniBufferCallback() = default;
|
||||
|
||||
void JniBufferCallback::postToJavaAndDestroy(void*, size_t, void* user) {
|
||||
JniBufferCallback* callback = (JniBufferCallback*)user;
|
||||
JNIEnv* env = filament::VirtualMachineEnv::get().getEnvironment();
|
||||
callback->mBuffer.attachToJniThread(env);
|
||||
releaseCallbackJni(env, callback->mCallbackUtils, callback->mHandler, callback->mCallback);
|
||||
delete callback;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
|
||||
JniImageCallback* JniImageCallback::make(filament::Engine*,
|
||||
JNIEnv* env, jobject handler, jobject callback, long image) {
|
||||
return new JniImageCallback(env, handler, callback, image);
|
||||
}
|
||||
|
||||
JniImageCallback::JniImageCallback(JNIEnv* env, jobject handler, jobject callback, long image)
|
||||
: JniCallback(env, handler, callback),
|
||||
mImage(image) {
|
||||
acquireCallbackJni(env, mCallbackUtils);
|
||||
}
|
||||
|
||||
JniImageCallback::~JniImageCallback() = default;
|
||||
|
||||
void JniImageCallback::postToJavaAndDestroy(void*, void* user) {
|
||||
JniImageCallback* callback = (JniImageCallback*)user;
|
||||
JNIEnv* env = filament::VirtualMachineEnv::get().getEnvironment();
|
||||
releaseCallbackJni(env, callback->mCallbackUtils, callback->mHandler, callback->mCallback);
|
||||
delete callback;
|
||||
}
|
||||
|
||||
@@ -18,13 +18,14 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "common/CallbackUtils.h"
|
||||
#include "common/NioUtils.h"
|
||||
|
||||
#include <backend/CallbackHandler.h>
|
||||
|
||||
#include <filament/Engine.h>
|
||||
|
||||
struct CallbackJni {
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
jclass handlerClass = nullptr;
|
||||
jmethodID post = nullptr;
|
||||
#endif
|
||||
@@ -35,57 +36,49 @@ struct CallbackJni {
|
||||
void acquireCallbackJni(JNIEnv* env, CallbackJni& callbackUtils);
|
||||
void releaseCallbackJni(JNIEnv* env, CallbackJni callbackUtils, jobject handler, jobject callback);
|
||||
|
||||
struct JniBufferCallback {
|
||||
struct JniCallback : private filament::backend::CallbackHandler {
|
||||
JniCallback(JniCallback const &) = delete;
|
||||
JniCallback(JniCallback&&) = delete;
|
||||
|
||||
static JniCallback* make(JNIEnv* env, jobject handler, jobject runnable);
|
||||
|
||||
static void postToJavaAndDestroy(JniCallback* callback);
|
||||
|
||||
void post(void* user, Callback callback) override;
|
||||
|
||||
filament::backend::CallbackHandler* getHandler() noexcept { return this; }
|
||||
|
||||
jobject getCallbackObject() { return mCallback; }
|
||||
|
||||
protected:
|
||||
JniCallback(JNIEnv* env, jobject handler, jobject runnable);
|
||||
virtual ~JniCallback();
|
||||
jobject mHandler;
|
||||
jobject mCallback;
|
||||
CallbackJni mCallbackUtils;
|
||||
};
|
||||
|
||||
|
||||
struct JniBufferCallback : public JniCallback {
|
||||
static JniBufferCallback* make(filament::Engine* engine,
|
||||
JNIEnv* env, jobject handler, jobject callback, AutoBuffer&& buffer);
|
||||
|
||||
static void invoke(void* buffer, size_t n, void* user);
|
||||
static void postToJavaAndDestroy(void*, size_t, void* user);
|
||||
|
||||
private:
|
||||
JniBufferCallback(JNIEnv* env, jobject handler, jobject callback, AutoBuffer&& buffer);
|
||||
JniBufferCallback(JniBufferCallback const &) = delete;
|
||||
JniBufferCallback(JniBufferCallback&&) = delete;
|
||||
~JniBufferCallback();
|
||||
|
||||
JNIEnv* mEnv;
|
||||
jobject mHandler;
|
||||
jobject mCallback;
|
||||
virtual ~JniBufferCallback();
|
||||
AutoBuffer mBuffer;
|
||||
CallbackJni mCallbackUtils;
|
||||
};
|
||||
|
||||
struct JniImageCallback {
|
||||
struct JniImageCallback : public JniCallback {
|
||||
static JniImageCallback* make(filament::Engine* engine, JNIEnv* env, jobject handler,
|
||||
jobject runnable, long image);
|
||||
|
||||
static void invoke(void* image, void* user);
|
||||
static void postToJavaAndDestroy(void*, void* user);
|
||||
|
||||
private:
|
||||
JniImageCallback(JNIEnv* env, jobject handler, jobject runnable, long image);
|
||||
JniImageCallback(JniImageCallback const &) = delete;
|
||||
JniImageCallback(JniImageCallback&&) = delete;
|
||||
~JniImageCallback();
|
||||
|
||||
JNIEnv* mEnv;
|
||||
jobject mHandler;
|
||||
jobject mCallback;
|
||||
virtual ~JniImageCallback();
|
||||
long mImage;
|
||||
CallbackJni mCallbackUtils;
|
||||
};
|
||||
|
||||
struct JniCallback {
|
||||
static JniCallback* make(JNIEnv* env, jobject handler, jobject runnable);
|
||||
|
||||
static void invoke(void* user);
|
||||
|
||||
private:
|
||||
JniCallback(JNIEnv* env, jobject handler, jobject runnable);
|
||||
JniCallback(JniCallback const &) = delete;
|
||||
JniCallback(JniCallback&&) = delete;
|
||||
~JniCallback();
|
||||
|
||||
JNIEnv* mEnv;
|
||||
jobject mHandler;
|
||||
jobject mCallback;
|
||||
CallbackJni mCallbackUtils;
|
||||
};
|
||||
|
||||
@@ -38,6 +38,10 @@ public:
|
||||
AutoBuffer(AutoBuffer&& rhs) noexcept;
|
||||
~AutoBuffer() noexcept;
|
||||
|
||||
void attachToJniThread(JNIEnv* env) noexcept {
|
||||
mEnv = env;
|
||||
}
|
||||
|
||||
void* getData() const noexcept {
|
||||
return mUserData;
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ target_link_libraries(filament-jni
|
||||
target_include_directories(filament-jni PRIVATE
|
||||
..
|
||||
${FILAMENT_DIR}/include
|
||||
../../filament/backend/include
|
||||
../../third_party/robin-map
|
||||
../../libs/utils/include)
|
||||
|
||||
|
||||
@@ -91,7 +91,8 @@ Java_com_google_android_filament_BufferObject_nSetBuffer(JNIEnv *env, jclass typ
|
||||
|
||||
auto* callback = JniBufferCallback::make(engine, env, handler, runnable, std::move(nioBuffer));
|
||||
|
||||
BufferDescriptor desc(data, sizeInBytes, &JniBufferCallback::invoke, callback);
|
||||
BufferDescriptor desc(data, sizeInBytes,
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
bufferObject->setBuffer(*engine, std::move(desc), (uint32_t) destOffsetInBytes);
|
||||
|
||||
|
||||
@@ -102,10 +102,19 @@ Java_com_google_android_filament_Camera_nSetModelMatrix(JNIEnv *env, jclass,
|
||||
jlong nativeCamera, jfloatArray in_) {
|
||||
Camera* camera = (Camera *) nativeCamera;
|
||||
jfloat *in = env->GetFloatArrayElements(in_, NULL);
|
||||
camera->setModelMatrix(*reinterpret_cast<const filament::math::mat4f*>(in));
|
||||
camera->setModelMatrix((math::mat4)*reinterpret_cast<const filament::math::mat4f*>(in));
|
||||
env->ReleaseFloatArrayElements(in_, in, JNI_ABORT);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_Camera_nSetModelMatrixFp64(JNIEnv *env, jclass,
|
||||
jlong nativeCamera, jdoubleArray in_) {
|
||||
Camera* camera = (Camera *) nativeCamera;
|
||||
jdouble *in = env->GetDoubleArrayElements(in_, NULL);
|
||||
camera->setModelMatrix(*reinterpret_cast<const filament::math::mat4*>(in));
|
||||
env->ReleaseDoubleArrayElements(in_, in, JNI_ABORT);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_Camera_nGetProjectionMatrix(JNIEnv *env, jclass,
|
||||
jlong nativeCamera, jdoubleArray out_) {
|
||||
@@ -141,21 +150,41 @@ Java_com_google_android_filament_Camera_nGetModelMatrix(JNIEnv *env, jclass,
|
||||
jlong nativeCamera, jfloatArray out_) {
|
||||
Camera *camera = (Camera *) nativeCamera;
|
||||
jfloat *out = env->GetFloatArrayElements(out_, NULL);
|
||||
const filament::math::mat4f& m = camera->getModelMatrix();
|
||||
const filament::math::mat4f& m = (math::mat4f)camera->getModelMatrix();
|
||||
std::copy_n(&m[0][0], 16, out);
|
||||
env->ReleaseFloatArrayElements(out_, out, 0);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_Camera_nGetModelMatrixFp64(JNIEnv *env, jclass,
|
||||
jlong nativeCamera, jdoubleArray out_) {
|
||||
Camera *camera = (Camera *) nativeCamera;
|
||||
jdouble *out = env->GetDoubleArrayElements(out_, NULL);
|
||||
const filament::math::mat4& m = camera->getModelMatrix();
|
||||
std::copy_n(&m[0][0], 16, out);
|
||||
env->ReleaseDoubleArrayElements(out_, out, 0);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_Camera_nGetViewMatrix(JNIEnv *env, jclass, jlong nativeCamera,
|
||||
jfloatArray out_) {
|
||||
Camera *camera = (Camera *) nativeCamera;
|
||||
jfloat *out = env->GetFloatArrayElements(out_, NULL);
|
||||
const filament::math::mat4f& m = camera->getViewMatrix();
|
||||
const filament::math::mat4f& m = (math::mat4f)camera->getViewMatrix();
|
||||
std::copy_n(&m[0][0], 16, out);
|
||||
env->ReleaseFloatArrayElements(out_, out, 0);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_Camera_nGetViewMatrixFp64(JNIEnv *env, jclass, jlong nativeCamera,
|
||||
jdoubleArray out_) {
|
||||
Camera *camera = (Camera *) nativeCamera;
|
||||
jdouble *out = env->GetDoubleArrayElements(out_, NULL);
|
||||
const filament::math::mat4& m = camera->getViewMatrix();
|
||||
std::copy_n(&m[0][0], 16, out);
|
||||
env->ReleaseDoubleArrayElements(out_, out, 0);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_Camera_nGetPosition(JNIEnv *env, jclass, jlong nativeCamera,
|
||||
jfloatArray out_) {
|
||||
|
||||
@@ -76,6 +76,13 @@ Java_com_google_android_filament_ColorGrading_nBuilderLuminanceScaling(JNIEnv*,
|
||||
builder->luminanceScaling(luminanceScaling);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_ColorGrading_nBuilderGamutMapping(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jboolean gamutMapping) {
|
||||
ColorGrading::Builder* builder = (ColorGrading::Builder*) nativeBuilder;
|
||||
builder->gamutMapping(gamutMapping);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_ColorGrading_nBuilderExposure(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jfloat exposure) {
|
||||
@@ -83,6 +90,13 @@ Java_com_google_android_filament_ColorGrading_nBuilderExposure(JNIEnv*, jclass,
|
||||
builder->exposure(exposure);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_ColorGrading_nBuilderNightAdaptation(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jfloat adaptation) {
|
||||
ColorGrading::Builder* builder = (ColorGrading::Builder*) nativeBuilder;
|
||||
builder->nightAdaptation(adaptation);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_ColorGrading_nBuilderWhiteBalance(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jfloat temperature, jfloat tint) {
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
namespace filament {
|
||||
extern jint JNI_OnLoad(JavaVM* vm, void* reserved);
|
||||
};
|
||||
#include "private/backend/VirtualMachineEnv.h"
|
||||
|
||||
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
JNIEnv* env;
|
||||
@@ -26,9 +24,9 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if ANDROID
|
||||
::filament::JNI_OnLoad(vm, reserved);
|
||||
#endif
|
||||
// This must be called when the library is loaded. We need this to get a reference to the
|
||||
// global VM
|
||||
::filament::VirtualMachineEnv::JNI_OnLoad(vm);
|
||||
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,8 @@ Java_com_google_android_filament_IndexBuffer_nSetBuffer(JNIEnv *env, jclass type
|
||||
|
||||
auto* callback = JniBufferCallback::make(engine, env, handler, runnable, std::move(nioBuffer));
|
||||
|
||||
BufferDescriptor desc(data, sizeInBytes, &JniBufferCallback::invoke, callback);
|
||||
BufferDescriptor desc(data, sizeInBytes,
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
indexBuffer->setBuffer(*engine, std::move(desc), (uint32_t) destOffsetInBytes);
|
||||
|
||||
|
||||
@@ -76,7 +76,9 @@ extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_LightManager_nBuilderShadowOptions(JNIEnv* env, jclass,
|
||||
jlong nativeBuilder, jint mapSize, jint cascades, jfloatArray splitPositions,
|
||||
jfloat constantBias, jfloat normalBias, jfloat shadowFar, jfloat shadowNearHint,
|
||||
jfloat shadowFarHint, jboolean stable, jboolean screenSpaceContactShadows, jint stepCount,
|
||||
jfloat shadowFarHint, jboolean stable,
|
||||
jfloat polygonOffsetConstant, jfloat polygonOffsetSlope,
|
||||
jboolean screenSpaceContactShadows, jint stepCount,
|
||||
jfloat maxShadowDistance, jint vsmMsaaSamples, jfloat blurWidth) {
|
||||
LightManager::Builder *builder = (LightManager::Builder *) nativeBuilder;
|
||||
LightManager::ShadowOptions shadowOptions {
|
||||
@@ -88,6 +90,8 @@ Java_com_google_android_filament_LightManager_nBuilderShadowOptions(JNIEnv* env,
|
||||
.shadowNearHint = shadowNearHint,
|
||||
.shadowFarHint = shadowFarHint,
|
||||
.stable = (bool)stable,
|
||||
.polygonOffsetConstant = polygonOffsetConstant,
|
||||
.polygonOffsetSlope = polygonOffsetConstant,
|
||||
.screenSpaceContactShadows = (bool)screenSpaceContactShadows,
|
||||
.stepCount = uint8_t(stepCount),
|
||||
.maxShadowDistance = maxShadowDistance,
|
||||
|
||||
@@ -97,7 +97,8 @@ Java_com_google_android_filament_Renderer_nReadPixels(JNIEnv *env, jclass,
|
||||
|
||||
PixelBufferDescriptor desc(buffer, sizeInBytes, (backend::PixelDataFormat) format,
|
||||
(backend::PixelDataType) type, (uint8_t) alignment, (uint32_t) left, (uint32_t) top,
|
||||
(uint32_t) stride, &JniBufferCallback::invoke, callback);
|
||||
(uint32_t) stride,
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
renderer->readPixels(uint32_t(xoffset), uint32_t(yoffset), uint32_t(width), uint32_t(height),
|
||||
std::move(desc));
|
||||
@@ -132,7 +133,8 @@ Java_com_google_android_filament_Renderer_nReadPixelsEx(JNIEnv *env, jclass,
|
||||
|
||||
PixelBufferDescriptor desc(buffer, sizeInBytes, (backend::PixelDataFormat) format,
|
||||
(backend::PixelDataType) type, (uint8_t) alignment, (uint32_t) left, (uint32_t) top,
|
||||
(uint32_t) stride, &JniBufferCallback::invoke, callback);
|
||||
(uint32_t) stride,
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
renderer->readPixels(renderTarget,
|
||||
uint32_t(xoffset), uint32_t(yoffset), uint32_t(width), uint32_t(height),
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "common/NioUtils.h"
|
||||
#include "common/CallbackUtils.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
|
||||
#if __has_include(<android/hardware_buffer_jni.h>)
|
||||
#include <android/hardware_buffer_jni.h>
|
||||
@@ -169,7 +169,8 @@ Java_com_google_android_filament_Stream_nReadPixels(JNIEnv *env, jclass,
|
||||
|
||||
PixelBufferDescriptor desc(buffer, sizeInBytes, (backend::PixelDataFormat) format,
|
||||
(backend::PixelDataType) type, (uint8_t) alignment, (uint32_t) left, (uint32_t) top,
|
||||
(uint32_t) stride, &JniBufferCallback::invoke, callback);
|
||||
(uint32_t) stride,
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
stream->readPixels(uint32_t(xoffset), uint32_t(yoffset), uint32_t(width), uint32_t(height),
|
||||
std::move(desc));
|
||||
@@ -189,7 +190,7 @@ Java_com_google_android_filament_Stream_nSetAcquiredImage(JNIEnv* env, jclass, j
|
||||
Engine* engine = (Engine*) nativeEngine;
|
||||
Stream* stream = (Stream*) nativeStream;
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
|
||||
// This function is not available before NDK 15 or before Android 8.
|
||||
if (UTILS_UNLIKELY(!AHardwareBuffer_fromHardwareBuffer_fn)) {
|
||||
@@ -221,5 +222,6 @@ Java_com_google_android_filament_Stream_nSetAcquiredImage(JNIEnv* env, jclass, j
|
||||
|
||||
#endif
|
||||
|
||||
stream->setAcquiredImage((void*) nativeBuffer, &JniImageCallback::invoke, callback);
|
||||
stream->setAcquiredImage((void*) nativeBuffer,
|
||||
callback->getHandler(), &JniImageCallback::postToJavaAndDestroy, callback);
|
||||
}
|
||||
|
||||
@@ -27,5 +27,8 @@ Java_com_google_android_filament_SwapChain_nSetFrameCompletedCallback(JNIEnv* en
|
||||
jlong nativeSwapChain, jobject handler, jobject runnable) {
|
||||
SwapChain* swapChain = (SwapChain*) nativeSwapChain;
|
||||
auto *callback = JniCallback::make(env, handler, runnable);
|
||||
swapChain->setFrameCompletedCallback(&JniCallback::invoke, callback);
|
||||
swapChain->setFrameCompletedCallback([](void* user) {
|
||||
JniCallback* callback = (JniCallback*)user;
|
||||
JniCallback::postToJavaAndDestroy(callback);
|
||||
}, callback);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
#include <android/bitmap.h>
|
||||
#endif
|
||||
|
||||
@@ -210,7 +210,8 @@ Java_com_google_android_filament_Texture_nSetImage(JNIEnv* env, jclass, jlong na
|
||||
|
||||
Texture::PixelBufferDescriptor desc(buffer, sizeInBytes, (backend::PixelDataFormat) format,
|
||||
(backend::PixelDataType) type, (uint8_t) alignment, (uint32_t) left, (uint32_t) top,
|
||||
(uint32_t) stride, &JniBufferCallback::invoke, callback);
|
||||
(uint32_t) stride,
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
texture->setImage(*engine, (size_t) level, (uint32_t) xoffset, (uint32_t) yoffset,
|
||||
(uint32_t) width, (uint32_t) height, std::move(desc));
|
||||
@@ -240,7 +241,7 @@ Java_com_google_android_filament_Texture_nSetImageCompressed(JNIEnv *env, jclass
|
||||
|
||||
Texture::PixelBufferDescriptor desc(buffer, sizeInBytes,
|
||||
(backend::CompressedPixelDataType) compressedFormat, (uint32_t) compressedSizeInBytes,
|
||||
&JniBufferCallback::invoke, callback);
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
texture->setImage(*engine, (size_t) level, (uint32_t) xoffset, (uint32_t) yoffset,
|
||||
(uint32_t) width, (uint32_t) height, std::move(desc));
|
||||
@@ -274,7 +275,8 @@ Java_com_google_android_filament_Texture_nSetImage3D(JNIEnv* env, jclass, jlong
|
||||
|
||||
Texture::PixelBufferDescriptor desc(buffer, sizeInBytes, (backend::PixelDataFormat) format,
|
||||
(backend::PixelDataType) type, (uint8_t) alignment, (uint32_t) left, (uint32_t) top,
|
||||
(uint32_t) stride, &JniBufferCallback::invoke, callback);
|
||||
(uint32_t) stride,
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
texture->setImage(*engine, (size_t) level,
|
||||
(uint32_t) xoffset, (uint32_t) yoffset, (uint32_t) zoffset,
|
||||
@@ -308,7 +310,7 @@ Java_com_google_android_filament_Texture_nSetImage3DCompressed(JNIEnv *env, jcla
|
||||
|
||||
Texture::PixelBufferDescriptor desc(buffer, sizeInBytes,
|
||||
(backend::CompressedPixelDataType) compressedFormat, (uint32_t) compressedSizeInBytes,
|
||||
&JniBufferCallback::invoke, callback);
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
texture->setImage(*engine, (size_t) level,
|
||||
(uint32_t) xoffset, (uint32_t) yoffset, (uint32_t) zoffset,
|
||||
@@ -346,7 +348,8 @@ Java_com_google_android_filament_Texture_nSetImageCubemap(JNIEnv *env, jclass,
|
||||
|
||||
Texture::PixelBufferDescriptor desc(buffer, sizeInBytes, (backend::PixelDataFormat) format,
|
||||
(backend::PixelDataType) type, (uint8_t) alignment, (uint32_t) left, (uint32_t) top,
|
||||
(uint32_t) stride, &JniBufferCallback::invoke, callback);
|
||||
(uint32_t) stride,
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
texture->setImage(*engine, (size_t) level, std::move(desc), faceOffsets);
|
||||
|
||||
@@ -381,7 +384,7 @@ Java_com_google_android_filament_Texture_nSetImageCubemapCompressed(JNIEnv *env,
|
||||
|
||||
Texture::PixelBufferDescriptor desc(buffer, sizeInBytes,
|
||||
(backend::CompressedPixelDataType) compressedFormat, (uint32_t) compressedSizeInBytes,
|
||||
&JniBufferCallback::invoke, callback);
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
texture->setImage(*engine, (size_t) level, std::move(desc), faceOffsets);
|
||||
|
||||
@@ -454,7 +457,7 @@ Java_com_google_android_filament_Texture_nGeneratePrefilterMipmap(JNIEnv *env, j
|
||||
Texture::PixelBufferDescriptor desc(buffer, sizeInBytes, (backend::PixelDataFormat) format,
|
||||
(backend::PixelDataType) type, (uint8_t) alignment,
|
||||
(uint32_t) left, (uint32_t) top, (uint32_t) stride,
|
||||
&JniBufferCallback::invoke, callback);
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
Texture::PrefilterOptions options;
|
||||
options.sampleCount = sampleCount;
|
||||
@@ -468,7 +471,7 @@ Java_com_google_android_filament_Texture_nGeneratePrefilterMipmap(JNIEnv *env, j
|
||||
// ANDROID SPECIFIC BITS
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
|
||||
#define BITMAP_CONFIG_ALPHA_8 0
|
||||
#define BITMAP_CONFIG_RGB_565 1
|
||||
@@ -563,7 +566,7 @@ private:
|
||||
jobject mBitmap = nullptr;
|
||||
jobject mHandler = nullptr;
|
||||
jobject mCallback = nullptr;
|
||||
AndroidBitmapInfo mInfo;
|
||||
AndroidBitmapInfo mInfo{};
|
||||
CallbackJni mCallbackUtils;
|
||||
};
|
||||
|
||||
|
||||
@@ -70,6 +70,23 @@ Java_com_google_android_filament_TransformManager_nCreateArray(JNIEnv* env,
|
||||
return tm->getInstance(entity);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nCreateArrayFp64(JNIEnv* env,
|
||||
jclass, jlong nativeTransformManager, jint entity_, jint parent,
|
||||
jdoubleArray localTransform_) {
|
||||
TransformManager* tm = (TransformManager*) nativeTransformManager;
|
||||
Entity& entity = *reinterpret_cast<Entity*>(&entity_);
|
||||
if (localTransform_) {
|
||||
jdouble *localTransform = env->GetDoubleArrayElements(localTransform_, NULL);
|
||||
tm->create(entity, (TransformManager::Instance) parent,
|
||||
*reinterpret_cast<const filament::math::mat4 *>(localTransform));
|
||||
env->ReleaseDoubleArrayElements(localTransform_, localTransform, JNI_ABORT);
|
||||
} else {
|
||||
tm->create(entity, (TransformManager::Instance) parent);
|
||||
}
|
||||
return tm->getInstance(entity);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nDestroy(JNIEnv*, jclass,
|
||||
jlong nativeTransformManager, jint entity_) {
|
||||
@@ -104,6 +121,17 @@ Java_com_google_android_filament_TransformManager_nSetTransform(JNIEnv* env,
|
||||
env->ReleaseFloatArrayElements(localTransform_, localTransform, JNI_ABORT);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nSetTransformFp64(JNIEnv* env,
|
||||
jclass, jlong nativeTransformManager, jint i,
|
||||
jdoubleArray localTransform_) {
|
||||
TransformManager* tm = (TransformManager*) nativeTransformManager;
|
||||
jdouble *localTransform = env->GetDoubleArrayElements(localTransform_, NULL);
|
||||
tm->setTransform((TransformManager::Instance) i,
|
||||
*reinterpret_cast<const filament::math::mat4 *>(localTransform));
|
||||
env->ReleaseDoubleArrayElements(localTransform_, localTransform, JNI_ABORT);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nGetTransform(JNIEnv* env,
|
||||
jclass, jlong nativeTransformManager, jint i,
|
||||
@@ -115,6 +143,17 @@ Java_com_google_android_filament_TransformManager_nGetTransform(JNIEnv* env,
|
||||
env->ReleaseFloatArrayElements(outLocalTransform_, outLocalTransform, 0);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nGetTransformFp64(JNIEnv* env,
|
||||
jclass, jlong nativeTransformManager, jint i,
|
||||
jdoubleArray outLocalTransform_) {
|
||||
TransformManager* tm = (TransformManager*) nativeTransformManager;
|
||||
jdouble *outLocalTransform = env->GetDoubleArrayElements(outLocalTransform_, NULL);
|
||||
*reinterpret_cast<filament::math::mat4 *>(outLocalTransform) = tm->getTransformAccurate(
|
||||
(TransformManager::Instance) i);
|
||||
env->ReleaseDoubleArrayElements(outLocalTransform_, outLocalTransform, 0);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nGetWorldTransform(JNIEnv* env,
|
||||
jclass, jlong nativeTransformManager, jint i,
|
||||
@@ -126,6 +165,17 @@ Java_com_google_android_filament_TransformManager_nGetWorldTransform(JNIEnv* env
|
||||
env->ReleaseFloatArrayElements(outWorldTransform_, outWorldTransform, 0);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nGetWorldTransformFp64(JNIEnv* env,
|
||||
jclass, jlong nativeTransformManager, jint i,
|
||||
jdoubleArray outWorldTransform_) {
|
||||
TransformManager* tm = (TransformManager*) nativeTransformManager;
|
||||
jdouble *outWorldTransform = env->GetDoubleArrayElements(outWorldTransform_, NULL);
|
||||
*reinterpret_cast<filament::math::mat4 *>(outWorldTransform) = tm->getWorldTransformAccurate(
|
||||
(TransformManager::Instance) i);
|
||||
env->ReleaseDoubleArrayElements(outWorldTransform_, outWorldTransform, 0);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nOpenLocalTransformTransaction(
|
||||
JNIEnv*, jclass, jlong nativeTransformManager) {
|
||||
@@ -139,3 +189,19 @@ Java_com_google_android_filament_TransformManager_nCommitLocalTransformTransacti
|
||||
TransformManager* tm = (TransformManager*) nativeTransformManager;
|
||||
tm->commitLocalTransformTransaction();
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nSetAccurateTranslationsEnabled(JNIEnv*,
|
||||
jclass, jlong nativeTransformManager, jboolean enable) {
|
||||
TransformManager* tm = (TransformManager*) nativeTransformManager;
|
||||
tm->setAccurateTranslationsEnabled((bool)enable);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_com_google_android_filament_TransformManager_nIsAccurateTranslationsEnabled(JNIEnv*,
|
||||
jclass, jlong nativeTransformManager) {
|
||||
TransformManager* tm = (TransformManager*) nativeTransformManager;
|
||||
return (jboolean)tm->isAccurateTranslationsEnabled();
|
||||
}
|
||||
|
||||
@@ -32,40 +32,40 @@ using namespace filament::math;
|
||||
using namespace backend;
|
||||
|
||||
extern "C" JNIEXPORT jlong JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nCreateBuilder(JNIEnv *env, jclass type) {
|
||||
Java_com_google_android_filament_VertexBuffer_nCreateBuilder(JNIEnv*, jclass) {
|
||||
return (jlong) new VertexBuffer::Builder();
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nDestroyBuilder(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nDestroyBuilder(JNIEnv*, jclass,
|
||||
jlong nativeBuilder) {
|
||||
VertexBuffer::Builder* builder = (VertexBuffer::Builder *) nativeBuilder;
|
||||
delete builder;
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderVertexCount(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderVertexCount(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jint vertexCount) {
|
||||
VertexBuffer::Builder* builder = (VertexBuffer::Builder *) nativeBuilder;
|
||||
builder->vertexCount((uint32_t) vertexCount);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderEnableBufferObjects(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderEnableBufferObjects(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jboolean enabled) {
|
||||
VertexBuffer::Builder* builder = (VertexBuffer::Builder *) nativeBuilder;
|
||||
builder->enableBufferObjects(enabled);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderBufferCount(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderBufferCount(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jint bufferCount) {
|
||||
VertexBuffer::Builder* builder = (VertexBuffer::Builder *) nativeBuilder;
|
||||
builder->bufferCount((uint8_t) bufferCount);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderAttribute(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderAttribute(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jint attribute, jint bufferIndex, jint attributeType, jint byteOffset,
|
||||
jint byteStride) {
|
||||
VertexBuffer::Builder* builder = (VertexBuffer::Builder *) nativeBuilder;
|
||||
@@ -75,14 +75,14 @@ Java_com_google_android_filament_VertexBuffer_nBuilderAttribute(JNIEnv *env, jcl
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderNormalized(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderNormalized(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jint attribute, jboolean normalized) {
|
||||
VertexBuffer::Builder* builder = (VertexBuffer::Builder *) nativeBuilder;
|
||||
builder->normalized((VertexAttribute) attribute, normalized);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jlong JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderBuild(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nBuilderBuild(JNIEnv*, jclass,
|
||||
jlong nativeBuilder, jlong nativeEngine) {
|
||||
VertexBuffer::Builder* builder = (VertexBuffer::Builder *) nativeBuilder;
|
||||
Engine *engine = (Engine *) nativeEngine;
|
||||
@@ -90,14 +90,14 @@ Java_com_google_android_filament_VertexBuffer_nBuilderBuild(JNIEnv *env, jclass
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nGetVertexCount(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nGetVertexCount(JNIEnv*, jclass,
|
||||
jlong nativeVertexBuffer) {
|
||||
VertexBuffer *vertexBuffer = (VertexBuffer *) nativeVertexBuffer;
|
||||
return (jint) vertexBuffer->getVertexCount();
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nSetBufferAt(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nSetBufferAt(JNIEnv *env, jclass,
|
||||
jlong nativeVertexBuffer, jlong nativeEngine, jint bufferIndex,
|
||||
jobject buffer, jint remaining,
|
||||
jint destOffsetInBytes, jint count, jobject handler, jobject runnable) {
|
||||
@@ -114,7 +114,8 @@ Java_com_google_android_filament_VertexBuffer_nSetBufferAt(JNIEnv *env, jclass t
|
||||
|
||||
auto* callback = JniBufferCallback::make(engine, env, handler, runnable, std::move(nioBuffer));
|
||||
|
||||
BufferDescriptor desc(data, sizeInBytes, &JniBufferCallback::invoke, callback);
|
||||
BufferDescriptor desc(data, sizeInBytes,
|
||||
callback->getHandler(), &JniBufferCallback::postToJavaAndDestroy, callback);
|
||||
|
||||
vertexBuffer->setBufferAt(*engine, (uint8_t) bufferIndex, std::move(desc),
|
||||
(uint32_t) destOffsetInBytes);
|
||||
@@ -123,7 +124,7 @@ Java_com_google_android_filament_VertexBuffer_nSetBufferAt(JNIEnv *env, jclass t
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_VertexBuffer_nSetBufferObjectAt(JNIEnv *env, jclass type,
|
||||
Java_com_google_android_filament_VertexBuffer_nSetBufferObjectAt(JNIEnv*, jclass,
|
||||
jlong nativeVertexBuffer, jlong nativeEngine, jint bufferIndex, jlong nativeBufferObject) {
|
||||
VertexBuffer *vertexBuffer = (VertexBuffer *) nativeVertexBuffer;
|
||||
Engine *engine = (Engine *) nativeEngine;
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
#include <filament/View.h>
|
||||
#include <filament/Viewport.h>
|
||||
|
||||
#include "common/CallbackUtils.h"
|
||||
|
||||
#include "private/backend/VirtualMachineEnv.h"
|
||||
|
||||
using namespace filament;
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
@@ -82,13 +86,19 @@ Java_com_google_android_filament_View_nSetRenderTarget(JNIEnv*, jclass,
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_View_nSetSampleCount(JNIEnv*, jclass, jlong nativeView, jint count) {
|
||||
View* view = (View*) nativeView;
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
view->setSampleCount((uint8_t) count);
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
Java_com_google_android_filament_View_nGetSampleCount(JNIEnv*, jclass, jlong nativeView) {
|
||||
View* view = (View*) nativeView;
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
return view->getSampleCount();
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
@@ -119,13 +129,14 @@ Java_com_google_android_filament_View_nGetDithering(JNIEnv*, jclass,
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_View_nSetDynamicResolutionOptions(JNIEnv*, jclass, jlong nativeView,
|
||||
jboolean enabled, jboolean homogeneousScaling,
|
||||
jfloat minScale, jfloat maxScale, jint quality) {
|
||||
jfloat minScale, jfloat maxScale, jfloat sharpness, jint quality) {
|
||||
View* view = (View*)nativeView;
|
||||
View::DynamicResolutionOptions options;
|
||||
options.enabled = enabled;
|
||||
options.homogeneousScaling = homogeneousScaling;
|
||||
options.minScale = filament::math::float2{ minScale };
|
||||
options.maxScale = filament::math::float2{ maxScale };
|
||||
options.sharpness = sharpness;
|
||||
options.quality = (View::QualityLevel)quality;
|
||||
view->setDynamicResolutionOptions(options);
|
||||
}
|
||||
@@ -320,8 +331,8 @@ Java_com_google_android_filament_View_nSetBlendMode(JNIEnv *, jclass , jlong nat
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_View_nSetDepthOfFieldOptions(JNIEnv *, jclass ,
|
||||
jlong nativeView, jfloat focusDistance, jfloat cocScale, jfloat maxApertureDiameter, jboolean enabled, jint filter,
|
||||
Java_com_google_android_filament_View_nSetDepthOfFieldOptions(JNIEnv *, jclass,
|
||||
jlong nativeView, jfloat cocScale, jfloat maxApertureDiameter, jboolean enabled, jint filter,
|
||||
jboolean nativeResolution, jint foregroundRingCount, jint backgroundRingCount, jint fastGatherRingCount,
|
||||
jint maxForegroundCOC, jint maxBackgroundCOC) {
|
||||
View* view = (View*) nativeView;
|
||||
@@ -350,6 +361,17 @@ Java_com_google_android_filament_View_nSetVignetteOptions(JNIEnv*, jclass, jlong
|
||||
.color = LinearColorA{r, g, b, a}, .enabled = (bool)enabled});
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_View_nSetMultiSampleAntiAliasingOptions(JNIEnv* env, jclass clazz,
|
||||
jlong nativeView, jboolean enabled, jint sampleCount, jboolean customResolve) {
|
||||
View* view = (View*) nativeView;
|
||||
view->setMultiSampleAntiAliasingOptions({
|
||||
.enabled = (bool)enabled,
|
||||
.sampleCount = (uint8_t)sampleCount,
|
||||
.customResolve = (bool)customResolve});
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_View_nSetTemporalAntiAliasingOptions(JNIEnv *, jclass,
|
||||
@@ -381,3 +403,42 @@ Java_com_google_android_filament_View_nIsScreenSpaceRefractionEnabled(JNIEnv *,
|
||||
View* view = (View*) nativeView;
|
||||
return (jboolean)view->isScreenSpaceRefractionEnabled();
|
||||
}
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_View_nPick(JNIEnv* env, jclass,
|
||||
jlong nativeView,
|
||||
jint x, jint y, jobject handler, jobject internalCallback) {
|
||||
|
||||
// jniState will be initialized the first time this method is called
|
||||
static const struct JniState {
|
||||
jclass internalOnPickCallbackClass;
|
||||
jfieldID renderableFieldId;
|
||||
jfieldID depthFieldId;
|
||||
jfieldID fragCoordXFieldId;
|
||||
jfieldID fragCoordYFieldId;
|
||||
jfieldID fragCoordZFieldId;
|
||||
explicit JniState(JNIEnv* env) noexcept {
|
||||
internalOnPickCallbackClass = env->FindClass("com/google/android/filament/View$InternalOnPickCallback");
|
||||
renderableFieldId = env->GetFieldID(internalOnPickCallbackClass, "mRenderable", "I");
|
||||
depthFieldId = env->GetFieldID(internalOnPickCallbackClass, "mDepth", "F");
|
||||
fragCoordXFieldId = env->GetFieldID(internalOnPickCallbackClass, "mFragCoordsX", "F");
|
||||
fragCoordYFieldId = env->GetFieldID(internalOnPickCallbackClass, "mFragCoordsY", "F");
|
||||
fragCoordZFieldId = env->GetFieldID(internalOnPickCallbackClass, "mFragCoordsZ", "F");
|
||||
}
|
||||
} jniState(env);
|
||||
|
||||
View* view = (View*) nativeView;
|
||||
JniCallback *callback = JniCallback::make(env, handler, internalCallback);
|
||||
view->pick(x, y, [callback](View::PickingQueryResult const& result) {
|
||||
// this is executed on the backend/service thread
|
||||
jobject obj = callback->getCallbackObject();
|
||||
JNIEnv* env = filament::VirtualMachineEnv::get().getEnvironment();
|
||||
env->SetIntField(obj, jniState.renderableFieldId, (jint)result.renderable.getId());
|
||||
env->SetFloatField(obj, jniState.depthFieldId, result.depth);
|
||||
env->SetFloatField(obj, jniState.fragCoordXFieldId, result.fragCoords.x);
|
||||
env->SetFloatField(obj, jniState.fragCoordYFieldId, result.fragCoords.y);
|
||||
env->SetFloatField(obj, jniState.fragCoordZFieldId, result.fragCoords.z);
|
||||
JniCallback::postToJavaAndDestroy(callback);
|
||||
}, callback->getHandler());
|
||||
}
|
||||
|
||||
@@ -63,12 +63,27 @@ final class Asserts {
|
||||
return out;
|
||||
}
|
||||
|
||||
@NonNull @Size(min = 16)
|
||||
static double[] assertMat4(@Nullable double[] out) {
|
||||
if (out == null) out = new double[16];
|
||||
else if (out.length < 16) {
|
||||
throw new ArrayIndexOutOfBoundsException("Array length must be at least 16");
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
static void assertMat4fIn(@NonNull @Size(min = 16) float[] in) {
|
||||
if (in.length < 16) {
|
||||
throw new ArrayIndexOutOfBoundsException("Array length must be at least 16");
|
||||
}
|
||||
}
|
||||
|
||||
static void assertMat4In(@NonNull @Size(min = 16) double[] in) {
|
||||
if (in.length < 16) {
|
||||
throw new ArrayIndexOutOfBoundsException("Array length must be at least 16");
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull @Size(min = 3)
|
||||
static float[] assertFloat3(@Nullable float[] out) {
|
||||
if (out == null) out = new float[3];
|
||||
|
||||
@@ -419,6 +419,20 @@ public class Camera {
|
||||
nSetModelMatrix(getNativeObject(), viewMatrix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the camera's view matrix.
|
||||
* <p>
|
||||
* Helper method to set the camera's entity transform component.
|
||||
* Remember that the Camera "looks" towards its -z axis.
|
||||
* <p>
|
||||
*
|
||||
* @param viewMatrix The camera position and orientation provided as a <b>rigid transform</b> matrix.
|
||||
*/
|
||||
public void setModelMatrix(@NonNull @Size(min = 16) double[] viewMatrix) {
|
||||
Asserts.assertMat4In(viewMatrix);
|
||||
nSetModelMatrixFp64(getNativeObject(), viewMatrix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the camera's view matrix.
|
||||
*
|
||||
@@ -516,6 +530,22 @@ public class Camera {
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the camera's model matrix. The model matrix encodes the camera position and
|
||||
* orientation, or pose.
|
||||
*
|
||||
* @param out A 16-double array where the model matrix will be stored, or null in which
|
||||
* case a new array is allocated.
|
||||
*
|
||||
* @return A 16-double array containing the camera's pose as a column-major matrix.
|
||||
*/
|
||||
@NonNull @Size(min = 16)
|
||||
public double[] getModelMatrix(@Nullable @Size(min = 16) double[] out) {
|
||||
out = Asserts.assertMat4(out);
|
||||
nGetModelMatrixFp64(getNativeObject(), out);
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the camera's view matrix. The view matrix is the inverse of the model matrix.
|
||||
*
|
||||
@@ -531,6 +561,21 @@ public class Camera {
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the camera's view matrix. The view matrix is the inverse of the model matrix.
|
||||
*
|
||||
* @param out A 16-double array where the model view will be stored, or null in which
|
||||
* case a new array is allocated.
|
||||
*
|
||||
* @return A 16-double array containing the camera's view as a column-major matrix.
|
||||
*/
|
||||
@NonNull @Size(min = 16)
|
||||
public double[] getViewMatrix(@Nullable @Size(min = 16) double[] out) {
|
||||
out = Asserts.assertMat4(out);
|
||||
nGetViewMatrixFp64(getNativeObject(), out);
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the camera position in world space.
|
||||
*
|
||||
@@ -740,6 +785,7 @@ public class Camera {
|
||||
private static native void nSetScaling(long nativeCamera, double x, double y);
|
||||
private static native void nSetShift(long nativeCamera, double x, double y);
|
||||
private static native void nSetModelMatrix(long nativeCamera, float[] in);
|
||||
private static native void nSetModelMatrixFp64(long nativeCamera, double[] in);
|
||||
private static native void nLookAt(long nativeCamera, double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ);
|
||||
private static native float nGetNear(long nativeCamera);
|
||||
private static native float nGetCullingFar(long nativeCamera);
|
||||
@@ -747,7 +793,9 @@ public class Camera {
|
||||
private static native void nGetCullingProjectionMatrix(long nativeCamera, double[] out);
|
||||
private static native void nGetScaling(long nativeCamera, double[] out);
|
||||
private static native void nGetModelMatrix(long nativeCamera, float[] out);
|
||||
private static native void nGetModelMatrixFp64(long nativeCamera, double[] out);
|
||||
private static native void nGetViewMatrix(long nativeCamera, float[] out);
|
||||
private static native void nGetViewMatrixFp64(long nativeCamera, double[] out);
|
||||
private static native void nGetPosition(long nativeCamera, float[] out);
|
||||
private static native void nGetLeftVector(long nativeCamera, float[] out);
|
||||
private static native void nGetUpVector(long nativeCamera, float[] out);
|
||||
|
||||
@@ -55,6 +55,7 @@ import static com.google.android.filament.Asserts.assertFloat4In;
|
||||
* The various transforms held by ColorGrading are applied in the following order:
|
||||
* <ul>
|
||||
* <li>Exposure</li>
|
||||
* <li>Night adaptation</li>
|
||||
* <li>White balance</li>
|
||||
* <li>Channel mixer</li>
|
||||
* <li>Shadows/mid-tones/highlights</li>
|
||||
@@ -65,6 +66,7 @@ import static com.google.android.filament.Asserts.assertFloat4In;
|
||||
* <li>Curves</li>
|
||||
* <li>Tone mapping</li>
|
||||
* <li>Luminance scaling</li>
|
||||
* <li>Gamut mapping</li>
|
||||
* </ul>
|
||||
*
|
||||
* <h1>Defaults</h1>
|
||||
@@ -72,6 +74,7 @@ import static com.google.android.filament.Asserts.assertFloat4In;
|
||||
* Here are the default color grading options:
|
||||
* <ul>
|
||||
* <li>Exposure: 0.0</li>
|
||||
* <li>Night adaptation: 0.0</li>
|
||||
* <li>White balance: temperature <code>0.0</code>, and tint <code>0.0</code></li>
|
||||
* <li>Channel mixer: red <code>{1,0,0}</code>, green <code>{0,1,0}</code>, blue <code>{0,0,1}</code></li>
|
||||
* <li>Shadows/mid-tones/highlights: shadows <code>{1,1,1,0}</code>, mid-tones <code>{1,1,1,0}</code>,
|
||||
@@ -83,6 +86,7 @@ import static com.google.android.filament.Asserts.assertFloat4In;
|
||||
* <li>Curves: gamma <code>{1,1,1}</code>, midPoint <code>{1,1,1}</code>, and scale <code>{1,1,1}</code></li>
|
||||
* <li>Tone mapping: {@link ToneMapper.ACESLegacy}</li>
|
||||
* <li>Luminance scaling: false</li>
|
||||
* <li>Gamut mapping: false</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see View
|
||||
@@ -213,6 +217,22 @@ public class ColorGrading {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables or disables gamut mapping to the destination color space's gamut. When gamut
|
||||
* mapping is turned off, out-of-gamut colors are clipped to the destination's gamut,
|
||||
* which may produce hue skews (blue skewing to purple, green to yellow, etc.). When
|
||||
* gamut mapping is enabled, out-of-gamut colors are brought back in gamut by trying to
|
||||
* preserve the perceived chroma and lightness of the original values.
|
||||
*
|
||||
* @param gamutMapping Enables or disables gamut mapping
|
||||
*
|
||||
* @return This Builder, for chaining calls
|
||||
*/
|
||||
public Builder gamutMapping(boolean gamutMapping) {
|
||||
nBuilderGamutMapping(mNativeBuilder, gamutMapping);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjusts the exposure of this image. The exposure is specified in stops:
|
||||
* each stop brightens (positive values) or darkens (negative values) the image by
|
||||
@@ -229,6 +249,22 @@ public class ColorGrading {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls the amount of night adaptation to replicate a more natural representation of
|
||||
* low-light conditions as perceived by the human vision system. In low-light conditions,
|
||||
* peak luminance sensitivity of the eye shifts toward the blue end of the color spectrum:
|
||||
* darker tones appear brighter, reducing contrast, and colors are blue shifted (the darker
|
||||
* the more intense the effect).
|
||||
*
|
||||
* @param adaptation Amount of adaptation, between 0 (no adaptation) and 1 (full adaptation).
|
||||
*
|
||||
* @return This Builder, for chaining calls
|
||||
*/
|
||||
public Builder nightAdaptation(float adaptation) {
|
||||
nBuilderNightAdaptation(mNativeBuilder, adaptation);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjusts the while balance of the image. This can be used to remove color casts
|
||||
* and correct the appearance of the white point in the scene, or to alter the
|
||||
@@ -524,7 +560,9 @@ public class ColorGrading {
|
||||
private static native void nBuilderToneMapper(long nativeBuilder, long toneMapper);
|
||||
private static native void nBuilderToneMapping(long nativeBuilder, int toneMapping);
|
||||
private static native void nBuilderLuminanceScaling(long nativeBuilder, boolean luminanceScaling);
|
||||
private static native void nBuilderGamutMapping(long nativeBuilder, boolean gamutMapping);
|
||||
private static native void nBuilderExposure(long nativeBuilder, float exposure);
|
||||
private static native void nBuilderNightAdaptation(long nativeBuilder, float adaptation);
|
||||
private static native void nBuilderWhiteBalance(long nativeBuilder, float temperature, float tint);
|
||||
private static native void nBuilderChannelMixer(long nativeBuilder, float[] outRed, float[] outGreen, float[] outBlue);
|
||||
private static native void nBuilderShadowsMidtonesHighlights(long nativeBuilder, float[] shadows, float[] midtones, float[] highlights, float[] ranges);
|
||||
|
||||
@@ -106,7 +106,10 @@ import com.google.android.filament.proguard.UsedByReflection;
|
||||
* @see Renderer
|
||||
*/
|
||||
public class Engine {
|
||||
private static final Backend[] sBackendValues = Backend.values();
|
||||
|
||||
private long mNativeObject;
|
||||
|
||||
@NonNull private final TransformManager mTransformManager;
|
||||
@NonNull private final LightManager mLightManager;
|
||||
@NonNull private final RenderableManager mRenderableManager;
|
||||
@@ -252,7 +255,7 @@ public class Engine {
|
||||
*/
|
||||
@NonNull
|
||||
public Backend getBackend() {
|
||||
return Backend.values()[(int) nGetBackend(getNativeObject())];
|
||||
return sBackendValues[(int) nGetBackend(getNativeObject())];
|
||||
}
|
||||
|
||||
// SwapChain
|
||||
@@ -631,7 +634,7 @@ public class Engine {
|
||||
|
||||
/**
|
||||
* Kicks the hardware thread (e.g.: the OpenGL, Vulkan or Metal thread) and blocks until
|
||||
* all commands to this point are executed. Note that this doesn't guarantee that the
|
||||
* all commands to this point are executed. Note that this does guarantee that the
|
||||
* hardware is actually finished.
|
||||
*
|
||||
* <p>This is typically used right after destroying the <code>SwapChain</code>,
|
||||
|
||||
@@ -117,6 +117,8 @@ import androidx.annotation.Size;
|
||||
* </ul>
|
||||
*/
|
||||
public class LightManager {
|
||||
private static final Type[] sTypeValues = Type.values();
|
||||
|
||||
private long mNativeObject;
|
||||
|
||||
LightManager(long nativeLightManager) {
|
||||
@@ -244,13 +246,13 @@ public class LightManager {
|
||||
* light. 1mm by default.
|
||||
* This is ignored when the View's ShadowType is set to VSM.
|
||||
*/
|
||||
public float constantBias = 0.05f;
|
||||
public float constantBias = 0.001f;
|
||||
|
||||
/** Amount by which the maximum sampling error is scaled. The resulting value is used
|
||||
* to move the shadow away from the fragment normal. Should be 1.0.
|
||||
* This is ignored when the View's ShadowType is set to VSM.
|
||||
*/
|
||||
public float normalBias = 0.4f;
|
||||
public float normalBias = 1.0f;
|
||||
|
||||
/** Distance from the camera after which shadows are clipped. This is used to clip
|
||||
* shadows that are too far and wouldn't contribute to the scene much, improving
|
||||
@@ -279,7 +281,24 @@ public class LightManager {
|
||||
* When set to true, all resolution enhancing features that can affect stability are
|
||||
* disabling, resulting in significantly lower resolution shadows, albeit stable ones.
|
||||
*/
|
||||
public boolean stable = true;
|
||||
public boolean stable = false;
|
||||
|
||||
/**
|
||||
* Constant bias in depth-resolution units by which shadows are moved away from the
|
||||
* light. The default value of 0.5 is used to round depth values up.
|
||||
* Generally this value shouldn't be changed or at least be small and positive.
|
||||
* This is ignored when the View's ShadowType is set to VSM.
|
||||
*/
|
||||
float polygonOffsetConstant = 0.5f;
|
||||
|
||||
/**
|
||||
* Bias based on the change in depth in depth-resolution units by which shadows are moved
|
||||
* away from the light. The default value of 2.0 works well with SHADOW_SAMPLING_PCF_LOW.
|
||||
* Generally this value is between 0.5 and the size in texel of the PCF filter.
|
||||
* Setting this value correctly is essential for LISPSM shadow-maps.
|
||||
* This is ignored when the View's ShadowType is set to VSM.
|
||||
*/
|
||||
float polygonOffsetSlope = 2.0f;
|
||||
|
||||
/**
|
||||
* Whether screen-space contact shadows are used. This applies regardless of whether a
|
||||
@@ -471,7 +490,9 @@ public class LightManager {
|
||||
nBuilderShadowOptions(mNativeBuilder,
|
||||
options.mapSize, options.shadowCascades, options.cascadeSplitPositions,
|
||||
options.constantBias, options.normalBias, options.shadowFar, options.shadowNearHint,
|
||||
options.shadowFarHint, options.stable, options.screenSpaceContactShadows,
|
||||
options.shadowFarHint, options.stable,
|
||||
options.polygonOffsetConstant, options.polygonOffsetSlope,
|
||||
options.screenSpaceContactShadows,
|
||||
options.stepCount, options.maxShadowDistance, options.vsmMsaaSamples,
|
||||
options.blurWidth);
|
||||
return this;
|
||||
@@ -762,7 +783,7 @@ public class LightManager {
|
||||
|
||||
@NonNull
|
||||
public Type getType(@EntityInstance int i) {
|
||||
return Type.values()[nGetType(mNativeObject, i)];
|
||||
return sTypeValues[nGetType(mNativeObject, i)];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1131,7 +1152,7 @@ public class LightManager {
|
||||
private static native void nDestroyBuilder(long nativeBuilder);
|
||||
private static native boolean nBuilderBuild(long nativeBuilder, long nativeEngine, int entity);
|
||||
private static native void nBuilderCastShadows(long nativeBuilder, boolean enable);
|
||||
private static native void nBuilderShadowOptions(long nativeBuilder, int mapSize, int cascades, float[] splitPositions, float constantBias, float normalBias, float shadowFar, float shadowNearHint, float shadowFarhint, boolean stable, boolean screenSpaceContactShadows, int stepCount, float maxShadowDistance, int vsmMsaaSamples, float blurWidth);
|
||||
private static native void nBuilderShadowOptions(long nativeBuilder, int mapSize, int cascades, float[] splitPositions, float constantBias, float normalBias, float shadowFar, float shadowNearHint, float shadowFarhint, boolean stable, float polygonOffsetConstant, float polygonOffsetSlope, boolean screenSpaceContactShadows, int stepCount, float maxShadowDistance, int vsmMsaaSamples, float blurWidth);
|
||||
private static native void nBuilderCastLight(long nativeBuilder, boolean enabled);
|
||||
private static native void nBuilderPosition(long nativeBuilder, float x, float y, float z);
|
||||
private static native void nBuilderDirection(long nativeBuilder, float x, float y, float z);
|
||||
|
||||
@@ -37,6 +37,20 @@ import java.util.Set;
|
||||
* @see <a href="https://google.github.io/filament/Materials.html">Filament Materials Guide</a>
|
||||
*/
|
||||
public class Material {
|
||||
static final class EnumCache {
|
||||
private EnumCache() { }
|
||||
|
||||
static final Shading[] sShadingValues = Shading.values();
|
||||
static final Interpolation[] sInterpolationValues = Interpolation.values();
|
||||
static final BlendingMode[] sBlendingModeValues = BlendingMode.values();
|
||||
static final RefractionMode[] sRefractionModeValues = RefractionMode.values();
|
||||
static final RefractionType[] sRefractionTypeValues = RefractionType.values();
|
||||
static final VertexDomain[] sVertexDomainValues = VertexDomain.values();
|
||||
static final CullingMode[] sCullingModeValues = CullingMode.values();
|
||||
static final VertexBuffer.VertexAttribute[] sVertexAttributeValues =
|
||||
VertexBuffer.VertexAttribute.values();
|
||||
}
|
||||
|
||||
private long mNativeObject;
|
||||
private final MaterialInstance mDefaultInstance;
|
||||
|
||||
@@ -210,6 +224,8 @@ public class Material {
|
||||
|
||||
@UsedByNative("Material.cpp")
|
||||
public static class Parameter {
|
||||
private static final Type[] sTypeValues = Type.values();
|
||||
|
||||
public enum Type {
|
||||
BOOL,
|
||||
BOOL2,
|
||||
@@ -275,7 +291,7 @@ public class Material {
|
||||
@IntRange(from = 0) int type, @IntRange(from = 0) int precision,
|
||||
@IntRange(from = 1) int count) {
|
||||
parameters.add(
|
||||
new Parameter(name, Type.values()[type], Precision.values()[precision], count));
|
||||
new Parameter(name, sTypeValues[type], Precision.values()[precision], count));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +389,7 @@ public class Material {
|
||||
* Material Models</a>
|
||||
*/
|
||||
public Shading getShading() {
|
||||
return Shading.values()[nGetShading(getNativeObject())];
|
||||
return EnumCache.sShadingValues[nGetShading(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -384,7 +400,7 @@ public class Material {
|
||||
* Vertex and attributes: interpolation</a>
|
||||
*/
|
||||
public Interpolation getInterpolation() {
|
||||
return Interpolation.values()[nGetInterpolation(getNativeObject())];
|
||||
return EnumCache.sInterpolationValues[nGetInterpolation(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -395,7 +411,7 @@ public class Material {
|
||||
* Blending and transparency: blending</a>
|
||||
*/
|
||||
public BlendingMode getBlendingMode() {
|
||||
return BlendingMode.values()[nGetBlendingMode(getNativeObject())];
|
||||
return EnumCache.sBlendingModeValues[nGetBlendingMode(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -406,7 +422,7 @@ public class Material {
|
||||
* Blending and transparency: refraction</a>
|
||||
*/
|
||||
public RefractionMode getRefractionMode() {
|
||||
return RefractionMode.values()[nGetRefractionMode(getNativeObject())];
|
||||
return EnumCache.sRefractionModeValues[nGetRefractionMode(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -417,10 +433,9 @@ public class Material {
|
||||
* Blending and transparency: refractionType</a>
|
||||
*/
|
||||
public RefractionType getRefractionType() {
|
||||
return RefractionType.values()[nGetRefractionType(getNativeObject())];
|
||||
return EnumCache.sRefractionTypeValues[nGetRefractionType(getNativeObject())];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the vertex domain of this material.
|
||||
*
|
||||
@@ -429,7 +444,7 @@ public class Material {
|
||||
* Vertex and attributes: vertexDomain</a>
|
||||
*/
|
||||
public VertexDomain getVertexDomain() {
|
||||
return VertexDomain.values()[nGetVertexDomain(getNativeObject())];
|
||||
return EnumCache.sVertexDomainValues[nGetVertexDomain(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -440,7 +455,7 @@ public class Material {
|
||||
* Rasterization: culling</a>
|
||||
*/
|
||||
public CullingMode getCullingMode() {
|
||||
return CullingMode.values()[nGetCullingMode(getNativeObject())];
|
||||
return EnumCache.sCullingModeValues[nGetCullingMode(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -531,7 +546,7 @@ public class Material {
|
||||
if (mRequiredAttributes == null) {
|
||||
int bitSet = nGetRequiredAttributes(getNativeObject());
|
||||
mRequiredAttributes = EnumSet.noneOf(VertexBuffer.VertexAttribute.class);
|
||||
VertexBuffer.VertexAttribute[] values = VertexBuffer.VertexAttribute.values();
|
||||
VertexBuffer.VertexAttribute[] values = EnumCache.sVertexAttributeValues;
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if ((bitSet & (1 << i)) != 0) {
|
||||
mRequiredAttributes.add(values[i]);
|
||||
|
||||
@@ -56,6 +56,7 @@ public class MaterialInstance {
|
||||
|
||||
MaterialInstance(@NonNull Material material, long nativeMaterialInstance) {
|
||||
mMaterial = material;
|
||||
mNativeMaterial = material.getNativeObject();
|
||||
mNativeObject = nativeMaterialInstance;
|
||||
}
|
||||
|
||||
@@ -77,7 +78,7 @@ public class MaterialInstance {
|
||||
public static MaterialInstance duplicate(@NonNull MaterialInstance other, String name) {
|
||||
long nativeInstance = nDuplicate(other.mNativeObject, name);
|
||||
if (nativeInstance == 0) throw new IllegalStateException("Couldn't duplicate MaterialInstance");
|
||||
return new MaterialInstance(other.mMaterial, nativeInstance);
|
||||
return new MaterialInstance(other.getMaterial(), nativeInstance);
|
||||
}
|
||||
|
||||
/** @return the {@link Material} associated with this instance */
|
||||
|
||||
@@ -31,8 +31,10 @@ import androidx.annotation.Nullable;
|
||||
* @see View
|
||||
*/
|
||||
public class RenderTarget {
|
||||
private long mNativeObject;
|
||||
private static final int ATTACHMENT_COUNT = AttachmentPoint.values().length;
|
||||
private static final Texture.CubemapFace[] sCubemapFaceValues = Texture.CubemapFace.values();
|
||||
|
||||
private long mNativeObject;
|
||||
private final Texture[] mTextures = new Texture[ATTACHMENT_COUNT];
|
||||
|
||||
private RenderTarget(long nativeRenderTarget, Builder builder) {
|
||||
@@ -194,7 +196,7 @@ public class RenderTarget {
|
||||
* a cubemap.
|
||||
*/
|
||||
public Texture.CubemapFace getFace(AttachmentPoint attachment) {
|
||||
return Texture.CubemapFace.values()[nGetFace(getNativeObject(), attachment.ordinal())];
|
||||
return sCubemapFaceValues[nGetFace(getNativeObject(), attachment.ordinal())];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,6 +58,10 @@ import java.util.Set;
|
||||
*/
|
||||
public class RenderableManager {
|
||||
private static final String LOG_TAG = "Filament";
|
||||
|
||||
private static final VertexBuffer.VertexAttribute[] sVertexAttributeValues =
|
||||
VertexBuffer.VertexAttribute.values();
|
||||
|
||||
private long mNativeObject;
|
||||
|
||||
RenderableManager(long nativeRenderableManager) {
|
||||
@@ -712,15 +716,19 @@ public class RenderableManager {
|
||||
/**
|
||||
* Retrieves the set of enabled attribute slots in the given primitive's VertexBuffer.
|
||||
*/
|
||||
public Set<VertexBuffer.VertexAttribute> getEnabledAttributesAt(@EntityInstance int i, @IntRange(from = 0) int primitiveIndex) {
|
||||
public Set<VertexBuffer.VertexAttribute> getEnabledAttributesAt(
|
||||
@EntityInstance int i, @IntRange(from = 0) int primitiveIndex) {
|
||||
int bitSet = nGetEnabledAttributesAt(mNativeObject, i, primitiveIndex);
|
||||
Set<VertexBuffer.VertexAttribute> requiredAttributes = EnumSet.noneOf(VertexBuffer.VertexAttribute.class);
|
||||
VertexBuffer.VertexAttribute[] values = VertexBuffer.VertexAttribute.values();
|
||||
Set<VertexBuffer.VertexAttribute> requiredAttributes =
|
||||
EnumSet.noneOf(VertexBuffer.VertexAttribute.class);
|
||||
VertexBuffer.VertexAttribute[] values = sVertexAttributeValues;
|
||||
|
||||
for (int j = 0; j < values.length; j++) {
|
||||
if ((bitSet & (1 << j)) != 0) {
|
||||
requiredAttributes.add(values[j]);
|
||||
}
|
||||
}
|
||||
|
||||
requiredAttributes = Collections.unmodifiableSet(requiredAttributes);
|
||||
return requiredAttributes;
|
||||
}
|
||||
|
||||
@@ -107,12 +107,12 @@ public class Renderer {
|
||||
/**
|
||||
* Rate at which the scale will change to reach the target frame rate.
|
||||
*/
|
||||
public float scaleRate = 0.125f;
|
||||
public float scaleRate = 1.0f / 15.0f;
|
||||
|
||||
/**
|
||||
* History size. higher values, tend to filter more (clamped to 30).
|
||||
* History size. higher values, tend to filter more (clamped to 31).
|
||||
*/
|
||||
public int history = 9;
|
||||
public int history = 15;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -437,8 +437,9 @@ public class Renderer {
|
||||
*</pre>
|
||||
*
|
||||
*
|
||||
* <p>Typically <code>readPixels</code> will be called after {@link #render} and before
|
||||
* {@link #endFrame}.</p>
|
||||
* <p><code>readPixels</code> must be called within a frame, meaning after {@link #beginFrame}
|
||||
* and before {@link #endFrame}. Typically, <code>readPixels</code> will be called after
|
||||
* {@link #render}.</p>
|
||||
* <br>
|
||||
* <p>After calling this method, the callback associated with <code>buffer</code>
|
||||
* will be invoked on the main thread, indicating that the read-back has completed.
|
||||
|
||||
@@ -91,6 +91,8 @@ import java.nio.ReadOnlyBufferException;
|
||||
* @see Engine#destroyStream
|
||||
*/
|
||||
public class Stream {
|
||||
private static final StreamType[] sStreamTypeValues = StreamType.values();
|
||||
|
||||
private long mNativeObject;
|
||||
private long mNativeEngine;
|
||||
|
||||
@@ -236,7 +238,7 @@ public class Stream {
|
||||
* Indicates whether this <code>Stream</code> is NATIVE, TEXTURE_ID, or ACQUIRED.
|
||||
*/
|
||||
public StreamType getStreamType() {
|
||||
return StreamType.values()[nGetStreamType(getNativeObject())];
|
||||
return sStreamTypeValues[nGetStreamType(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -71,6 +71,9 @@ import static com.google.android.filament.Texture.Type.COMPRESSED;
|
||||
* @see MaterialInstance#setParameter(String, Texture, TextureSampler)
|
||||
*/
|
||||
public class Texture {
|
||||
private static final Sampler[] sSamplerValues = Sampler.values();
|
||||
private static final InternalFormat[] sInternalFormatValues = InternalFormat.values();
|
||||
|
||||
private long mNativeObject;
|
||||
|
||||
public Texture(long nativeTexture) {
|
||||
@@ -216,7 +219,38 @@ public class Texture {
|
||||
ETC2_EAC_RGBA8, ETC2_EAC_SRGBA8,
|
||||
|
||||
// Available everywhere except Android/iOS
|
||||
DXT1_RGB, DXT1_RGBA, DXT3_RGBA, DXT5_RGBA
|
||||
DXT1_RGB, DXT1_RGBA, DXT3_RGBA, DXT5_RGBA,
|
||||
DXT1_SRGB, DXT1_SRGBA, DXT3_SRGBA, DXT5_SRGBA,
|
||||
|
||||
// ASTC formats are available with a GLES extension
|
||||
RGBA_ASTC_4x4,
|
||||
RGBA_ASTC_5x4,
|
||||
RGBA_ASTC_5x5,
|
||||
RGBA_ASTC_6x5,
|
||||
RGBA_ASTC_6x6,
|
||||
RGBA_ASTC_8x5,
|
||||
RGBA_ASTC_8x6,
|
||||
RGBA_ASTC_8x8,
|
||||
RGBA_ASTC_10x5,
|
||||
RGBA_ASTC_10x6,
|
||||
RGBA_ASTC_10x8,
|
||||
RGBA_ASTC_10x10,
|
||||
RGBA_ASTC_12x10,
|
||||
RGBA_ASTC_12x12,
|
||||
SRGB8_ALPHA8_ASTC_4x4,
|
||||
SRGB8_ALPHA8_ASTC_5x4,
|
||||
SRGB8_ALPHA8_ASTC_5x5,
|
||||
SRGB8_ALPHA8_ASTC_6x5,
|
||||
SRGB8_ALPHA8_ASTC_6x6,
|
||||
SRGB8_ALPHA8_ASTC_8x5,
|
||||
SRGB8_ALPHA8_ASTC_8x6,
|
||||
SRGB8_ALPHA8_ASTC_8x8,
|
||||
SRGB8_ALPHA8_ASTC_10x5,
|
||||
SRGB8_ALPHA8_ASTC_10x6,
|
||||
SRGB8_ALPHA8_ASTC_10x8,
|
||||
SRGB8_ALPHA8_ASTC_10x10,
|
||||
SRGB8_ALPHA8_ASTC_12x10,
|
||||
SRGB8_ALPHA8_ASTC_12x12
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,7 +265,38 @@ public class Texture {
|
||||
ETC2_EAC_RGBA8, ETC2_EAC_SRGBA8,
|
||||
|
||||
// Available everywhere except Android/iOS
|
||||
DXT1_RGB, DXT1_RGBA, DXT3_RGBA, DXT5_RGBA
|
||||
DXT1_RGB, DXT1_RGBA, DXT3_RGBA, DXT5_RGBA,
|
||||
DXT1_SRGB, DXT1_SRGBA, DXT3_SRGBA, DXT5_SRGBA,
|
||||
|
||||
// ASTC formats are available with a GLES extension
|
||||
RGBA_ASTC_4x4,
|
||||
RGBA_ASTC_5x4,
|
||||
RGBA_ASTC_5x5,
|
||||
RGBA_ASTC_6x5,
|
||||
RGBA_ASTC_6x6,
|
||||
RGBA_ASTC_8x5,
|
||||
RGBA_ASTC_8x6,
|
||||
RGBA_ASTC_8x8,
|
||||
RGBA_ASTC_10x5,
|
||||
RGBA_ASTC_10x6,
|
||||
RGBA_ASTC_10x8,
|
||||
RGBA_ASTC_10x10,
|
||||
RGBA_ASTC_12x10,
|
||||
RGBA_ASTC_12x12,
|
||||
SRGB8_ALPHA8_ASTC_4x4,
|
||||
SRGB8_ALPHA8_ASTC_5x4,
|
||||
SRGB8_ALPHA8_ASTC_5x5,
|
||||
SRGB8_ALPHA8_ASTC_6x5,
|
||||
SRGB8_ALPHA8_ASTC_6x6,
|
||||
SRGB8_ALPHA8_ASTC_8x5,
|
||||
SRGB8_ALPHA8_ASTC_8x6,
|
||||
SRGB8_ALPHA8_ASTC_8x8,
|
||||
SRGB8_ALPHA8_ASTC_10x5,
|
||||
SRGB8_ALPHA8_ASTC_10x6,
|
||||
SRGB8_ALPHA8_ASTC_10x8,
|
||||
SRGB8_ALPHA8_ASTC_10x10,
|
||||
SRGB8_ALPHA8_ASTC_12x10,
|
||||
SRGB8_ALPHA8_ASTC_12x12
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -805,7 +870,7 @@ public class Texture {
|
||||
*/
|
||||
@NonNull
|
||||
public Sampler getTarget() {
|
||||
return Sampler.values()[nGetTarget(getNativeObject())];
|
||||
return sSamplerValues[nGetTarget(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -813,7 +878,7 @@ public class Texture {
|
||||
*/
|
||||
@NonNull
|
||||
public InternalFormat getFormat() {
|
||||
return InternalFormat.values()[nGetInternalFormat(getNativeObject())];
|
||||
return sInternalFormatValues[nGetInternalFormat(getNativeObject())];
|
||||
}
|
||||
|
||||
// TODO: add a setImage() version that takes an android Bitmap
|
||||
|
||||
@@ -22,6 +22,14 @@ import androidx.annotation.NonNull;
|
||||
* <code>TextureSampler</code> defines how a texture is accessed.
|
||||
*/
|
||||
public class TextureSampler {
|
||||
static final class EnumCache {
|
||||
static final MinFilter[] sMinFilterValues = MinFilter.values();
|
||||
static final MagFilter[] sMagFilterValues = MagFilter.values();
|
||||
static final WrapMode[] sWrapModeValues = WrapMode.values();
|
||||
static final CompareMode[] sCompareModeValues = CompareMode.values();
|
||||
static final CompareFunction[] sCompareFunctionValues = CompareFunction.values();
|
||||
}
|
||||
|
||||
public enum WrapMode {
|
||||
/**
|
||||
* The edge of the texture extends to infinity.
|
||||
@@ -202,7 +210,7 @@ public class TextureSampler {
|
||||
* @return the minification filter
|
||||
*/
|
||||
public MinFilter getMinFilter() {
|
||||
return MinFilter.values()[nGetMinFilter(mSampler)];
|
||||
return EnumCache.sMinFilterValues[nGetMinFilter(mSampler)];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,7 +226,7 @@ public class TextureSampler {
|
||||
* @return the magnification filter
|
||||
*/
|
||||
public MagFilter getMagFilter() {
|
||||
return MagFilter.values()[nGetMagFilter(mSampler)];
|
||||
return EnumCache.sMagFilterValues[nGetMagFilter(mSampler)];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -234,7 +242,7 @@ public class TextureSampler {
|
||||
* @return the wrapping mode in the s (horizontal) direction
|
||||
*/
|
||||
public WrapMode getWrapModeS() {
|
||||
return WrapMode.values()[nGetWrapModeS(mSampler)];
|
||||
return EnumCache.sWrapModeValues[nGetWrapModeS(mSampler)];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -249,7 +257,7 @@ public class TextureSampler {
|
||||
* @return the wrapping mode in the t (vertical) direction
|
||||
*/
|
||||
public WrapMode getWrapModeT() {
|
||||
return WrapMode.values()[nGetWrapModeT(mSampler)];
|
||||
return EnumCache.sWrapModeValues[nGetWrapModeT(mSampler)];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -264,7 +272,7 @@ public class TextureSampler {
|
||||
* @return the wrapping mode in the r (depth) direction
|
||||
*/
|
||||
public WrapMode getWrapModeR() {
|
||||
return WrapMode.values()[nGetWrapModeR(mSampler)];
|
||||
return EnumCache.sWrapModeValues[nGetWrapModeR(mSampler)];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -297,7 +305,7 @@ public class TextureSampler {
|
||||
* @return the comparison mode
|
||||
*/
|
||||
public CompareMode getCompareMode() {
|
||||
return CompareMode.values()[nGetCompareMode(mSampler)];
|
||||
return EnumCache.sCompareModeValues[nGetCompareMode(mSampler)];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -313,7 +321,7 @@ public class TextureSampler {
|
||||
* @return the comparison function
|
||||
*/
|
||||
public CompareFunction getCompareFunction() {
|
||||
return CompareFunction.values()[nGetCompareFunction(mSampler)];
|
||||
return EnumCache.sCompareFunctionValues[nGetCompareFunction(mSampler)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -123,15 +123,15 @@ public class ToneMapper {
|
||||
* the {@link ACESLegacy} tone mapper. The default values are:
|
||||
*
|
||||
* <ul>
|
||||
* <li>contrast = 1.4f</li>
|
||||
* <li>contrast = 1.585f</li>
|
||||
* <li>shoulder = 0.5f</li>
|
||||
* <li>midGrayIn = 0.18f</li>
|
||||
* <li>midGrayOut = 0.266f</li>
|
||||
* <li>midGrayOut = 0.268f</li>
|
||||
* <li>hdrMax = 10.0f</li>
|
||||
* </ul>
|
||||
*/
|
||||
public Generic() {
|
||||
this(1.4f, 0.5f, 0.18f, 0.266f, 10.0f);
|
||||
this(1.585f, 0.5f, 0.18f, 0.268f, 10.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -83,6 +83,35 @@ import androidx.annotation.Size;
|
||||
return nGetInstance(mNativeObject, entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables or disable the accurate translation mode. Disabled by default.
|
||||
*
|
||||
* When accurate translation mode is active, the translation component of all transforms is
|
||||
* maintained at double precision. This is only useful if the mat4 version of setTransform()
|
||||
* is used, as well as getTransformAccurate().
|
||||
*
|
||||
* @param enable true to enable the accurate translation mode, false to disable.
|
||||
*
|
||||
* @see #isAccurateTranslationsEnabled
|
||||
* @see #create(int, int, double[])
|
||||
* @see #setTransform(int, double[])
|
||||
* @see #getTransform(int, double[])
|
||||
* @see #getWorldTransform(int, double[])
|
||||
*/
|
||||
public void setAccurateTranslationsEnabled(boolean enable) {
|
||||
nSetAccurateTranslationsEnabled(mNativeObject, enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the high precision translation mode is active.
|
||||
*
|
||||
* @return true if accurate translations mode is active, false otherwise
|
||||
* @see #setAccurateTranslationsEnabled
|
||||
*/
|
||||
public boolean isAccurateTranslationsEnabled() {
|
||||
return nIsAccurateTranslationsEnabled(mNativeObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a transform component and associates it with the given entity. The component is
|
||||
* initialized with the identity transform.
|
||||
@@ -114,6 +143,23 @@ import androidx.annotation.Size;
|
||||
return nCreateArray(mNativeObject, entity, parent, localTransform);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a transform component with a parent and associates it with the given entity.
|
||||
* If this component already exists on the given entity, it is first
|
||||
* destroyed as if {@link #destroy} was called.
|
||||
*
|
||||
* @param entity an {@link Entity} to associate a transform component to.
|
||||
* @param parent the {@link EntityInstance} of the parent transform
|
||||
* @param localTransform the transform, relative to the parent, to initialize the transform
|
||||
* component with.
|
||||
* @see #destroy
|
||||
*/
|
||||
@EntityInstance
|
||||
public int create(@Entity int entity, @EntityInstance int parent,
|
||||
@Nullable @Size(min = 16) double[] localTransform) {
|
||||
return nCreateArrayFp64(mNativeObject, entity, parent, localTransform);
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys this component from the given entity, children are orphaned.
|
||||
*
|
||||
@@ -170,6 +216,24 @@ import androidx.annotation.Size;
|
||||
nSetTransform(mNativeObject, i, localTransform);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a local transform of a transform component.
|
||||
* <p>This operation can be slow if the hierarchy of transform is too deep, and this
|
||||
* will be particularly bad when updating a lot of transforms. In that case,
|
||||
* consider using {@link #openLocalTransformTransaction} / {@link #commitLocalTransformTransaction}.</p>
|
||||
*
|
||||
* @param i the {@link EntityInstance} of the transform component to set the local
|
||||
* transform to.
|
||||
* @param localTransform the local transform (i.e. relative to the parent).
|
||||
* @see #getTransform(int, double[])
|
||||
* @see #getWorldTransform(int, double[])
|
||||
*/
|
||||
public void setTransform(@EntityInstance int i,
|
||||
@NonNull @Size(min = 16) double[] localTransform) {
|
||||
Asserts.assertMat4In(localTransform);
|
||||
nSetTransformFp64(mNativeObject, i, localTransform);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the local transform of a transform component.
|
||||
*
|
||||
@@ -190,6 +254,26 @@ import androidx.annotation.Size;
|
||||
return outLocalTransform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the local transform of a transform component.
|
||||
*
|
||||
* @param i the {@link EntityInstance} of the transform component to query the
|
||||
* local transform from.
|
||||
* @param outLocalTransform a 16 <code>float</code> array to receive the result.
|
||||
* If <code>null</code> is given, a new suitable array is allocated.
|
||||
* @return the local transform of the component (i.e. relative to the parent). This always
|
||||
* returns the value set by setTransform().
|
||||
* @see #setTransform
|
||||
*/
|
||||
@NonNull
|
||||
@Size(min = 16)
|
||||
public double[] getTransform(@EntityInstance int i,
|
||||
@Nullable @Size(min = 16) double[] outLocalTransform) {
|
||||
outLocalTransform = Asserts.assertMat4(outLocalTransform);
|
||||
nGetTransformFp64(mNativeObject, i, outLocalTransform);
|
||||
return outLocalTransform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the world transform of a transform component.
|
||||
*
|
||||
@@ -210,6 +294,26 @@ import androidx.annotation.Size;
|
||||
return outWorldTransform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the world transform of a transform component.
|
||||
*
|
||||
* @param i the {@link EntityInstance} of the transform component to query the
|
||||
* world transform from.
|
||||
* @param outWorldTransform a 16 <code>float</code> array to receive the result.
|
||||
* If <code>null</code> is given, a new suitable array is allocated
|
||||
* @return The world transform of the component (i.e. relative to the root). This is the
|
||||
* composition of this component's local transform with its parent's world transform.
|
||||
* @see #setTransform
|
||||
*/
|
||||
@NonNull
|
||||
@Size(min = 16)
|
||||
public double[] getWorldTransform(@EntityInstance int i,
|
||||
@Nullable @Size(min = 16) double[] outWorldTransform) {
|
||||
outWorldTransform = Asserts.assertMat4(outWorldTransform);
|
||||
nGetWorldTransformFp64(mNativeObject, i, outWorldTransform);
|
||||
return outWorldTransform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a local transform transaction. During a transaction, {@link #getWorldTransform} can
|
||||
* return an invalid transform until {@link #commitLocalTransformTransaction} is called.
|
||||
@@ -252,12 +356,18 @@ import androidx.annotation.Size;
|
||||
private static native int nGetInstance(long nativeTransformManager, int entity);
|
||||
private static native int nCreate(long nativeTransformManager, int entity);
|
||||
private static native int nCreateArray(long mNativeObject, int entity, int parent, float[] localTransform);
|
||||
private static native int nCreateArrayFp64(long mNativeObject, int entity, int parent, double[] localTransform);
|
||||
private static native void nDestroy(long nativeTransformManager, int entity);
|
||||
private static native void nSetParent(long nativeTransformManager, int i, int newParent);
|
||||
private static native int nGetParent(long nativeTransformManager, int i);
|
||||
private static native void nSetTransform(long nativeTransformManager, int i, float[] localTransform);
|
||||
private static native void nSetTransformFp64(long nativeTransformManager, int i, double[] localTransform);
|
||||
private static native void nGetTransform(long nativeTransformManager, int i, float[] outLocalTransform);
|
||||
private static native void nGetTransformFp64(long nativeTransformManager, int i, double[] outLocalTransform);
|
||||
private static native void nGetWorldTransform(long nativeTransformManager, int i, float[] outWorldTransform);
|
||||
private static native void nGetWorldTransformFp64(long nativeTransformManager, int i, double[] outWorldTransform);
|
||||
private static native void nOpenLocalTransformTransaction(long nativeTransformManager);
|
||||
private static native void nCommitLocalTransformTransaction(long nativeTransformManager);
|
||||
private static native void nSetAccurateTranslationsEnabled(long nativeTransformManager, boolean enable);
|
||||
private static native boolean nIsAccurateTranslationsEnabled(long nativeTransformManager);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,10 @@ import static com.google.android.filament.Colors.LinearColor;
|
||||
* @see RenderTarget
|
||||
*/
|
||||
public class View {
|
||||
private static final AntiAliasing[] sAntiAliasingValues = AntiAliasing.values();
|
||||
private static final Dithering[] sDitheringValues = Dithering.values();
|
||||
private static final AmbientOcclusion[] sAmbientOcclusionValues = AmbientOcclusion.values();
|
||||
|
||||
private long mNativeObject;
|
||||
private String mName;
|
||||
private Scene mScene;
|
||||
@@ -75,6 +79,7 @@ public class View {
|
||||
private VignetteOptions mVignetteOptions;
|
||||
private ColorGrading mColorGrading;
|
||||
private TemporalAntiAliasingOptions mTemporalAntiAliasingOptions;
|
||||
private MultiSampleAntiAliasingOptions mMultiSampleAntiAliasingOptions;
|
||||
private VsmShadowOptions mVsmShadowOptions;
|
||||
|
||||
/**
|
||||
@@ -131,8 +136,20 @@ public class View {
|
||||
public float maxScale = 1.0f;
|
||||
|
||||
/**
|
||||
* Upscaling quality. LOW: 1 bilinear tap, MEDIUM: 4 bilinear taps, HIGH: 9 bilinear taps.
|
||||
* If minScale needs to be very low, it might help to use MEDIUM or HIGH here.
|
||||
* Sharpness when QualityLevel.MEDIUM or higher is used [0, 1].
|
||||
* 0 is disabled, 1 is the sharpest setting.
|
||||
* The default is set to 0.9
|
||||
*/
|
||||
public float sharpness = 0.9f;
|
||||
|
||||
/**
|
||||
* Upscaling quality
|
||||
* LOW: bilinear filtered blit. Fastest, poor quality
|
||||
* MEDIUM: AMD FidelityFX FSR1 w/ mobile optimizations no RCAS sharpening pass
|
||||
* HIGH: AMD FidelityFX FSR1 w/ mobile optimizations + RCAS
|
||||
* ULTRA: AMD FidelityFX FSR1
|
||||
* FSR1 require a well anti-aliased (MSAA or TAA), noise free scene.
|
||||
*
|
||||
* The default upscaling quality is set to LOW.
|
||||
*/
|
||||
@NonNull
|
||||
@@ -279,6 +296,29 @@ public class View {
|
||||
public boolean ssctEnabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for Multi-sample Anti-aliasing (MSAA)
|
||||
* @see View#setMultiSampleAntiAliasingOptions
|
||||
*/
|
||||
public static class MultiSampleAntiAliasingOptions {
|
||||
/** enables or disables temporal anti-aliasing */
|
||||
public boolean enabled = false;
|
||||
|
||||
/**
|
||||
* number of samples to use for multi-sampled anti-aliasing.\n
|
||||
* 0: treated as 1
|
||||
* 1: no anti-aliasing
|
||||
* n: sample count. Effective sample could be different depending on the
|
||||
* GPU capabilities.
|
||||
*/
|
||||
public int sampleCount = 4;
|
||||
|
||||
/**
|
||||
* custom resolve improves quality for HDR scenes, but may impact performance.
|
||||
*/
|
||||
public boolean customResolve = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Options for Temporal Anti-aliasing (TAA)
|
||||
* @see View#setTemporalAntiAliasingOptions
|
||||
@@ -1035,7 +1075,10 @@ public class View {
|
||||
* </p>
|
||||
*
|
||||
* @param count number of samples to use for multi-sampled anti-aliasing.
|
||||
*
|
||||
* @deprecated use setMultiSampleAntiAliasingOptions instead
|
||||
*/
|
||||
@Deprecated
|
||||
public void setSampleCount(int count) {
|
||||
nSetSampleCount(getNativeObject(), count);
|
||||
}
|
||||
@@ -1048,7 +1091,10 @@ public class View {
|
||||
* </p>
|
||||
*
|
||||
* @return value set by {@link #setSampleCount}
|
||||
*
|
||||
* @deprecated use getMultiSampleAntiAliasingOptions instead
|
||||
*/
|
||||
@Deprecated
|
||||
public int getSampleCount() {
|
||||
return nGetSampleCount(getNativeObject());
|
||||
}
|
||||
@@ -1074,7 +1120,31 @@ public class View {
|
||||
*/
|
||||
@NonNull
|
||||
public AntiAliasing getAntiAliasing() {
|
||||
return AntiAliasing.values()[nGetAntiAliasing(getNativeObject())];
|
||||
return sAntiAliasingValues[nGetAntiAliasing(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables or disable multi-sample anti-aliasing (MSAA). Disabled by default.
|
||||
*
|
||||
* @param options multi-sample anti-aliasing options
|
||||
*/
|
||||
public void setMultiSampleAntiAliasingOptions(@NonNull MultiSampleAntiAliasingOptions options) {
|
||||
mMultiSampleAntiAliasingOptions = options;
|
||||
nSetMultiSampleAntiAliasingOptions(getNativeObject(),
|
||||
options.enabled, options.sampleCount, options.customResolve);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns multi-sample anti-aliasing options.
|
||||
*
|
||||
* @return multi-sample anti-aliasing options
|
||||
*/
|
||||
@NonNull
|
||||
public MultiSampleAntiAliasingOptions getMultiSampleAntiAliasingOptions() {
|
||||
if (mMultiSampleAntiAliasingOptions == null) {
|
||||
mMultiSampleAntiAliasingOptions = new MultiSampleAntiAliasingOptions();
|
||||
}
|
||||
return mMultiSampleAntiAliasingOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1163,7 +1233,7 @@ public class View {
|
||||
*/
|
||||
@NonNull
|
||||
public Dithering getDithering() {
|
||||
return Dithering.values()[nGetDithering(getNativeObject())];
|
||||
return sDitheringValues[nGetDithering(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1188,6 +1258,7 @@ public class View {
|
||||
options.homogeneousScaling,
|
||||
options.minScale,
|
||||
options.maxScale,
|
||||
options.sharpness,
|
||||
options.quality.ordinal());
|
||||
}
|
||||
|
||||
@@ -1382,7 +1453,7 @@ public class View {
|
||||
@Deprecated
|
||||
@NonNull
|
||||
public AmbientOcclusion getAmbientOcclusion() {
|
||||
return AmbientOcclusion.values()[nGetAmbientOcclusion(getNativeObject())];
|
||||
return sAmbientOcclusionValues[nGetAmbientOcclusion(getNativeObject())];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1535,6 +1606,71 @@ public class View {
|
||||
return mDepthOfFieldOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* A class containing the result of a picking query
|
||||
*/
|
||||
public static class PickingQueryResult {
|
||||
/** The entity of the renderable at the picking query location */
|
||||
@Entity public int renderable;
|
||||
/** The value of the depth buffer at the picking query location */
|
||||
public float depth;
|
||||
/** The fragment coordinate in GL convention at the picking query location */
|
||||
@NonNull public float[] fragCoords = new float[3];
|
||||
};
|
||||
|
||||
/**
|
||||
* An interface to implement a custom class to receive results of picking queries.
|
||||
*/
|
||||
public interface OnPickCallback {
|
||||
/**
|
||||
* onPick() is called by the specified Handler in {@link View#pick} when the picking query
|
||||
* result is available.
|
||||
* @param result An instance of {@link PickingQueryResult}.
|
||||
*/
|
||||
void onPick(@NonNull PickingQueryResult result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a picking query. Multiple queries can be created (e.g.: multi-touch).
|
||||
* Picking queries are all executed when {@link Renderer#render} is called on this View.
|
||||
* The provided callback is guaranteed to be called at some point in the future.
|
||||
*
|
||||
* Typically it takes a couple frames to receive the result of a picking query.
|
||||
*
|
||||
* @param x Horizontal coordinate to query in the viewport with origin on the left.
|
||||
* @param y Vertical coordinate to query on the viewport with origin at the bottom.
|
||||
* @param handler An {@link java.util.concurrent.Executor Executor}.
|
||||
* On Android this can also be a {@link android.os.Handler Handler}.
|
||||
* @param callback User callback executed by <code>handler</code> when the picking query
|
||||
* result is available.
|
||||
*/
|
||||
public void pick(int x, int y,
|
||||
@Nullable Object handler, @Nullable OnPickCallback callback) {
|
||||
InternalOnPickCallback internalCallback = new InternalOnPickCallback(callback);
|
||||
nPick(getNativeObject(), x, y, handler, internalCallback);
|
||||
}
|
||||
|
||||
private static class InternalOnPickCallback implements Runnable {
|
||||
public InternalOnPickCallback(OnPickCallback mUserCallback) {
|
||||
this.mUserCallback = mUserCallback;
|
||||
}
|
||||
@Override
|
||||
public void run() {
|
||||
mPickingQueryResult.renderable = mRenderable;
|
||||
mPickingQueryResult.depth = mDepth;
|
||||
mPickingQueryResult.fragCoords[0] = mFragCoordsX;
|
||||
mPickingQueryResult.fragCoords[1] = mFragCoordsY;
|
||||
mPickingQueryResult.fragCoords[2] = mFragCoordsZ;
|
||||
mUserCallback.onPick(mPickingQueryResult);
|
||||
}
|
||||
private final OnPickCallback mUserCallback;
|
||||
private final PickingQueryResult mPickingQueryResult = new PickingQueryResult();
|
||||
@Entity int mRenderable;
|
||||
float mDepth;
|
||||
float mFragCoordsX;
|
||||
float mFragCoordsY;
|
||||
float mFragCoordsZ;
|
||||
}
|
||||
|
||||
public long getNativeObject() {
|
||||
if (mNativeObject == 0) {
|
||||
@@ -1560,7 +1696,7 @@ public class View {
|
||||
private static native int nGetAntiAliasing(long nativeView);
|
||||
private static native void nSetDithering(long nativeView, int dithering);
|
||||
private static native int nGetDithering(long nativeView);
|
||||
private static native void nSetDynamicResolutionOptions(long nativeView, boolean enabled, boolean homogeneousScaling, float minScale, float maxScale, int quality);
|
||||
private static native void nSetDynamicResolutionOptions(long nativeView, boolean enabled, boolean homogeneousScaling, float minScale, float maxScale, float sharpness, int quality);
|
||||
private static native void nSetRenderQuality(long nativeView, int hdrColorBufferQuality);
|
||||
private static native void nSetDynamicLightingOptions(long nativeView, float zLightNear, float zLightFar);
|
||||
private static native void nSetShadowType(long nativeView, int type);
|
||||
@@ -1582,7 +1718,9 @@ public class View {
|
||||
boolean nativeResolution, int foregroundRingCount, int backgroundRingCount, int fastGatherRingCount, int maxForegroundCOC, int maxBackgroundCOC);
|
||||
private static native void nSetVignetteOptions(long nativeView, float midPoint, float roundness, float feather, float r, float g, float b, float a, boolean enabled);
|
||||
private static native void nSetTemporalAntiAliasingOptions(long nativeView, float feedback, float filterWidth, boolean enabled);
|
||||
private static native void nSetMultiSampleAntiAliasingOptions(long nativeView, boolean enabled, int sampleCount, boolean customResolve);
|
||||
private static native boolean nIsShadowingEnabled(long nativeView);
|
||||
private static native void nSetScreenSpaceRefractionEnabled(long nativeView, boolean enabled);
|
||||
private static native boolean nIsScreenSpaceRefractionEnabled(long nativeView);
|
||||
private static native void nPick(long nativeView, int x, int y, Object handler, InternalOnPickCallback internalCallback);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ target_compile_definitions(filament-utils-jni PUBLIC IMAGEIO_LITE=1)
|
||||
target_include_directories(filament-utils-jni PRIVATE
|
||||
${FILAMENT_DIR}/include
|
||||
..
|
||||
../../filament/backend/include
|
||||
${IMAGEIO_DIR}/include
|
||||
../../libs/utils/include)
|
||||
|
||||
|
||||
@@ -9,6 +9,13 @@ android {
|
||||
|
||||
lite {
|
||||
dimension "functionality"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
// hack: this is needed because filament-utils-android/CMakeLists.txt builds
|
||||
// gltfio from source, which needs this defined
|
||||
arguments.add("-DGLTFIO_LITE=ON")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,13 +50,14 @@ configurations.all { config ->
|
||||
dependencies {
|
||||
implementation deps.kotlin
|
||||
implementation deps.androidx.annotations
|
||||
implementation project(':filament-android')
|
||||
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
|
||||
|
||||
fullImplementation module("com.google.android.filament:gltfio-android:${VERSION_NAME}")
|
||||
liteImplementation module("com.google.android.filament:gltfio-android-lite:${VERSION_NAME}")
|
||||
api project(':filament-android')
|
||||
|
||||
fullApi module("com.google.android.filament:gltfio-android:${VERSION_NAME}")
|
||||
liteApi module("com.google.android.filament:gltfio-android-lite:${VERSION_NAME}")
|
||||
}
|
||||
|
||||
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
|
||||
|
||||
@@ -32,9 +32,13 @@ import com.google.android.filament.Texture;
|
||||
* Texture equirect = HDRLoader.createTexture("foo.hdr");
|
||||
* Texture skyboxTexture = equirectangularToCubemap.run(equirect);
|
||||
* engine.destroy(equirect);
|
||||
* equirectangularToCubemap.destroy();
|
||||
*
|
||||
* specularFilter = new IBLPrefilterContext.SpecularFilter(context);
|
||||
* Texture reflections = specularFilter.run(skyboxTexture);
|
||||
* specularFilter.destroy();
|
||||
*
|
||||
* context.destroy();
|
||||
*
|
||||
* IndirectLight ibl = IndirectLight.Builder()
|
||||
* .reflections(reflections)
|
||||
@@ -43,81 +47,74 @@ import com.google.android.filament.Texture;
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
public class IBLPrefilterContext {
|
||||
private final long mNativeObject;
|
||||
private long mNativeObject;
|
||||
|
||||
public IBLPrefilterContext(Engine engine) {
|
||||
mNativeObject = nCreate(engine.getNativeObject());
|
||||
if (mNativeObject == 0) throw new IllegalStateException("Couldn't create IBLPrefilterContext");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
nDestroy(mNativeObject);
|
||||
super.finalize();
|
||||
public void destroy() {
|
||||
nDestroy(getNativeObject());
|
||||
mNativeObject = 0;
|
||||
}
|
||||
|
||||
public static class EquirectangularToCubemap {
|
||||
@SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"}) // Keep to finalize native resources
|
||||
private final HelperFinalizer mFinalizer;
|
||||
private final long mNativeHelper;
|
||||
private long mNativeObject;
|
||||
|
||||
public EquirectangularToCubemap(IBLPrefilterContext context) {
|
||||
mNativeHelper = nCreateEquirectHelper(context.mNativeObject);
|
||||
mFinalizer = new HelperFinalizer(mNativeHelper);
|
||||
mNativeObject = nCreateEquirectHelper(context.getNativeObject());
|
||||
}
|
||||
|
||||
public Texture run(Texture equirect) {
|
||||
long nativeTexture = nEquirectHelperRun(mNativeHelper, equirect.getNativeObject());
|
||||
long nativeTexture = nEquirectHelperRun(getNativeObject(), equirect.getNativeObject());
|
||||
return new Texture(nativeTexture);
|
||||
}
|
||||
|
||||
private static class HelperFinalizer {
|
||||
private final long mNativeObject;
|
||||
public void destroy() {
|
||||
nDestroyEquirectHelper(getNativeObject());
|
||||
mNativeObject = 0;
|
||||
}
|
||||
|
||||
HelperFinalizer(long nativeObject) { mNativeObject = nativeObject; }
|
||||
|
||||
@Override
|
||||
public void finalize() {
|
||||
try {
|
||||
super.finalize();
|
||||
} catch (Throwable t) { // Ignore
|
||||
} finally {
|
||||
nDestroyEquirectHelper(mNativeObject);
|
||||
}
|
||||
protected long getNativeObject() {
|
||||
if (mNativeObject == 0) {
|
||||
throw new IllegalStateException("Calling method on destroyed EquirectangularToCubemap");
|
||||
}
|
||||
return mNativeObject;
|
||||
}
|
||||
}
|
||||
|
||||
public static class SpecularFilter {
|
||||
@SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"}) // Keep to finalize native resources
|
||||
private final HelperFinalizer mFinalizer;
|
||||
private final long mNativeHelper;
|
||||
private long mNativeObject;
|
||||
|
||||
public SpecularFilter(IBLPrefilterContext context) {
|
||||
mNativeHelper = nCreateSpecularFilter(context.mNativeObject);
|
||||
mFinalizer = new HelperFinalizer(mNativeHelper);
|
||||
mNativeObject = nCreateSpecularFilter(context.getNativeObject());
|
||||
}
|
||||
|
||||
public Texture run(Texture skybox) {
|
||||
long nativeTexture = nSpecularFilterRun(mNativeHelper, skybox.getNativeObject());
|
||||
long nativeTexture = nSpecularFilterRun(getNativeObject(), skybox.getNativeObject());
|
||||
return new Texture(nativeTexture);
|
||||
}
|
||||
|
||||
private static class HelperFinalizer {
|
||||
private final long mNativeObject;
|
||||
|
||||
HelperFinalizer(long nativeObject) { mNativeObject = nativeObject; }
|
||||
|
||||
@Override
|
||||
public void finalize() {
|
||||
try {
|
||||
super.finalize();
|
||||
} catch (Throwable t) { // Ignore
|
||||
} finally {
|
||||
nDestroySpecularFilter(mNativeObject);
|
||||
}
|
||||
}
|
||||
public void destroy() {
|
||||
nDestroySpecularFilter(getNativeObject());
|
||||
mNativeObject = 0;
|
||||
}
|
||||
|
||||
protected long getNativeObject() {
|
||||
if (mNativeObject == 0) {
|
||||
throw new IllegalStateException("Calling method on destroyed SpecularFilter");
|
||||
}
|
||||
return mNativeObject;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected long getNativeObject() {
|
||||
if (mNativeObject == 0) {
|
||||
throw new IllegalStateException("Calling method on destroyed IBLPrefilterContext");
|
||||
}
|
||||
return mNativeObject;
|
||||
}
|
||||
|
||||
private static native long nCreate(long nativeEngine);
|
||||
|
||||
@@ -32,7 +32,9 @@ import androidx.annotation.Size;
|
||||
* @see Bookmark
|
||||
*/
|
||||
public class Manipulator {
|
||||
private long mNativeObject;
|
||||
private static final Mode[] sModeValues = Mode.values();
|
||||
|
||||
private final long mNativeObject;
|
||||
|
||||
private Manipulator(long nativeIndexBuffer) {
|
||||
mNativeObject = nativeIndexBuffer;
|
||||
@@ -320,7 +322,7 @@ public class Manipulator {
|
||||
/**
|
||||
* Gets the immutable mode of the manipulator.
|
||||
*/
|
||||
public Mode getMode() { return Mode.values()[nGetMode(mNativeObject)]; }
|
||||
public Mode getMode() { return sModeValues[nGetMode(mNativeObject)]; }
|
||||
|
||||
/**
|
||||
* Sets the viewport dimensions in terms of pixels.
|
||||
|
||||
@@ -76,6 +76,8 @@ set(GLTFIO_INCLUDE_DIRS
|
||||
..
|
||||
${FILAMENT_DIR}/include
|
||||
${FILAMENT_DIR}/include/gltfio/resources
|
||||
../../filament/backend/include
|
||||
../../libs/gltfio/include
|
||||
../../third_party/cgltf
|
||||
../../third_party/robin-map
|
||||
../../third_party/hat-trie
|
||||
|
||||
@@ -27,7 +27,8 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation deps.androidx.annotations
|
||||
implementation project(':filament-android')
|
||||
|
||||
api project(':filament-android')
|
||||
}
|
||||
|
||||
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
|
||||
|
||||
@@ -107,8 +107,8 @@ public class AssetLoader {
|
||||
* Frees all memory consumed by the native <code>AssetLoader</code> and its material cache.
|
||||
*/
|
||||
public void destroy() {
|
||||
nDestroyAssetLoader(mNativeObject);
|
||||
mMaterialCache.destroyMaterials();
|
||||
nDestroyAssetLoader(mNativeObject);
|
||||
mNativeObject = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@ import androidx.annotation.Size;
|
||||
* Client applications do not need to call methods on it.</p>
|
||||
*/
|
||||
public class UbershaderLoader implements MaterialProvider {
|
||||
private static final VertexBuffer.VertexAttribute[] sVertexAttributesValues =
|
||||
VertexBuffer.VertexAttribute.values();
|
||||
|
||||
private long mNativeObject;
|
||||
|
||||
/**
|
||||
@@ -70,7 +73,7 @@ public class UbershaderLoader implements MaterialProvider {
|
||||
}
|
||||
|
||||
public boolean needsDummyData(int attrib) {
|
||||
VertexBuffer.VertexAttribute vattrib = VertexBuffer.VertexAttribute.values()[attrib];
|
||||
VertexBuffer.VertexAttribute vattrib = sVertexAttributesValues[attrib];
|
||||
switch (vattrib) {
|
||||
case UV0:
|
||||
case UV1:
|
||||
@@ -92,7 +95,8 @@ public class UbershaderLoader implements MaterialProvider {
|
||||
private static native long nCreateUbershaderLoader(long nativeEngine);
|
||||
private static native void nDestroyUbershaderLoader(long nativeProvider);
|
||||
private static native void nDestroyMaterials(long nativeProvider);
|
||||
private static native long nCreateMaterialInstance(long nativeProvider, MaterialKey config, int[] uvmap, String label);
|
||||
private static native long nCreateMaterialInstance(long nativeProvider,
|
||||
MaterialKey config, int[] uvmap, String label);
|
||||
private static native int nGetMaterialCount(long nativeProvider);
|
||||
private static native void nGetMaterials(long nativeProvider, long[] result);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
GROUP=com.google.android.filament
|
||||
VERSION_NAME=1.12.0
|
||||
VERSION_NAME=1.15.0
|
||||
|
||||
POM_DESCRIPTION=Real-time physically based rendering engine for Android.
|
||||
|
||||
@@ -18,3 +18,11 @@ POM_DEVELOPER_NAME=Filament Team
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
|
||||
android.useAndroidX=true
|
||||
|
||||
org.gradle.unsafe.configuration-cache=true
|
||||
# TODO: Remove this when we switch to Gradle 7.4
|
||||
org.gradle.unsafe.configuration-cache.max-problems=3
|
||||
|
||||
com.google.android.filament.tools-dir=../../../out/release/filament
|
||||
com.google.android.filament.dist-dir=../out/android-release/filament
|
||||
com.google.android.filament.abis=all
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#Wed Nov 17 10:40:18 PST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -10,6 +12,7 @@ filamentTools {
|
||||
iblOutputDir = project.layout.projectDirectory.dir("src/main/assets/envs")
|
||||
}
|
||||
|
||||
// don't forget to update MainACtivity.kt when/if changing this.
|
||||
task copyMesh(type: Copy) {
|
||||
from "../../../third_party/models/BusterDrone"
|
||||
into "src/main/assets/models"
|
||||
@@ -29,6 +32,11 @@ android {
|
||||
targetSdkVersion versions.targetSdk
|
||||
missingDimensionStrategy 'functionality', 'full'
|
||||
}
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -36,5 +44,5 @@ dependencies {
|
||||
implementation project(':filament-android')
|
||||
implementation project(':gltfio-android')
|
||||
implementation project(':filament-utils-android')
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0'
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
android:supportsRtl="true"
|
||||
android:largeHeap="true"
|
||||
android:theme="@android:style/Theme.NoTitleBar">
|
||||
<activity android:name="com.google.android.filament.gltf.MainActivity"
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name="com.google.android.filament.gltf.MainActivity"
|
||||
android:screenOrientation="fullSensor"
|
||||
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden">
|
||||
<intent-filter>
|
||||
|
||||
@@ -27,6 +27,7 @@ import android.widget.Toast
|
||||
import com.google.android.filament.Fence
|
||||
import com.google.android.filament.IndirectLight
|
||||
import com.google.android.filament.Skybox
|
||||
import com.google.android.filament.View
|
||||
import com.google.android.filament.utils.*
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -95,14 +96,36 @@ class MainActivity : Activity() {
|
||||
setStatusText("To load a new model, go to the above URL on your host machine.")
|
||||
|
||||
val view = modelViewer.view
|
||||
|
||||
/*
|
||||
* Note: The settings below are overriden when connecting to the remote UI.
|
||||
*/
|
||||
|
||||
// on mobile, better use lower quality color buffer
|
||||
view.renderQuality = view.renderQuality.apply {
|
||||
hdrColorBuffer = View.QualityLevel.MEDIUM
|
||||
}
|
||||
|
||||
// dynamic resolution often helps a lot
|
||||
view.dynamicResolutionOptions = view.dynamicResolutionOptions.apply {
|
||||
enabled = true
|
||||
quality = View.QualityLevel.MEDIUM
|
||||
}
|
||||
|
||||
// MSAA is needed with dynamic resolution MEDIUM
|
||||
view.multiSampleAntiAliasingOptions = view.multiSampleAntiAliasingOptions.apply {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
// FXAA is pretty cheap and helps a lot
|
||||
view.antiAliasing = View.AntiAliasing.FXAA;
|
||||
|
||||
// ambient occlusion is the cheapest effect that adds a lot of quality
|
||||
view.ambientOcclusionOptions = view.ambientOcclusionOptions.apply {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
// bloom is pretty expensive but adds a fair amount of realism
|
||||
view.bloomOptions = view.bloomOptions.apply {
|
||||
enabled = true
|
||||
}
|
||||
@@ -194,6 +217,10 @@ class MainActivity : Activity() {
|
||||
|
||||
val sky = Skybox.Builder().environment(skyboxTexture).build(engine)
|
||||
|
||||
specularFilter.destroy();
|
||||
equirectToCubemap.destroy();
|
||||
context.destroy();
|
||||
|
||||
modelViewer.scene.skybox = sky
|
||||
modelViewer.scene.indirectLight = ibl
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -17,10 +19,16 @@ android {
|
||||
compileSdkVersion versions.compileSdk
|
||||
defaultConfig {
|
||||
applicationId "com.google.android.filament.hellocamera"
|
||||
minSdkVersion versions.minSdk
|
||||
minSdkVersion 23
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -33,7 +33,9 @@ import android.graphics.ImageFormat
|
||||
import android.hardware.HardwareBuffer
|
||||
import android.media.ImageReader
|
||||
import android.opengl.Matrix
|
||||
import android.view.Display
|
||||
import android.os.Build
|
||||
import android.os.Looper
|
||||
import androidx.annotation.RequiresApi
|
||||
|
||||
import com.google.android.filament.*
|
||||
|
||||
@@ -44,7 +46,7 @@ import java.util.concurrent.TimeUnit
|
||||
* Toy class that handles all interaction with the Android camera2 API.
|
||||
* Sets the "textureTransform" and "videoTexture" parameters on the given Filament material.
|
||||
*/
|
||||
class CameraHelper(val activity: Activity, private val filamentEngine: Engine, private val filamentMaterial: MaterialInstance, private val display: Display) {
|
||||
class CameraHelper(val activity: Activity, private val filamentEngine: Engine, private val filamentMaterial: MaterialInstance) {
|
||||
private lateinit var cameraId: String
|
||||
private lateinit var captureRequest: CaptureRequest
|
||||
|
||||
@@ -63,6 +65,20 @@ class CameraHelper(val activity: Activity, private val filamentEngine: Engine, p
|
||||
kImageReaderMaxImages,
|
||||
HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE)
|
||||
|
||||
@Suppress("deprecation")
|
||||
private val display = if (Build.VERSION.SDK_INT >= 30) {
|
||||
Api30Impl.getDisplay(activity)
|
||||
} else {
|
||||
activity.windowManager.defaultDisplay!!
|
||||
}
|
||||
|
||||
@RequiresApi(30)
|
||||
class Api30Impl {
|
||||
companion object {
|
||||
fun getDisplay(context: Context) = context.display!!
|
||||
}
|
||||
}
|
||||
|
||||
private val cameraCallback = object : CameraDevice.StateCallback() {
|
||||
override fun onOpened(cameraDevice: CameraDevice) {
|
||||
cameraOpenCloseLock.release()
|
||||
@@ -87,7 +103,9 @@ class CameraHelper(val activity: Activity, private val filamentEngine: Engine, p
|
||||
val stream = filamentStream
|
||||
if (stream != null) {
|
||||
imageReader.acquireLatestImage()?.also {
|
||||
stream.setAcquiredImage(it.hardwareBuffer, Handler()) { it.close() }
|
||||
stream.setAcquiredImage(it.hardwareBuffer, Handler(Looper.getMainLooper())) {
|
||||
it.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ class MainActivity : Activity(), ActivityCompat.OnRequestPermissionsResultCallba
|
||||
setupView()
|
||||
setupScene()
|
||||
|
||||
cameraHelper = CameraHelper(this, engine, materialInstance, windowManager.defaultDisplay)
|
||||
cameraHelper = CameraHelper(this, engine, materialInstance)
|
||||
cameraHelper.openCamera()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -21,6 +23,12 @@ android {
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -27,6 +29,12 @@ android {
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -20,6 +22,12 @@ android {
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -10,9 +10,16 @@ android {
|
||||
minSdkVersion versions.minSdk
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation deps.kotlin
|
||||
implementation deps.androidx.annotations
|
||||
implementation project(':filament-android')
|
||||
}
|
||||
|
||||
@@ -18,19 +18,21 @@ package com.google.android.filament.livewallpaper
|
||||
|
||||
import android.animation.ValueAnimator
|
||||
import android.app.Service
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.PixelFormat
|
||||
import android.os.Build
|
||||
import android.service.wallpaper.WallpaperService
|
||||
import android.view.Choreographer
|
||||
import android.view.Surface
|
||||
import android.view.SurfaceHolder
|
||||
import android.view.WindowManager
|
||||
import android.view.animation.LinearInterpolator
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.google.android.filament.*
|
||||
import com.google.android.filament.android.DisplayHelper
|
||||
import com.google.android.filament.android.UiHelper
|
||||
|
||||
|
||||
class FilamentLiveWallpaper : WallpaperService() {
|
||||
// Make sure to initialize Filament first
|
||||
// This loads the JNI library needed by most API calls
|
||||
@@ -196,9 +198,14 @@ class FilamentLiveWallpaper : WallpaperService() {
|
||||
override fun onNativeWindowChanged(surface: Surface) {
|
||||
swapChain?.let { engine.destroySwapChain(it) }
|
||||
swapChain = engine.createSwapChain(surface)
|
||||
val display =
|
||||
(application.getSystemService(Service.WINDOW_SERVICE) as WindowManager)
|
||||
.defaultDisplay
|
||||
|
||||
@Suppress("deprecation")
|
||||
val display = if (Build.VERSION.SDK_INT >= 30) {
|
||||
Api30Impl.getDisplay(displayContext!!)
|
||||
} else {
|
||||
(getSystemService(Service.WINDOW_SERVICE) as WindowManager).defaultDisplay
|
||||
}
|
||||
|
||||
displayHelper.attach(renderer, display)
|
||||
}
|
||||
|
||||
@@ -222,4 +229,11 @@ class FilamentLiveWallpaper : WallpaperService() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(30)
|
||||
class Api30Impl {
|
||||
companion object {
|
||||
fun getDisplay(context: Context) = context.display!!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -31,6 +33,12 @@ android {
|
||||
missingDimensionStrategy 'functionality', 'full'
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -20,6 +22,12 @@ android {
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -22,6 +25,12 @@ android {
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
@@ -31,5 +40,5 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation project(':filament-android')
|
||||
implementation 'androidx.annotation:annotation:1.1.0'
|
||||
implementation deps.androidx.annotations
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -70,11 +70,11 @@ public class MainActivity extends Activity
|
||||
private Page mPage;
|
||||
private PageMaterials mPageMaterials;
|
||||
private Scene mScene;
|
||||
private Texture[] mTextures = new Texture[2];
|
||||
private final Texture[] mTextures = new Texture[2];
|
||||
private @Entity int mLight;
|
||||
private IndirectLight mIndirectLight;
|
||||
|
||||
private float[] mTouchDownPoint = new float[2];
|
||||
private final float[] mTouchDownPoint = new float[2];
|
||||
private float mTouchDownValue = 0;
|
||||
private float mPageAnimationRadians = 0;
|
||||
private float mPageAnimationValue = 0;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -17,10 +19,16 @@ android {
|
||||
compileSdkVersion versions.compileSdk
|
||||
defaultConfig {
|
||||
applicationId "com.google.android.filament.streamtest"
|
||||
minSdkVersion versions.minSdk
|
||||
minSdkVersion 23
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.google.android.filament.streamtest
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.view.Choreographer
|
||||
import android.view.Surface
|
||||
@@ -33,7 +34,9 @@ import java.nio.ByteBuffer
|
||||
import java.nio.ByteOrder
|
||||
import java.nio.channels.Channels
|
||||
import android.opengl.*
|
||||
import android.os.Build
|
||||
import android.view.MotionEvent
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.google.android.filament.android.DisplayHelper
|
||||
|
||||
|
||||
@@ -78,6 +81,13 @@ class MainActivity : Activity(), ActivityCompat.OnRequestPermissionsResultCallba
|
||||
|
||||
private var externalTextureID: Int = 0
|
||||
|
||||
@RequiresApi(30)
|
||||
class Api30Impl {
|
||||
companion object {
|
||||
fun getDisplay(context: Context) = context.display!!
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
@@ -94,7 +104,15 @@ class MainActivity : Activity(), ActivityCompat.OnRequestPermissionsResultCallba
|
||||
setupScene()
|
||||
|
||||
externalTextureID = createExternalTexture()
|
||||
streamHelper = StreamHelper(engine, materialInstance, windowManager.defaultDisplay, externalTextureID)
|
||||
|
||||
@Suppress("deprecation")
|
||||
val display = if (Build.VERSION.SDK_INT >= 30) {
|
||||
Api30Impl.getDisplay(this)
|
||||
} else {
|
||||
windowManager.defaultDisplay!!
|
||||
}
|
||||
|
||||
streamHelper = StreamHelper(engine, materialInstance, display, externalTextureID)
|
||||
this.title = streamHelper.getTestName()
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import android.view.Surface
|
||||
import android.graphics.*
|
||||
import android.media.ImageReader
|
||||
import android.opengl.Matrix
|
||||
import android.os.Looper
|
||||
import android.view.Display
|
||||
|
||||
import com.google.android.filament.*
|
||||
@@ -32,7 +33,12 @@ import com.google.android.filament.*
|
||||
/**
|
||||
* Demonstrates Filament's various texture sharing mechanisms.
|
||||
*/
|
||||
class StreamHelper(private val filamentEngine: Engine, private val filamentMaterial: MaterialInstance, private val display: Display, private val externalTextureId: Int) {
|
||||
class StreamHelper(
|
||||
private val filamentEngine: Engine,
|
||||
private val filamentMaterial: MaterialInstance,
|
||||
private val display: Display,
|
||||
private val externalTextureId: Int
|
||||
) {
|
||||
/**
|
||||
* The StreamSource configures the source data for the texture.
|
||||
*
|
||||
@@ -50,7 +56,7 @@ class StreamHelper(private val filamentEngine: Engine, private val filamentMater
|
||||
}
|
||||
|
||||
private var streamSource = StreamSource.CANVAS_STREAM_NATIVE
|
||||
private val directImageHandler = Handler()
|
||||
private val directImageHandler = Handler(Looper.getMainLooper())
|
||||
private var resolution = Size(640, 480)
|
||||
private var surfaceTexture: SurfaceTexture? = null
|
||||
private var imageReader: ImageReader? = null
|
||||
@@ -93,11 +99,30 @@ class StreamHelper(private val filamentEngine: Engine, private val filamentMater
|
||||
val canvas = surface.lockCanvas(null)
|
||||
|
||||
val movingPaint = Paint()
|
||||
movingPaint.shader = LinearGradient(kGradientOffset, 0.0f, kGradientOffset + kGradientScale, 0.0f, kGradientColors, kGradientStops, Shader.TileMode.REPEAT)
|
||||
canvas.drawRect(Rect(0, resolution.height / 2, resolution.width, resolution.height), movingPaint)
|
||||
movingPaint.shader = LinearGradient(
|
||||
kGradientOffset,
|
||||
0.0f,
|
||||
kGradientOffset + kGradientScale,
|
||||
0.0f,
|
||||
kGradientColors,
|
||||
kGradientStops,
|
||||
Shader.TileMode.REPEAT
|
||||
)
|
||||
canvas.drawRect(
|
||||
Rect(0, resolution.height / 2, resolution.width, resolution.height),
|
||||
movingPaint
|
||||
)
|
||||
|
||||
val staticPaint = Paint()
|
||||
staticPaint.shader = LinearGradient(0.0f, 0.0f, kGradientScale, 0.0f, kGradientColors, kGradientStops, Shader.TileMode.REPEAT)
|
||||
staticPaint.shader = LinearGradient(
|
||||
0.0f,
|
||||
0.0f,
|
||||
kGradientScale,
|
||||
0.0f,
|
||||
kGradientColors,
|
||||
kGradientStops,
|
||||
Shader.TileMode.REPEAT
|
||||
)
|
||||
canvas.drawRect(Rect(0, 0, resolution.width, resolution.height / 2), staticPaint)
|
||||
|
||||
surface.unlockCanvasAndPost(canvas)
|
||||
@@ -108,7 +133,10 @@ class StreamHelper(private val filamentEngine: Engine, private val filamentMater
|
||||
|
||||
if (streamSource == StreamSource.CANVAS_STREAM_ACQUIRED) {
|
||||
val image = imageReader!!.acquireLatestImage()
|
||||
filamentStream!!.setAcquiredImage(image.hardwareBuffer!!, directImageHandler) { image.close() }
|
||||
filamentStream!!.setAcquiredImage(
|
||||
image.hardwareBuffer!!,
|
||||
directImageHandler
|
||||
) { image.close() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +164,9 @@ class StreamHelper(private val filamentEngine: Engine, private val filamentMater
|
||||
|
||||
val filamentTexture = this.filamentTexture!!
|
||||
|
||||
val sampler = TextureSampler(TextureSampler.MinFilter.LINEAR, TextureSampler.MagFilter.LINEAR, TextureSampler.WrapMode.REPEAT)
|
||||
val sampler = TextureSampler(
|
||||
TextureSampler.MinFilter.LINEAR, TextureSampler.MagFilter.LINEAR,
|
||||
TextureSampler.WrapMode.REPEAT)
|
||||
|
||||
// We are texturing a front-facing square shape so we need to generate a matrix that transforms (u, v, 0, 1)
|
||||
// into a new UV coordinate according to the screen rotation and the aspect ratio of the camera image.
|
||||
@@ -164,7 +194,8 @@ class StreamHelper(private val filamentEngine: Engine, private val filamentMater
|
||||
|
||||
// Connect the Stream to the Texture and the Texture to the MaterialInstance.
|
||||
filamentMaterial.setParameter("videoTexture", filamentTexture, sampler)
|
||||
filamentMaterial.setParameter("textureTransform", MaterialInstance.FloatElement.MAT4, textureTransform, 0, 1)
|
||||
filamentMaterial.setParameter("textureTransform",
|
||||
MaterialInstance.FloatElement.MAT4, textureTransform, 0, 1)
|
||||
|
||||
if (streamSource == StreamSource.CANVAS_STREAM_NATIVE) {
|
||||
|
||||
@@ -207,7 +238,9 @@ class StreamHelper(private val filamentEngine: Engine, private val filamentMater
|
||||
|
||||
filamentTexture.setExternalStream(filamentEngine, filamentStream!!)
|
||||
|
||||
this.imageReader = ImageReader.newInstance(resolution.width, resolution.height, ImageFormat.RGB_565, kImageReaderMaxImages).apply {
|
||||
this.imageReader = ImageReader.newInstance(
|
||||
resolution.width, resolution.height, ImageFormat.RGB_565, kImageReaderMaxImages
|
||||
).apply {
|
||||
canvasSurface = surface
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -21,6 +23,12 @@ android {
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -28,6 +30,12 @@ android {
|
||||
missingDimensionStrategy 'functionality', 'full'
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name="com.google.android.filament.textured.MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name="com.google.android.filament.textured.MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: FilamentToolsPlugin
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'filament-tools-plugin'
|
||||
}
|
||||
|
||||
project.ext.isSample = true
|
||||
|
||||
@@ -21,6 +23,12 @@ android {
|
||||
targetSdkVersion versions.targetSdk
|
||||
}
|
||||
|
||||
// NOTE: This is a workaround required because the AGP task collectReleaseDependencies
|
||||
// is not configuration-cache friendly yet; this is only useful for Play publication
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
}
|
||||
|
||||
// We use the .filamat extension for materials compiled with matc
|
||||
// Telling aapt to not compress them allows to load them efficiently
|
||||
aaptOptions {
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name="com.google.android.filament.transparentrendering.MainActivity">
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name="com.google.android.filament.transparentrendering.MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
30
build.sh
30
build.sh
@@ -197,10 +197,10 @@ function build_desktop_target {
|
||||
|
||||
cd "out/cmake-${lc_target}"
|
||||
|
||||
# On macOS, set the deployment target to 10.14.
|
||||
# On macOS, set the deployment target to 10.15.
|
||||
local lc_name=$(echo "${UNAME}" | tr '[:upper:]' '[:lower:]')
|
||||
if [[ "${lc_name}" == "darwin" ]]; then
|
||||
local deployment_target="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14"
|
||||
local deployment_target="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
|
||||
|
||||
if [[ "${BUILD_UNIVERSAL_LIBRARIES}" == "true" ]]; then
|
||||
local architectures="-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"
|
||||
@@ -453,23 +453,23 @@ function build_android {
|
||||
|
||||
if [[ "${ISSUE_DEBUG_BUILD}" == "true" ]]; then
|
||||
./gradlew \
|
||||
-Pfilament_dist_dir=../out/android-debug/filament \
|
||||
-Pfilament_abis=${ABI_GRADLE_OPTION} \
|
||||
-Pcom.google.android.filament.dist-dir=../out/android-debug/filament \
|
||||
-Pcom.google.android.filament.abis=${ABI_GRADLE_OPTION} \
|
||||
${VULKAN_ANDROID_GRADLE_OPTION} \
|
||||
:filament-android:assembleDebug \
|
||||
:gltfio-android:assembleDebug \
|
||||
:filament-utils-android:assembleDebug
|
||||
|
||||
./gradlew \
|
||||
-Pfilament_dist_dir=../out/android-debug/filament \
|
||||
-Pfilament_abis=${ABI_GRADLE_OPTION} \
|
||||
-Pcom.google.android.filament.dist-dir=../out/android-debug/filament \
|
||||
-Pcom.google.android.filament.abis=${ABI_GRADLE_OPTION} \
|
||||
:filamat-android:assembleDebug
|
||||
|
||||
if [[ "${BUILD_ANDROID_SAMPLES}" == "true" ]]; then
|
||||
for sample in ${ANDROID_SAMPLES}; do
|
||||
./gradlew \
|
||||
-Pfilament_dist_dir=../out/android-debug/filament \
|
||||
-Pfilament_abis=${ABI_GRADLE_OPTION} \
|
||||
-Pcom.google.android.filament.dist-dir=../out/android-debug/filament \
|
||||
-Pcom.google.android.filament.abis=${ABI_GRADLE_OPTION} \
|
||||
:samples:${sample}:assembleDebug
|
||||
done
|
||||
fi
|
||||
@@ -502,23 +502,23 @@ function build_android {
|
||||
|
||||
if [[ "${ISSUE_RELEASE_BUILD}" == "true" ]]; then
|
||||
./gradlew \
|
||||
-Pfilament_dist_dir=../out/android-release/filament \
|
||||
-Pfilament_abis=${ABI_GRADLE_OPTION} \
|
||||
-Pcom.google.android.filament.dist-dir=../out/android-release/filament \
|
||||
-Pcom.google.android.filament.abis=${ABI_GRADLE_OPTION} \
|
||||
${VULKAN_ANDROID_GRADLE_OPTION} \
|
||||
:filament-android:assembleRelease \
|
||||
:gltfio-android:assembleRelease \
|
||||
:filament-utils-android:assembleRelease
|
||||
|
||||
./gradlew \
|
||||
-Pfilament_dist_dir=../out/android-release/filament \
|
||||
-Pfilament_abis=${ABI_GRADLE_OPTION} \
|
||||
-Pcom.google.android.filament.dist-dir=../out/android-release/filament \
|
||||
-Pcom.google.android.filament.abis=${ABI_GRADLE_OPTION} \
|
||||
:filamat-android:assembleRelease
|
||||
|
||||
if [[ "${BUILD_ANDROID_SAMPLES}" == "true" ]]; then
|
||||
for sample in ${ANDROID_SAMPLES}; do
|
||||
./gradlew \
|
||||
-Pfilament_dist_dir=../out/android-release/filament \
|
||||
-Pfilament_abis=${ABI_GRADLE_OPTION} \
|
||||
-Pcom.google.android.filament.dist-dir=../out/android-release/filament \
|
||||
-Pcom.google.android.filament.abis=${ABI_GRADLE_OPTION} \
|
||||
:samples:${sample}:assembleRelease
|
||||
done
|
||||
fi
|
||||
@@ -831,7 +831,7 @@ while getopts ":hacCfijmp:q:uvslwtdk:" opt; do
|
||||
;;
|
||||
v)
|
||||
VULKAN_ANDROID_OPTION="-DFILAMENT_SUPPORTS_VULKAN=OFF"
|
||||
VULKAN_ANDROID_GRADLE_OPTION="-Pfilament_exclude_vulkan"
|
||||
VULKAN_ANDROID_GRADLE_OPTION="-Pcom.google.android.filament.exclude-vulkan"
|
||||
echo "Disabling support for Vulkan in the core Filament library."
|
||||
echo "Consider using -c after changing this option to clear the Gradle cache."
|
||||
;;
|
||||
|
||||
@@ -1 +1 @@
|
||||
22.1.7171670
|
||||
23.1.7779620
|
||||
61
build/common/check-headers.sh
Executable file
61
build/common/check-headers.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
function print_help {
|
||||
local SELF_NAME
|
||||
SELF_NAME=$(basename "$0")
|
||||
echo "$SELF_NAME. Check that public headers compile independently."
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo " $SELF_NAME <public include directory>"
|
||||
echo ""
|
||||
echo "Example:"
|
||||
echo " $SELF_NAME out/release/filament/include"
|
||||
echo ""
|
||||
echo "Dependencies: clang"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -h"
|
||||
echo " Print this help message and exit."
|
||||
}
|
||||
|
||||
while getopts "h" opt; do
|
||||
case ${opt} in
|
||||
h)
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
if [[ "$#" -ne 1 ]]; then
|
||||
print_help
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FILAMENT_HEADERS="$1"
|
||||
|
||||
includes=()
|
||||
pushd "$FILAMENT_HEADERS" >/dev/null
|
||||
for f in $(find . -name '*.h'); do
|
||||
include_path="${f#./}" # strip leading ./
|
||||
includes+=("${include_path}")
|
||||
done
|
||||
popd >/dev/null
|
||||
|
||||
rm -rf out/check-headers
|
||||
mkdir -p out/check-headers
|
||||
|
||||
echo "Checking that public headers compile independently..."
|
||||
for include in "${includes[@]}"; do
|
||||
echo "Checking ${include}"
|
||||
echo "#include <${include}>" >> out/check-headers/temp.cpp
|
||||
clang -std=c++17 -I "${FILAMENT_HEADERS}" out/check-headers/temp.cpp -c -o /dev/null
|
||||
done
|
||||
echo "Done!"
|
||||
@@ -50,9 +50,9 @@ if(WIN32)
|
||||
endif()
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN}/bin/${ARCH}${API_LEVEL}-clang${COMPILER_SUFFIX})
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN}/bin/${ARCH}${API_LEVEL}-clang++${COMPILER_SUFFIX})
|
||||
set(CMAKE_AR ${TOOLCHAIN}/bin/${ARCH}-ar${TOOL_SUFFIX} CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${TOOLCHAIN}/bin/${ARCH}-ranlib${TOOL_SUFFIX})
|
||||
set(CMAKE_STRIP ${TOOLCHAIN}/bin/${ARCH}-strip${TOOL_SUFFIX})
|
||||
set(CMAKE_AR ${TOOLCHAIN}/bin/llvm-ar${TOOL_SUFFIX} CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${TOOLCHAIN}/bin/llvm-ranlib${TOOL_SUFFIX})
|
||||
set(CMAKE_STRIP ${TOOLCHAIN}/bin/llvm-strip${TOOL_SUFFIX})
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/sysroot)
|
||||
|
||||
@@ -51,9 +51,9 @@ if(WIN32)
|
||||
endif()
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN}/bin/${ARCH}${API_LEVEL}-clang${COMPILER_SUFFIX})
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN}/bin/${ARCH}${API_LEVEL}-clang++${COMPILER_SUFFIX})
|
||||
set(CMAKE_AR ${TOOLCHAIN}/bin/${AR_ARCH}-ar${TOOL_SUFFIX} CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${TOOLCHAIN}/bin/${AR_ARCH}-ranlib${TOOL_SUFFIX})
|
||||
set(CMAKE_STRIP ${TOOLCHAIN}/bin/${AR_ARCH}-strip${TOOL_SUFFIX})
|
||||
set(CMAKE_AR ${TOOLCHAIN}/bin/llvm-ar${TOOL_SUFFIX} CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${TOOLCHAIN}/bin/llvm-ranlib${TOOL_SUFFIX})
|
||||
set(CMAKE_STRIP ${TOOLCHAIN}/bin/llvm-strip${TOOL_SUFFIX})
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/sysroot)
|
||||
|
||||
@@ -50,9 +50,9 @@ if(WIN32)
|
||||
endif()
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN}/bin/${ARCH}${API_LEVEL}-clang${COMPILER_SUFFIX})
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN}/bin/${ARCH}${API_LEVEL}-clang++${COMPILER_SUFFIX})
|
||||
set(CMAKE_AR ${TOOLCHAIN}/bin/${ARCH}-ar${TOOL_SUFFIX} CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${TOOLCHAIN}/bin/${ARCH}-ranlib${TOOL_SUFFIX})
|
||||
set(CMAKE_STRIP ${TOOLCHAIN}/bin/${ARCH}-strip${TOOL_SUFFIX})
|
||||
set(CMAKE_AR ${TOOLCHAIN}/bin/llvm-ar${TOOL_SUFFIX} CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${TOOLCHAIN}/bin/llvm-ranlib${TOOL_SUFFIX})
|
||||
set(CMAKE_STRIP ${TOOLCHAIN}/bin/llvm-strip${TOOL_SUFFIX})
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/sysroot)
|
||||
|
||||
@@ -50,9 +50,9 @@ if(WIN32)
|
||||
endif()
|
||||
set(CMAKE_C_COMPILER ${TOOLCHAIN}/bin/${ARCH}${API_LEVEL}-clang${COMPILER_SUFFIX})
|
||||
set(CMAKE_CXX_COMPILER ${TOOLCHAIN}/bin/${ARCH}${API_LEVEL}-clang++${COMPILER_SUFFIX})
|
||||
set(CMAKE_AR ${TOOLCHAIN}/bin/${ARCH}-ar${TOOL_SUFFIX} CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${TOOLCHAIN}/bin/${ARCH}-ranlib${TOOL_SUFFIX})
|
||||
set(CMAKE_STRIP ${TOOLCHAIN}/bin/${ARCH}-strip${TOOL_SUFFIX})
|
||||
set(CMAKE_AR ${TOOLCHAIN}/bin/llvm-ar${TOOL_SUFFIX} CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${TOOLCHAIN}/bin/llvm-ranlib${TOOL_SUFFIX})
|
||||
set(CMAKE_STRIP ${TOOLCHAIN}/bin/llvm-strip${TOOL_SUFFIX})
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN}/sysroot)
|
||||
|
||||
3152
docs/math/RGB to LMSR.nb
Normal file
3152
docs/math/RGB to LMSR.nb
Normal file
File diff suppressed because it is too large
Load Diff
391
docs/math/data/d65.csv
Normal file
391
docs/math/data/d65.csv
Normal file
@@ -0,0 +1,391 @@
|
||||
390,54.6482
|
||||
391,57.4589
|
||||
392,60.2695
|
||||
393,63.0802
|
||||
394,65.8909
|
||||
395,68.7015
|
||||
396,71.5122
|
||||
397,74.3229
|
||||
398,77.1336
|
||||
399,79.9442
|
||||
400,82.7549
|
||||
401,83.628
|
||||
402,84.5011
|
||||
403,85.3742
|
||||
404,86.2473
|
||||
405,87.1204
|
||||
406,87.9936
|
||||
407,88.8667
|
||||
408,89.7398
|
||||
409,90.6129
|
||||
410,91.486
|
||||
411,91.6806
|
||||
412,91.8752
|
||||
413,92.0697
|
||||
414,92.2643
|
||||
415,92.4589
|
||||
416,92.6535
|
||||
417,92.8481
|
||||
418,93.0426
|
||||
419,93.2372
|
||||
420,93.4318
|
||||
421,92.7568
|
||||
422,92.0819
|
||||
423,91.4069
|
||||
424,90.732
|
||||
425,90.057
|
||||
426,89.3821
|
||||
427,88.7071
|
||||
428,88.0322
|
||||
429,87.3572
|
||||
430,86.6823
|
||||
431,88.5006
|
||||
432,90.3188
|
||||
433,92.1371
|
||||
434,93.9554
|
||||
435,95.7736
|
||||
436,97.5919
|
||||
437,99.4102
|
||||
438,101.228
|
||||
439,103.047
|
||||
440,104.865
|
||||
441,106.079
|
||||
442,107.294
|
||||
443,108.508
|
||||
444,109.722
|
||||
445,110.936
|
||||
446,112.151
|
||||
447,113.365
|
||||
448,114.579
|
||||
449,115.794
|
||||
450,117.008
|
||||
451,117.088
|
||||
452,117.169
|
||||
453,117.249
|
||||
454,117.33
|
||||
455,117.41
|
||||
456,117.49
|
||||
457,117.571
|
||||
458,117.651
|
||||
459,117.732
|
||||
460,117.812
|
||||
461,117.517
|
||||
462,117.222
|
||||
463,116.927
|
||||
464,116.632
|
||||
465,116.336
|
||||
466,116.041
|
||||
467,115.746
|
||||
468,115.451
|
||||
469,115.156
|
||||
470,114.861
|
||||
471,114.967
|
||||
472,115.073
|
||||
473,115.18
|
||||
474,115.286
|
||||
475,115.392
|
||||
476,115.498
|
||||
477,115.604
|
||||
478,115.711
|
||||
479,115.817
|
||||
480,115.923
|
||||
481,115.212
|
||||
482,114.501
|
||||
483,113.789
|
||||
484,113.078
|
||||
485,112.367
|
||||
486,111.656
|
||||
487,110.945
|
||||
488,110.233
|
||||
489,109.522
|
||||
490,108.811
|
||||
491,108.865
|
||||
492,108.92
|
||||
493,108.974
|
||||
494,109.028
|
||||
495,109.082
|
||||
496,109.137
|
||||
497,109.191
|
||||
498,109.245
|
||||
499,109.3
|
||||
500,109.354
|
||||
501,109.199
|
||||
502,109.044
|
||||
503,108.888
|
||||
504,108.733
|
||||
505,108.578
|
||||
506,108.423
|
||||
507,108.268
|
||||
508,108.112
|
||||
509,107.957
|
||||
510,107.802
|
||||
511,107.501
|
||||
512,107.2
|
||||
513,106.898
|
||||
514,106.597
|
||||
515,106.296
|
||||
516,105.995
|
||||
517,105.694
|
||||
518,105.392
|
||||
519,105.091
|
||||
520,104.79
|
||||
521,105.08
|
||||
522,105.37
|
||||
523,105.66
|
||||
524,105.95
|
||||
525,106.239
|
||||
526,106.529
|
||||
527,106.819
|
||||
528,107.109
|
||||
529,107.399
|
||||
530,107.689
|
||||
531,107.361
|
||||
532,107.032
|
||||
533,106.704
|
||||
534,106.375
|
||||
535,106.047
|
||||
536,105.719
|
||||
537,105.39
|
||||
538,105.062
|
||||
539,104.733
|
||||
540,104.405
|
||||
541,104.369
|
||||
542,104.333
|
||||
543,104.297
|
||||
544,104.261
|
||||
545,104.225
|
||||
546,104.19
|
||||
547,104.154
|
||||
548,104.118
|
||||
549,104.082
|
||||
550,104.046
|
||||
551,103.641
|
||||
552,103.237
|
||||
553,102.832
|
||||
554,102.428
|
||||
555,102.023
|
||||
556,101.618
|
||||
557,101.214
|
||||
558,100.809
|
||||
559,100.405
|
||||
560,100
|
||||
561,99.6334
|
||||
562,99.2668
|
||||
563,98.9003
|
||||
564,98.5337
|
||||
565,98.1671
|
||||
566,97.8005
|
||||
567,97.4339
|
||||
568,97.0674
|
||||
569,96.7008
|
||||
570,96.3342
|
||||
571,96.2796
|
||||
572,96.225
|
||||
573,96.1703
|
||||
574,96.1157
|
||||
575,96.0611
|
||||
576,96.0065
|
||||
577,95.9519
|
||||
578,95.8972
|
||||
579,95.8426
|
||||
580,95.788
|
||||
581,95.0778
|
||||
582,94.3675
|
||||
583,93.6573
|
||||
584,92.947
|
||||
585,92.2368
|
||||
586,91.5266
|
||||
587,90.8163
|
||||
588,90.1061
|
||||
589,89.3958
|
||||
590,88.6856
|
||||
591,88.8177
|
||||
592,88.9497
|
||||
593,89.0818
|
||||
594,89.2138
|
||||
595,89.3459
|
||||
596,89.478
|
||||
597,89.61
|
||||
598,89.7421
|
||||
599,89.8741
|
||||
600,90.0062
|
||||
601,89.9655
|
||||
602,89.9248
|
||||
603,89.8841
|
||||
604,89.8434
|
||||
605,89.8026
|
||||
606,89.7619
|
||||
607,89.7212
|
||||
608,89.6805
|
||||
609,89.6398
|
||||
610,89.5991
|
||||
611,89.4091
|
||||
612,89.219
|
||||
613,89.029
|
||||
614,88.8389
|
||||
615,88.6489
|
||||
616,88.4589
|
||||
617,88.2688
|
||||
618,88.0788
|
||||
619,87.8887
|
||||
620,87.6987
|
||||
621,87.2577
|
||||
622,86.8167
|
||||
623,86.3757
|
||||
624,85.9347
|
||||
625,85.4936
|
||||
626,85.0526
|
||||
627,84.6116
|
||||
628,84.1706
|
||||
629,83.7296
|
||||
630,83.2886
|
||||
631,83.3297
|
||||
632,83.3707
|
||||
633,83.4118
|
||||
634,83.4528
|
||||
635,83.4939
|
||||
636,83.535
|
||||
637,83.576
|
||||
638,83.6171
|
||||
639,83.6581
|
||||
640,83.6992
|
||||
641,83.332
|
||||
642,82.9647
|
||||
643,82.5975
|
||||
644,82.2302
|
||||
645,81.863
|
||||
646,81.4958
|
||||
647,81.1285
|
||||
648,80.7613
|
||||
649,80.394
|
||||
650,80.0268
|
||||
651,80.0456
|
||||
652,80.0644
|
||||
653,80.0831
|
||||
654,80.1019
|
||||
655,80.1207
|
||||
656,80.1395
|
||||
657,80.1583
|
||||
658,80.177
|
||||
659,80.1958
|
||||
660,80.2146
|
||||
661,80.4209
|
||||
662,80.6272
|
||||
663,80.8336
|
||||
664,81.0399
|
||||
665,81.2462
|
||||
666,81.4525
|
||||
667,81.6588
|
||||
668,81.8652
|
||||
669,82.0715
|
||||
670,82.2778
|
||||
671,81.8784
|
||||
672,81.4791
|
||||
673,81.0797
|
||||
674,80.6804
|
||||
675,80.281
|
||||
676,79.8816
|
||||
677,79.4823
|
||||
678,79.0829
|
||||
679,78.6836
|
||||
680,78.2842
|
||||
681,77.4279
|
||||
682,76.5716
|
||||
683,75.7153
|
||||
684,74.859
|
||||
685,74.0027
|
||||
686,73.1465
|
||||
687,72.2902
|
||||
688,71.4339
|
||||
689,70.5776
|
||||
690,69.7213
|
||||
691,69.9101
|
||||
692,70.0989
|
||||
693,70.2876
|
||||
694,70.4764
|
||||
695,70.6652
|
||||
696,70.854
|
||||
697,71.0428
|
||||
698,71.2315
|
||||
699,71.4203
|
||||
700,71.6091
|
||||
701,71.8831
|
||||
702,72.1571
|
||||
703,72.4311
|
||||
704,72.7051
|
||||
705,72.979
|
||||
706,73.253
|
||||
707,73.527
|
||||
708,73.801
|
||||
709,74.075
|
||||
710,74.349
|
||||
711,73.0745
|
||||
712,71.8
|
||||
713,70.5255
|
||||
714,69.251
|
||||
715,67.9765
|
||||
716,66.702
|
||||
717,65.4275
|
||||
718,64.153
|
||||
719,62.8785
|
||||
720,61.604
|
||||
721,62.4322
|
||||
722,63.2603
|
||||
723,64.0885
|
||||
724,64.9166
|
||||
725,65.7448
|
||||
726,66.573
|
||||
727,67.4011
|
||||
728,68.2293
|
||||
729,69.0574
|
||||
730,69.8856
|
||||
731,70.4057
|
||||
732,70.9259
|
||||
733,71.446
|
||||
734,71.9662
|
||||
735,72.4863
|
||||
736,73.0064
|
||||
737,73.5266
|
||||
738,74.0467
|
||||
739,74.5669
|
||||
740,75.087
|
||||
741,73.9376
|
||||
742,72.7881
|
||||
743,71.6387
|
||||
744,70.4893
|
||||
745,69.3398
|
||||
746,68.1904
|
||||
747,67.041
|
||||
748,65.8916
|
||||
749,64.7421
|
||||
750,63.5927
|
||||
751,61.8752
|
||||
752,60.1578
|
||||
753,58.4403
|
||||
754,56.7229
|
||||
755,55.0054
|
||||
756,53.288
|
||||
757,51.5705
|
||||
758,49.8531
|
||||
759,48.1356
|
||||
760,46.4182
|
||||
761,48.4569
|
||||
762,50.4956
|
||||
763,52.5344
|
||||
764,54.5731
|
||||
765,56.6118
|
||||
766,58.6505
|
||||
767,60.6892
|
||||
768,62.728
|
||||
769,64.7667
|
||||
770,66.8054
|
||||
771,66.4631
|
||||
772,66.1209
|
||||
773,65.7786
|
||||
774,65.4364
|
||||
775,65.0941
|
||||
776,64.7518
|
||||
777,64.4096
|
||||
778,64.0673
|
||||
779,63.7251
|
||||
780,63.3828
|
||||
|
391
docs/math/data/lin2012xyz2e_1_7sf.csv
Normal file
391
docs/math/data/lin2012xyz2e_1_7sf.csv
Normal file
@@ -0,0 +1,391 @@
|
||||
390,3.769647E-03,4.146161E-04,1.847260E-02
|
||||
391,4.532416E-03,5.028333E-04,2.221101E-02
|
||||
392,5.446553E-03,6.084991E-04,2.669819E-02
|
||||
393,6.538868E-03,7.344436E-04,3.206937E-02
|
||||
394,7.839699E-03,8.837389E-04,3.847832E-02
|
||||
395,9.382967E-03,1.059646E-03,4.609784E-02
|
||||
396,1.120608E-02,1.265532E-03,5.511953E-02
|
||||
397,1.334965E-02,1.504753E-03,6.575257E-02
|
||||
398,1.585690E-02,1.780493E-03,7.822113E-02
|
||||
399,1.877286E-02,2.095572E-03,9.276013E-02
|
||||
400,2.214302E-02,2.452194E-03,1.096090E-01
|
||||
401,2.601285E-02,2.852216E-03,1.290077E-01
|
||||
402,3.043036E-02,3.299115E-03,1.512047E-01
|
||||
403,3.544325E-02,3.797466E-03,1.764441E-01
|
||||
404,4.109640E-02,4.352768E-03,2.049517E-01
|
||||
405,4.742986E-02,4.971717E-03,2.369246E-01
|
||||
406,5.447394E-02,5.661014E-03,2.725123E-01
|
||||
407,6.223612E-02,6.421615E-03,3.117820E-01
|
||||
408,7.070048E-02,7.250312E-03,3.547064E-01
|
||||
409,7.982513E-02,8.140173E-03,4.011473E-01
|
||||
410,8.953803E-02,9.079860E-03,4.508369E-01
|
||||
411,9.974848E-02,1.005608E-02,5.034164E-01
|
||||
412,1.104019E-01,1.106456E-02,5.586361E-01
|
||||
413,1.214566E-01,1.210522E-02,6.162734E-01
|
||||
414,1.328741E-01,1.318014E-02,6.760982E-01
|
||||
415,1.446214E-01,1.429377E-02,7.378822E-01
|
||||
416,1.566468E-01,1.545004E-02,8.013019E-01
|
||||
417,1.687901E-01,1.664093E-02,8.655573E-01
|
||||
418,1.808328E-01,1.785302E-02,9.295791E-01
|
||||
419,1.925216E-01,1.907018E-02,9.921293E-01
|
||||
420,2.035729E-01,2.027369E-02,1.051821E+00
|
||||
421,2.137531E-01,2.144805E-02,1.107509E+00
|
||||
422,2.231348E-01,2.260041E-02,1.159527E+00
|
||||
423,2.319245E-01,2.374789E-02,1.208869E+00
|
||||
424,2.403892E-01,2.491247E-02,1.256834E+00
|
||||
425,2.488523E-01,2.612106E-02,1.305008E+00
|
||||
426,2.575896E-01,2.739923E-02,1.354758E+00
|
||||
427,2.664991E-01,2.874993E-02,1.405594E+00
|
||||
428,2.753532E-01,3.016909E-02,1.456414E+00
|
||||
429,2.838921E-01,3.165145E-02,1.505960E+00
|
||||
430,2.918246E-01,3.319038E-02,1.552826E+00
|
||||
431,2.989200E-01,3.477912E-02,1.595902E+00
|
||||
432,3.052993E-01,3.641495E-02,1.635768E+00
|
||||
433,3.112031E-01,3.809569E-02,1.673573E+00
|
||||
434,3.169047E-01,3.981843E-02,1.710604E+00
|
||||
435,3.227087E-01,4.157940E-02,1.748280E+00
|
||||
436,3.288194E-01,4.337098E-02,1.787504E+00
|
||||
437,3.349242E-01,4.517180E-02,1.826609E+00
|
||||
438,3.405452E-01,4.695420E-02,1.863108E+00
|
||||
439,3.451688E-01,4.868718E-02,1.894332E+00
|
||||
440,3.482554E-01,5.033657E-02,1.917479E+00
|
||||
441,3.494153E-01,5.187611E-02,1.930529E+00
|
||||
442,3.489075E-01,5.332218E-02,1.934819E+00
|
||||
443,3.471746E-01,5.470603E-02,1.932650E+00
|
||||
444,3.446705E-01,5.606335E-02,1.926395E+00
|
||||
445,3.418483E-01,5.743393E-02,1.918437E+00
|
||||
446,3.390240E-01,5.885107E-02,1.910430E+00
|
||||
447,3.359926E-01,6.030809E-02,1.901224E+00
|
||||
448,3.324276E-01,6.178644E-02,1.889000E+00
|
||||
449,3.280157E-01,6.326570E-02,1.871996E+00
|
||||
450,3.224637E-01,6.472352E-02,1.848545E+00
|
||||
451,3.156225E-01,6.614749E-02,1.817792E+00
|
||||
452,3.078201E-01,6.757256E-02,1.781627E+00
|
||||
453,2.994771E-01,6.904928E-02,1.742514E+00
|
||||
454,2.909776E-01,7.063280E-02,1.702749E+00
|
||||
455,2.826646E-01,7.238339E-02,1.664439E+00
|
||||
456,2.747962E-01,7.435960E-02,1.629207E+00
|
||||
457,2.674312E-01,7.659383E-02,1.597360E+00
|
||||
458,2.605847E-01,7.911436E-02,1.568896E+00
|
||||
459,2.542749E-01,8.195345E-02,1.543823E+00
|
||||
460,2.485254E-01,8.514816E-02,1.522157E+00
|
||||
461,2.433039E-01,8.872657E-02,1.503611E+00
|
||||
462,2.383414E-01,9.266008E-02,1.486673E+00
|
||||
463,2.333253E-01,9.689723E-02,1.469595E+00
|
||||
464,2.279619E-01,1.013746E-01,1.450709E+00
|
||||
465,2.219781E-01,1.060145E-01,1.428440E+00
|
||||
466,2.151735E-01,1.107377E-01,1.401587E+00
|
||||
467,2.075619E-01,1.155111E-01,1.370094E+00
|
||||
468,1.992183E-01,1.203122E-01,1.334220E+00
|
||||
469,1.902290E-01,1.251161E-01,1.294275E+00
|
||||
470,1.806905E-01,1.298957E-01,1.250610E+00
|
||||
471,1.707154E-01,1.346299E-01,1.203696E+00
|
||||
472,1.604471E-01,1.393309E-01,1.154316E+00
|
||||
473,1.500244E-01,1.440235E-01,1.103284E+00
|
||||
474,1.395705E-01,1.487372E-01,1.051347E+00
|
||||
475,1.291920E-01,1.535066E-01,9.991789E-01
|
||||
476,1.189859E-01,1.583644E-01,9.473958E-01
|
||||
477,1.090615E-01,1.633199E-01,8.966222E-01
|
||||
478,9.951424E-02,1.683761E-01,8.473981E-01
|
||||
479,9.041850E-02,1.735365E-01,8.001576E-01
|
||||
480,8.182895E-02,1.788048E-01,7.552379E-01
|
||||
481,7.376817E-02,1.841819E-01,7.127879E-01
|
||||
482,6.619477E-02,1.896559E-01,6.725198E-01
|
||||
483,5.906380E-02,1.952101E-01,6.340976E-01
|
||||
484,5.234242E-02,2.008259E-01,5.972433E-01
|
||||
485,4.600865E-02,2.064828E-01,5.617313E-01
|
||||
486,4.006154E-02,2.121826E-01,5.274921E-01
|
||||
487,3.454373E-02,2.180279E-01,4.948809E-01
|
||||
488,2.949091E-02,2.241586E-01,4.642586E-01
|
||||
489,2.492140E-02,2.307302E-01,4.358841E-01
|
||||
490,2.083981E-02,2.379160E-01,4.099313E-01
|
||||
491,1.723591E-02,2.458706E-01,3.864261E-01
|
||||
492,1.407924E-02,2.546023E-01,3.650566E-01
|
||||
493,1.134516E-02,2.640760E-01,3.454812E-01
|
||||
494,9.019658E-03,2.742490E-01,3.274095E-01
|
||||
495,7.097731E-03,2.850680E-01,3.105939E-01
|
||||
496,5.571145E-03,2.964837E-01,2.948102E-01
|
||||
497,4.394566E-03,3.085010E-01,2.798194E-01
|
||||
498,3.516303E-03,3.211393E-01,2.654100E-01
|
||||
499,2.887638E-03,3.344175E-01,2.514084E-01
|
||||
500,2.461588E-03,3.483536E-01,2.376753E-01
|
||||
501,2.206348E-03,3.629601E-01,2.241211E-01
|
||||
502,2.149559E-03,3.782275E-01,2.107484E-01
|
||||
503,2.337091E-03,3.941359E-01,1.975839E-01
|
||||
504,2.818931E-03,4.106582E-01,1.846574E-01
|
||||
505,3.649178E-03,4.277595E-01,1.720018E-01
|
||||
506,4.891359E-03,4.453993E-01,1.596918E-01
|
||||
507,6.629364E-03,4.635396E-01,1.479415E-01
|
||||
508,8.942902E-03,4.821376E-01,1.369428E-01
|
||||
509,1.190224E-02,5.011430E-01,1.268279E-01
|
||||
510,1.556989E-02,5.204972E-01,1.176796E-01
|
||||
511,1.997668E-02,5.401387E-01,1.094970E-01
|
||||
512,2.504698E-02,5.600208E-01,1.020943E-01
|
||||
513,3.067530E-02,5.800972E-01,9.527993E-02
|
||||
514,3.674999E-02,6.003172E-01,8.890075E-02
|
||||
515,4.315171E-02,6.206256E-01,8.283548E-02
|
||||
516,4.978584E-02,6.409398E-01,7.700982E-02
|
||||
517,5.668554E-02,6.610772E-01,7.144001E-02
|
||||
518,6.391651E-02,6.808134E-01,6.615436E-02
|
||||
519,7.154352E-02,6.999044E-01,6.117199E-02
|
||||
520,7.962917E-02,7.180890E-01,5.650407E-02
|
||||
521,8.821473E-02,7.351593E-01,5.215121E-02
|
||||
522,9.726978E-02,7.511821E-01,4.809566E-02
|
||||
523,1.067504E-01,7.663143E-01,4.431720E-02
|
||||
524,1.166192E-01,7.807352E-01,4.079734E-02
|
||||
525,1.268468E-01,7.946448E-01,3.751912E-02
|
||||
526,1.374060E-01,8.082074E-01,3.446846E-02
|
||||
527,1.482471E-01,8.213817E-01,3.163764E-02
|
||||
528,1.593076E-01,8.340701E-01,2.901901E-02
|
||||
529,1.705181E-01,8.461711E-01,2.660364E-02
|
||||
530,1.818026E-01,8.575799E-01,2.438164E-02
|
||||
531,1.931090E-01,8.682408E-01,2.234097E-02
|
||||
532,2.045085E-01,8.783061E-01,2.046415E-02
|
||||
533,2.161166E-01,8.879907E-01,1.873456E-02
|
||||
534,2.280650E-01,8.975211E-01,1.713788E-02
|
||||
535,2.405015E-01,9.071347E-01,1.566174E-02
|
||||
536,2.535441E-01,9.169947E-01,1.429644E-02
|
||||
537,2.671300E-01,9.269295E-01,1.303702E-02
|
||||
538,2.811351E-01,9.366731E-01,1.187897E-02
|
||||
539,2.954164E-01,9.459482E-01,1.081725E-02
|
||||
540,3.098117E-01,9.544675E-01,9.846470E-03
|
||||
541,3.241678E-01,9.619834E-01,8.960687E-03
|
||||
542,3.384319E-01,9.684390E-01,8.152811E-03
|
||||
543,3.525786E-01,9.738289E-01,7.416025E-03
|
||||
544,3.665839E-01,9.781519E-01,6.744115E-03
|
||||
545,3.804244E-01,9.814106E-01,6.131421E-03
|
||||
546,3.940988E-01,9.836669E-01,5.572778E-03
|
||||
547,4.076972E-01,9.852081E-01,5.063463E-03
|
||||
548,4.213484E-01,9.863813E-01,4.599169E-03
|
||||
549,4.352003E-01,9.875357E-01,4.175971E-03
|
||||
550,4.494206E-01,9.890228E-01,3.790291E-03
|
||||
551,4.641616E-01,9.910811E-01,3.438952E-03
|
||||
552,4.794395E-01,9.934913E-01,3.119341E-03
|
||||
553,4.952180E-01,9.959172E-01,2.829038E-03
|
||||
554,5.114395E-01,9.980205E-01,2.565722E-03
|
||||
555,5.280233E-01,9.994608E-01,2.327186E-03
|
||||
556,5.448696E-01,9.999930E-01,2.111280E-03
|
||||
557,5.618898E-01,9.997557E-01,1.915766E-03
|
||||
558,5.790137E-01,9.989839E-01,1.738589E-03
|
||||
559,5.961882E-01,9.979123E-01,1.577920E-03
|
||||
560,6.133784E-01,9.967737E-01,1.432128E-03
|
||||
561,6.305897E-01,9.957356E-01,1.299781E-03
|
||||
562,6.479223E-01,9.947115E-01,1.179667E-03
|
||||
563,6.654866E-01,9.935534E-01,1.070694E-03
|
||||
564,6.833782E-01,9.921156E-01,9.718623E-04
|
||||
565,7.016774E-01,9.902549E-01,8.822531E-04
|
||||
566,7.204110E-01,9.878596E-01,8.010231E-04
|
||||
567,7.394495E-01,9.849324E-01,7.273884E-04
|
||||
568,7.586285E-01,9.815036E-01,6.606347E-04
|
||||
569,7.777885E-01,9.776035E-01,6.001146E-04
|
||||
570,7.967750E-01,9.732611E-01,5.452416E-04
|
||||
571,8.154530E-01,9.684764E-01,4.954847E-04
|
||||
572,8.337389E-01,9.631369E-01,4.503642E-04
|
||||
573,8.515493E-01,9.571062E-01,4.094455E-04
|
||||
574,8.687862E-01,9.502540E-01,3.723345E-04
|
||||
575,8.853376E-01,9.424569E-01,3.386739E-04
|
||||
576,9.011588E-01,9.336897E-01,3.081396E-04
|
||||
577,9.165278E-01,9.242893E-01,2.804370E-04
|
||||
578,9.318245E-01,9.146707E-01,2.552996E-04
|
||||
579,9.474524E-01,9.052333E-01,2.324859E-04
|
||||
580,9.638388E-01,8.963613E-01,2.117772E-04
|
||||
581,9.812596E-01,8.883069E-01,1.929758E-04
|
||||
582,9.992953E-01,8.808462E-01,1.759024E-04
|
||||
583,1.017343E+00,8.736445E-01,1.603947E-04
|
||||
584,1.034790E+00,8.663755E-01,1.463059E-04
|
||||
585,1.051011E+00,8.587203E-01,1.335031E-04
|
||||
586,1.065522E+00,8.504295E-01,1.218660E-04
|
||||
587,1.078421E+00,8.415047E-01,1.112857E-04
|
||||
588,1.089944E+00,8.320109E-01,1.016634E-04
|
||||
589,1.100320E+00,8.220154E-01,9.291003E-05
|
||||
590,1.109767E+00,8.115868E-01,8.494468E-05
|
||||
591,1.118438E+00,8.007874E-01,7.769425E-05
|
||||
592,1.126266E+00,7.896515E-01,7.109247E-05
|
||||
593,1.133138E+00,7.782053E-01,6.507936E-05
|
||||
594,1.138952E+00,7.664733E-01,5.960061E-05
|
||||
595,1.143620E+00,7.544785E-01,5.460706E-05
|
||||
596,1.147095E+00,7.422473E-01,5.005417E-05
|
||||
597,1.149464E+00,7.298229E-01,4.590157E-05
|
||||
598,1.150838E+00,7.172525E-01,4.211268E-05
|
||||
599,1.151326E+00,7.045818E-01,3.865437E-05
|
||||
600,1.151033E+00,6.918553E-01,3.549661E-05
|
||||
601,1.150002E+00,6.791009E-01,3.261220E-05
|
||||
602,1.148061E+00,6.662846E-01,2.997643E-05
|
||||
603,1.144998E+00,6.533595E-01,2.756693E-05
|
||||
604,1.140622E+00,6.402807E-01,2.536339E-05
|
||||
605,1.134757E+00,6.270066E-01,2.334738E-05
|
||||
606,1.127298E+00,6.135148E-01,2.150221E-05
|
||||
607,1.118342E+00,5.998494E-01,1.981268E-05
|
||||
608,1.108033E+00,5.860682E-01,1.826500E-05
|
||||
609,1.096515E+00,5.722261E-01,1.684667E-05
|
||||
610,1.083928E+00,5.583746E-01,1.554631E-05
|
||||
611,1.070387E+00,5.445535E-01,1.435360E-05
|
||||
612,1.055934E+00,5.307673E-01,1.325915E-05
|
||||
613,1.040592E+00,5.170130E-01,1.225443E-05
|
||||
614,1.024385E+00,5.032889E-01,1.133169E-05
|
||||
615,1.007344E+00,4.895950E-01,1.048387E-05
|
||||
616,9.895268E-01,4.759442E-01,0.000000E+00
|
||||
617,9.711213E-01,4.623958E-01,0.000000E+00
|
||||
618,9.523257E-01,4.490154E-01,0.000000E+00
|
||||
619,9.333248E-01,4.358622E-01,0.000000E+00
|
||||
620,9.142877E-01,4.229897E-01,0.000000E+00
|
||||
621,8.952798E-01,4.104152E-01,0.000000E+00
|
||||
622,8.760157E-01,3.980356E-01,0.000000E+00
|
||||
623,8.561607E-01,3.857300E-01,0.000000E+00
|
||||
624,8.354235E-01,3.733907E-01,0.000000E+00
|
||||
625,8.135565E-01,3.609245E-01,0.000000E+00
|
||||
626,7.904565E-01,3.482860E-01,0.000000E+00
|
||||
627,7.664364E-01,3.355702E-01,0.000000E+00
|
||||
628,7.418777E-01,3.228963E-01,0.000000E+00
|
||||
629,7.171219E-01,3.103704E-01,0.000000E+00
|
||||
630,6.924717E-01,2.980865E-01,0.000000E+00
|
||||
631,6.681600E-01,2.861160E-01,0.000000E+00
|
||||
632,6.442697E-01,2.744822E-01,0.000000E+00
|
||||
633,6.208450E-01,2.631953E-01,0.000000E+00
|
||||
634,5.979243E-01,2.522628E-01,0.000000E+00
|
||||
635,5.755410E-01,2.416902E-01,0.000000E+00
|
||||
636,5.537296E-01,2.314809E-01,0.000000E+00
|
||||
637,5.325412E-01,2.216378E-01,0.000000E+00
|
||||
638,5.120218E-01,2.121622E-01,0.000000E+00
|
||||
639,4.922070E-01,2.030542E-01,0.000000E+00
|
||||
640,4.731224E-01,1.943124E-01,0.000000E+00
|
||||
641,4.547417E-01,1.859227E-01,0.000000E+00
|
||||
642,4.368719E-01,1.778274E-01,0.000000E+00
|
||||
643,4.193121E-01,1.699654E-01,0.000000E+00
|
||||
644,4.018980E-01,1.622841E-01,0.000000E+00
|
||||
645,3.844986E-01,1.547397E-01,0.000000E+00
|
||||
646,3.670592E-01,1.473081E-01,0.000000E+00
|
||||
647,3.497167E-01,1.400169E-01,0.000000E+00
|
||||
648,3.326305E-01,1.329013E-01,0.000000E+00
|
||||
649,3.159341E-01,1.259913E-01,0.000000E+00
|
||||
650,2.997374E-01,1.193120E-01,0.000000E+00
|
||||
651,2.841189E-01,1.128820E-01,0.000000E+00
|
||||
652,2.691053E-01,1.067113E-01,0.000000E+00
|
||||
653,2.547077E-01,1.008052E-01,0.000000E+00
|
||||
654,2.409319E-01,9.516653E-02,0.000000E+00
|
||||
655,2.277792E-01,8.979594E-02,0.000000E+00
|
||||
656,2.152431E-01,8.469044E-02,0.000000E+00
|
||||
657,2.033010E-01,7.984009E-02,0.000000E+00
|
||||
658,1.919276E-01,7.523372E-02,0.000000E+00
|
||||
659,1.810987E-01,7.086061E-02,0.000000E+00
|
||||
660,1.707914E-01,6.671045E-02,0.000000E+00
|
||||
661,1.609842E-01,6.277360E-02,0.000000E+00
|
||||
662,1.516577E-01,5.904179E-02,0.000000E+00
|
||||
663,1.427936E-01,5.550703E-02,0.000000E+00
|
||||
664,1.343737E-01,5.216139E-02,0.000000E+00
|
||||
665,1.263808E-01,4.899699E-02,0.000000E+00
|
||||
666,1.187979E-01,4.600578E-02,0.000000E+00
|
||||
667,1.116088E-01,4.317885E-02,0.000000E+00
|
||||
668,1.047975E-01,4.050755E-02,0.000000E+00
|
||||
669,9.834835E-02,3.798376E-02,0.000000E+00
|
||||
670,9.224597E-02,3.559982E-02,0.000000E+00
|
||||
671,8.647506E-02,3.334856E-02,0.000000E+00
|
||||
672,8.101986E-02,3.122332E-02,0.000000E+00
|
||||
673,7.586514E-02,2.921780E-02,0.000000E+00
|
||||
674,7.099633E-02,2.732601E-02,0.000000E+00
|
||||
675,6.639960E-02,2.554223E-02,0.000000E+00
|
||||
676,6.206225E-02,2.386121E-02,0.000000E+00
|
||||
677,5.797409E-02,2.227859E-02,0.000000E+00
|
||||
678,5.412533E-02,2.079020E-02,0.000000E+00
|
||||
679,5.050600E-02,1.939185E-02,0.000000E+00
|
||||
680,4.710606E-02,1.807939E-02,0.000000E+00
|
||||
681,4.391411E-02,1.684817E-02,0.000000E+00
|
||||
682,4.091411E-02,1.569188E-02,0.000000E+00
|
||||
683,3.809067E-02,1.460446E-02,0.000000E+00
|
||||
684,3.543034E-02,1.358062E-02,0.000000E+00
|
||||
685,3.292138E-02,1.261573E-02,0.000000E+00
|
||||
686,3.055672E-02,1.170696E-02,0.000000E+00
|
||||
687,2.834146E-02,1.085608E-02,0.000000E+00
|
||||
688,2.628033E-02,1.006476E-02,0.000000E+00
|
||||
689,2.437465E-02,9.333376E-03,0.000000E+00
|
||||
690,2.262306E-02,8.661284E-03,0.000000E+00
|
||||
691,2.101935E-02,8.046048E-03,0.000000E+00
|
||||
692,1.954647E-02,7.481130E-03,0.000000E+00
|
||||
693,1.818727E-02,6.959987E-03,0.000000E+00
|
||||
694,1.692727E-02,6.477070E-03,0.000000E+00
|
||||
695,1.575417E-02,6.027677E-03,0.000000E+00
|
||||
696,1.465854E-02,5.608169E-03,0.000000E+00
|
||||
697,1.363571E-02,5.216691E-03,0.000000E+00
|
||||
698,1.268205E-02,4.851785E-03,0.000000E+00
|
||||
699,1.179394E-02,4.512008E-03,0.000000E+00
|
||||
700,1.096778E-02,4.195941E-03,0.000000E+00
|
||||
701,1.019964E-02,3.902057E-03,0.000000E+00
|
||||
702,9.484317E-03,3.628371E-03,0.000000E+00
|
||||
703,8.816851E-03,3.373005E-03,0.000000E+00
|
||||
704,8.192921E-03,3.134315E-03,0.000000E+00
|
||||
705,7.608750E-03,2.910864E-03,0.000000E+00
|
||||
706,7.061391E-03,2.701528E-03,0.000000E+00
|
||||
707,6.549509E-03,2.505796E-03,0.000000E+00
|
||||
708,6.071970E-03,2.323231E-03,0.000000E+00
|
||||
709,5.627476E-03,2.153333E-03,0.000000E+00
|
||||
710,5.214608E-03,1.995557E-03,0.000000E+00
|
||||
711,4.831848E-03,1.849316E-03,0.000000E+00
|
||||
712,4.477579E-03,1.713976E-03,0.000000E+00
|
||||
713,4.150166E-03,1.588899E-03,0.000000E+00
|
||||
714,3.847988E-03,1.473453E-03,0.000000E+00
|
||||
715,3.569452E-03,1.367022E-03,0.000000E+00
|
||||
716,3.312857E-03,1.268954E-03,0.000000E+00
|
||||
717,3.076022E-03,1.178421E-03,0.000000E+00
|
||||
718,2.856894E-03,1.094644E-03,0.000000E+00
|
||||
719,2.653681E-03,1.016943E-03,0.000000E+00
|
||||
720,2.464821E-03,9.447269E-04,0.000000E+00
|
||||
721,2.289060E-03,8.775171E-04,0.000000E+00
|
||||
722,2.125694E-03,8.150438E-04,0.000000E+00
|
||||
723,1.974121E-03,7.570755E-04,0.000000E+00
|
||||
724,1.833723E-03,7.033755E-04,0.000000E+00
|
||||
725,1.703876E-03,6.537050E-04,0.000000E+00
|
||||
726,1.583904E-03,6.078048E-04,0.000000E+00
|
||||
727,1.472939E-03,5.653435E-04,0.000000E+00
|
||||
728,1.370151E-03,5.260046E-04,0.000000E+00
|
||||
729,1.274803E-03,4.895061E-04,0.000000E+00
|
||||
730,1.186238E-03,4.555970E-04,0.000000E+00
|
||||
731,1.103871E-03,4.240548E-04,0.000000E+00
|
||||
732,1.027194E-03,3.946860E-04,0.000000E+00
|
||||
733,9.557493E-04,3.673178E-04,0.000000E+00
|
||||
734,8.891262E-04,3.417941E-04,0.000000E+00
|
||||
735,8.269535E-04,3.179738E-04,0.000000E+00
|
||||
736,7.689351E-04,2.957441E-04,0.000000E+00
|
||||
737,7.149425E-04,2.750558E-04,0.000000E+00
|
||||
738,6.648590E-04,2.558640E-04,0.000000E+00
|
||||
739,6.185421E-04,2.381142E-04,0.000000E+00
|
||||
740,5.758303E-04,2.217445E-04,0.000000E+00
|
||||
741,5.365046E-04,2.066711E-04,0.000000E+00
|
||||
742,5.001842E-04,1.927474E-04,0.000000E+00
|
||||
743,4.665005E-04,1.798315E-04,0.000000E+00
|
||||
744,4.351386E-04,1.678023E-04,0.000000E+00
|
||||
745,4.058303E-04,1.565566E-04,0.000000E+00
|
||||
746,3.783733E-04,1.460168E-04,0.000000E+00
|
||||
747,3.526892E-04,1.361535E-04,0.000000E+00
|
||||
748,3.287199E-04,1.269451E-04,0.000000E+00
|
||||
749,3.063998E-04,1.183671E-04,0.000000E+00
|
||||
750,2.856577E-04,1.103928E-04,0.000000E+00
|
||||
751,2.664108E-04,1.029908E-04,0.000000E+00
|
||||
752,2.485462E-04,9.611836E-05,0.000000E+00
|
||||
753,2.319529E-04,8.973323E-05,0.000000E+00
|
||||
754,2.165300E-04,8.379694E-05,0.000000E+00
|
||||
755,2.021853E-04,7.827442E-05,0.000000E+00
|
||||
756,1.888338E-04,7.313312E-05,0.000000E+00
|
||||
757,1.763935E-04,6.834142E-05,0.000000E+00
|
||||
758,1.647895E-04,6.387035E-05,0.000000E+00
|
||||
759,1.539542E-04,5.969389E-05,0.000000E+00
|
||||
760,1.438270E-04,5.578862E-05,0.000000E+00
|
||||
761,1.343572E-04,5.213509E-05,0.000000E+00
|
||||
762,1.255141E-04,4.872179E-05,0.000000E+00
|
||||
763,1.172706E-04,4.553845E-05,0.000000E+00
|
||||
764,1.095983E-04,4.257443E-05,0.000000E+00
|
||||
765,1.024685E-04,3.981884E-05,0.000000E+00
|
||||
766,9.584715E-05,3.725877E-05,0.000000E+00
|
||||
767,8.968316E-05,3.487467E-05,0.000000E+00
|
||||
768,8.392734E-05,3.264765E-05,0.000000E+00
|
||||
769,7.853708E-05,3.056140E-05,0.000000E+00
|
||||
770,7.347551E-05,2.860175E-05,0.000000E+00
|
||||
771,6.871576E-05,2.675841E-05,0.000000E+00
|
||||
772,6.425257E-05,2.502943E-05,0.000000E+00
|
||||
773,6.008292E-05,2.341373E-05,0.000000E+00
|
||||
774,5.620098E-05,2.190914E-05,0.000000E+00
|
||||
775,5.259870E-05,2.051259E-05,0.000000E+00
|
||||
776,4.926279E-05,1.921902E-05,0.000000E+00
|
||||
777,4.616623E-05,1.801796E-05,0.000000E+00
|
||||
778,4.328212E-05,1.689899E-05,0.000000E+00
|
||||
779,4.058715E-05,1.585309E-05,0.000000E+00
|
||||
780,3.806114E-05,1.487243E-05,0.000000E+00
|
||||
|
391
docs/math/data/linss2_10e_1.csv
Normal file
391
docs/math/data/linss2_10e_1.csv
Normal file
@@ -0,0 +1,391 @@
|
||||
390, 4.15003E-04, 3.68349E-04, 9.54729E-03
|
||||
391, 5.02650E-04, 4.48015E-04, 1.14794E-02
|
||||
392, 6.07367E-04, 5.43965E-04, 1.37986E-02
|
||||
393, 7.31850E-04, 6.58983E-04, 1.65746E-02
|
||||
394, 8.79012E-04, 7.96121E-04, 1.98869E-02
|
||||
395, 1.05192E-03, 9.58658E-04, 2.38250E-02
|
||||
396, 1.25373E-03, 1.15002E-03, 2.84877E-02
|
||||
397, 1.48756E-03, 1.37367E-03, 3.39832E-02
|
||||
398, 1.75633E-03, 1.63296E-03, 4.04274E-02
|
||||
399, 2.06261E-03, 1.93089E-03, 4.79417E-02
|
||||
400, 2.40836E-03, 2.26991E-03, 5.66498E-02
|
||||
401, 2.79522E-03, 2.65210E-03, 6.66757E-02
|
||||
402, 3.22640E-03, 3.08110E-03, 7.81479E-02
|
||||
403, 3.70617E-03, 3.56156E-03, 9.11925E-02
|
||||
404, 4.23972E-03, 4.09900E-03, 1.05926E-01
|
||||
405, 4.83339E-03, 4.70010E-03, 1.22451E-01
|
||||
406, 5.49335E-03, 5.37186E-03, 1.40844E-01
|
||||
407, 6.21933E-03, 6.11757E-03, 1.61140E-01
|
||||
408, 7.00631E-03, 6.93795E-03, 1.83325E-01
|
||||
409, 7.84503E-03, 7.83144E-03, 2.07327E-01
|
||||
410, 8.72127E-03, 8.79369E-03, 2.33008E-01
|
||||
411, 9.61879E-03, 9.81865E-03, 2.60183E-01
|
||||
412, 1.05324E-02, 1.09044E-02, 2.88723E-01
|
||||
413, 1.14620E-02, 1.20509E-02, 3.18512E-01
|
||||
414, 1.24105E-02, 1.32582E-02, 3.49431E-01
|
||||
415, 1.33837E-02, 1.45277E-02, 3.81363E-01
|
||||
416, 1.43870E-02, 1.58600E-02, 4.14141E-01
|
||||
417, 1.54116E-02, 1.72496E-02, 4.47350E-01
|
||||
418, 1.64424E-02, 1.86878E-02, 4.80439E-01
|
||||
419, 1.74614E-02, 2.01638E-02, 5.12767E-01
|
||||
420, 1.84480E-02, 2.16649E-02, 5.43618E-01
|
||||
421, 1.93852E-02, 2.31801E-02, 5.72399E-01
|
||||
422, 2.02811E-02, 2.47139E-02, 5.99284E-01
|
||||
423, 2.11545E-02, 2.62785E-02, 6.24786E-01
|
||||
424, 2.20286E-02, 2.78905E-02, 6.49576E-01
|
||||
425, 2.29317E-02, 2.95714E-02, 6.74474E-01
|
||||
426, 2.38896E-02, 3.13438E-02, 7.00186E-01
|
||||
427, 2.49026E-02, 3.32151E-02, 7.26460E-01
|
||||
428, 2.59631E-02, 3.51889E-02, 7.52726E-01
|
||||
429, 2.70619E-02, 3.72683E-02, 7.78333E-01
|
||||
430, 2.81877E-02, 3.94566E-02, 8.02555E-01
|
||||
431, 2.93303E-02, 4.17546E-02, 8.24818E-01
|
||||
432, 3.04898E-02, 4.41544E-02, 8.45422E-01
|
||||
433, 3.16694E-02, 4.66432E-02, 8.64961E-01
|
||||
434, 3.28731E-02, 4.92050E-02, 8.84100E-01
|
||||
435, 3.41054E-02, 5.18199E-02, 9.03573E-01
|
||||
436, 3.53670E-02, 5.44645E-02, 9.23844E-01
|
||||
437, 3.66400E-02, 5.71131E-02, 9.44055E-01
|
||||
438, 3.78988E-02, 5.97369E-02, 9.62920E-01
|
||||
439, 3.91148E-02, 6.23038E-02, 9.79057E-01
|
||||
440, 4.02563E-02, 6.47782E-02, 9.91020E-01
|
||||
441, 4.12989E-02, 6.71329E-02, 9.97765E-01
|
||||
442, 4.22582E-02, 6.93844E-02, 9.99982E-01
|
||||
443, 4.31627E-02, 7.15658E-02, 9.98861E-01
|
||||
444, 4.40444E-02, 7.37164E-02, 9.95628E-01
|
||||
445, 4.49380E-02, 7.58812E-02, 9.91515E-01
|
||||
446, 4.58729E-02, 7.80980E-02, 9.87377E-01
|
||||
447, 4.68459E-02, 8.03538E-02, 9.82619E-01
|
||||
448, 4.78446E-02, 8.26198E-02, 9.76301E-01
|
||||
449, 4.88555E-02, 8.48644E-02, 9.67513E-01
|
||||
450, 4.98639E-02, 8.70524E-02, 9.55393E-01
|
||||
451, 5.08618E-02, 8.91640E-02, 9.39499E-01
|
||||
452, 5.18731E-02, 9.12523E-02, 9.20807E-01
|
||||
453, 5.29317E-02, 9.33950E-02, 9.00592E-01
|
||||
454, 5.40746E-02, 9.56775E-02, 8.80040E-01
|
||||
455, 5.53418E-02, 9.81934E-02, 8.60240E-01
|
||||
456, 5.67734E-02, 1.01031E-01, 8.42031E-01
|
||||
457, 5.83973E-02, 1.04229E-01, 8.25572E-01
|
||||
458, 6.02409E-02, 1.07814E-01, 8.10860E-01
|
||||
459, 6.23353E-02, 1.11817E-01, 7.97902E-01
|
||||
460, 6.47164E-02, 1.16272E-01, 7.86704E-01
|
||||
461, 6.74131E-02, 1.21204E-01, 7.77119E-01
|
||||
462, 7.04040E-02, 1.26573E-01, 7.68365E-01
|
||||
463, 7.36489E-02, 1.32311E-01, 7.59538E-01
|
||||
464, 7.70978E-02, 1.38334E-01, 7.49777E-01
|
||||
465, 8.06894E-02, 1.44541E-01, 7.38268E-01
|
||||
466, 8.43613E-02, 1.50828E-01, 7.24389E-01
|
||||
467, 8.80904E-02, 1.57146E-01, 7.08113E-01
|
||||
468, 9.18630E-02, 1.63457E-01, 6.89572E-01
|
||||
469, 9.56637E-02, 1.69721E-01, 6.68927E-01
|
||||
470, 9.94755E-02, 1.75893E-01, 6.46359E-01
|
||||
471, 1.03286E-01, 1.81938E-01, 6.22112E-01
|
||||
472, 1.07103E-01, 1.87872E-01, 5.96591E-01
|
||||
473, 1.10947E-01, 1.93731E-01, 5.70216E-01
|
||||
474, 1.14838E-01, 1.99557E-01, 5.43373E-01
|
||||
475, 1.18802E-01, 2.05398E-01, 5.16411E-01
|
||||
476, 1.22863E-01, 2.11302E-01, 4.89647E-01
|
||||
477, 1.27026E-01, 2.17283E-01, 4.63406E-01
|
||||
478, 1.31293E-01, 2.23347E-01, 4.37965E-01
|
||||
479, 1.35666E-01, 2.29501E-01, 4.13549E-01
|
||||
480, 1.40145E-01, 2.35754E-01, 3.90333E-01
|
||||
481, 1.44731E-01, 2.42108E-01, 3.68394E-01
|
||||
482, 1.49415E-01, 2.48545E-01, 3.47582E-01
|
||||
483, 1.54189E-01, 2.55037E-01, 3.27724E-01
|
||||
484, 1.59038E-01, 2.61554E-01, 3.08676E-01
|
||||
485, 1.63952E-01, 2.68063E-01, 2.90322E-01
|
||||
486, 1.68932E-01, 2.74561E-01, 2.72626E-01
|
||||
487, 1.74063E-01, 2.81180E-01, 2.55772E-01
|
||||
488, 1.79457E-01, 2.88097E-01, 2.39945E-01
|
||||
489, 1.85241E-01, 2.95508E-01, 2.25280E-01
|
||||
490, 1.91556E-01, 3.03630E-01, 2.11867E-01
|
||||
491, 1.98532E-01, 3.12649E-01, 1.99719E-01
|
||||
492, 2.06182E-01, 3.22565E-01, 1.88674E-01
|
||||
493, 2.14485E-01, 3.33319E-01, 1.78557E-01
|
||||
494, 2.23411E-01, 3.44844E-01, 1.69217E-01
|
||||
495, 2.32926E-01, 3.57061E-01, 1.60526E-01
|
||||
496, 2.42992E-01, 3.69895E-01, 1.52368E-01
|
||||
497, 2.53616E-01, 3.83355E-01, 1.44620E-01
|
||||
498, 2.64810E-01, 3.97467E-01, 1.37173E-01
|
||||
499, 2.76587E-01, 4.12260E-01, 1.29937E-01
|
||||
500, 2.88959E-01, 4.27764E-01, 1.22839E-01
|
||||
501, 3.01934E-01, 4.44001E-01, 1.15834E-01
|
||||
502, 3.15508E-01, 4.60947E-01, 1.08922E-01
|
||||
503, 3.29673E-01, 4.78562E-01, 1.02118E-01
|
||||
504, 3.44416E-01, 4.96795E-01, 9.54374E-02
|
||||
505, 3.59716E-01, 5.15587E-01, 8.88965E-02
|
||||
506, 3.75550E-01, 5.34868E-01, 8.25343E-02
|
||||
507, 3.91895E-01, 5.54575E-01, 7.64613E-02
|
||||
508, 4.08722E-01, 5.74640E-01, 7.07769E-02
|
||||
509, 4.25998E-01, 5.94984E-01, 6.55491E-02
|
||||
510, 4.43683E-01, 6.15520E-01, 6.08210E-02
|
||||
511, 4.61731E-01, 6.36162E-01, 5.65919E-02
|
||||
512, 4.80094E-01, 6.56872E-01, 5.27659E-02
|
||||
513, 4.98717E-01, 6.77624E-01, 4.92440E-02
|
||||
514, 5.17539E-01, 6.98393E-01, 4.59470E-02
|
||||
515, 5.36494E-01, 7.19154E-01, 4.28123E-02
|
||||
516, 5.55493E-01, 7.39844E-01, 3.98014E-02
|
||||
517, 5.74386E-01, 7.60235E-01, 3.69227E-02
|
||||
518, 5.92995E-01, 7.80039E-01, 3.41909E-02
|
||||
519, 6.11124E-01, 7.98941E-01, 3.16158E-02
|
||||
520, 6.28561E-01, 8.16610E-01, 2.92033E-02
|
||||
521, 6.45139E-01, 8.32783E-01, 2.69536E-02
|
||||
522, 6.60907E-01, 8.47550E-01, 2.48575E-02
|
||||
523, 6.75993E-01, 8.61113E-01, 2.29047E-02
|
||||
524, 6.90542E-01, 8.73698E-01, 2.10855E-02
|
||||
525, 7.04720E-01, 8.85550E-01, 1.93912E-02
|
||||
526, 7.18662E-01, 8.96873E-01, 1.78145E-02
|
||||
527, 7.32323E-01, 9.07638E-01, 1.63514E-02
|
||||
528, 7.45606E-01, 9.17757E-01, 1.49980E-02
|
||||
529, 7.58410E-01, 9.27137E-01, 1.37497E-02
|
||||
530, 7.70630E-01, 9.35687E-01, 1.26013E-02
|
||||
531, 7.82208E-01, 9.43362E-01, 1.15466E-02
|
||||
532, 7.93290E-01, 9.50309E-01, 1.05766E-02
|
||||
533, 8.04084E-01, 9.56733E-01, 9.68268E-03
|
||||
534, 8.14813E-01, 9.62844E-01, 8.85746E-03
|
||||
535, 8.25711E-01, 9.68858E-01, 8.09453E-03
|
||||
536, 8.36943E-01, 9.74919E-01, 7.38890E-03
|
||||
537, 8.48349E-01, 9.80850E-01, 6.73799E-03
|
||||
538, 8.59676E-01, 9.86388E-01, 6.13947E-03
|
||||
539, 8.70656E-01, 9.91267E-01, 5.59073E-03
|
||||
540, 8.81011E-01, 9.95217E-01, 5.08900E-03
|
||||
541, 8.90496E-01, 9.98007E-01, 4.63120E-03
|
||||
542, 8.99052E-01, 9.99595E-01, 4.21366E-03
|
||||
543, 9.06669E-01, 9.99982E-01, 3.83286E-03
|
||||
544, 9.13341E-01, 9.99177E-01, 3.48559E-03
|
||||
545, 9.19067E-01, 9.97193E-01, 3.16893E-03
|
||||
546, 9.23898E-01, 9.94102E-01, 2.88021E-03
|
||||
547, 9.28099E-01, 9.90204E-01, 2.61698E-03
|
||||
548, 9.31995E-01, 9.85855E-01, 2.37701E-03
|
||||
549, 9.35916E-01, 9.81404E-01, 2.15829E-03
|
||||
550, 9.40198E-01, 9.77193E-01, 1.95896E-03
|
||||
551, 9.45076E-01, 9.73441E-01, 1.77737E-03
|
||||
552, 9.50367E-01, 9.69881E-01, 1.61218E-03
|
||||
553, 9.55775E-01, 9.66133E-01, 1.46215E-03
|
||||
554, 9.61000E-01, 9.61823E-01, 1.32606E-03
|
||||
555, 9.65733E-01, 9.56583E-01, 1.20277E-03
|
||||
556, 9.69744E-01, 9.50167E-01, 1.09118E-03
|
||||
557, 9.73133E-01, 9.42773E-01, 9.90135E-04
|
||||
558, 9.76086E-01, 9.34709E-01, 8.98564E-04
|
||||
559, 9.78793E-01, 9.26271E-01, 8.15524E-04
|
||||
560, 9.81445E-01, 9.17750E-01, 7.40174E-04
|
||||
561, 9.84186E-01, 9.09339E-01, 6.71772E-04
|
||||
562, 9.86965E-01, 9.00895E-01, 6.09693E-04
|
||||
563, 9.89678E-01, 8.92197E-01, 5.53372E-04
|
||||
564, 9.92220E-01, 8.83035E-01, 5.02292E-04
|
||||
565, 9.94486E-01, 8.73205E-01, 4.55979E-04
|
||||
566, 9.96386E-01, 8.62565E-01, 4.13997E-04
|
||||
567, 9.97895E-01, 8.51173E-01, 3.75940E-04
|
||||
568, 9.99004E-01, 8.39132E-01, 3.41439E-04
|
||||
569, 9.99706E-01, 8.26545E-01, 3.10160E-04
|
||||
570, 9.99993E-01, 8.13509E-01, 2.81800E-04
|
||||
571, 9.99837E-01, 8.00082E-01, 2.56084E-04
|
||||
572, 9.99123E-01, 7.86166E-01, 2.32764E-04
|
||||
573, 9.97719E-01, 7.71635E-01, 2.11616E-04
|
||||
574, 9.95491E-01, 7.56376E-01, 1.92436E-04
|
||||
575, 9.92310E-01, 7.40291E-01, 1.75039E-04
|
||||
576, 9.88146E-01, 7.23369E-01, 1.59257E-04
|
||||
577, 9.83345E-01, 7.05890E-01, 1.44940E-04
|
||||
578, 9.78342E-01, 6.88184E-01, 1.31948E-04
|
||||
579, 9.73564E-01, 6.70554E-01, 1.20157E-04
|
||||
580, 9.69429E-01, 6.53274E-01, 1.09454E-04
|
||||
581, 9.66211E-01, 6.36524E-01, 9.97367E-05
|
||||
582, 9.63630E-01, 6.20217E-01, 9.09125E-05
|
||||
583, 9.61273E-01, 6.04211E-01, 8.28976E-05
|
||||
584, 9.58732E-01, 5.88375E-01, 7.56160E-05
|
||||
585, 9.55602E-01, 5.72597E-01, 6.89991E-05
|
||||
586, 9.51569E-01, 5.56783E-01, 6.29846E-05
|
||||
587, 9.46654E-01, 5.40896E-01, 5.75163E-05
|
||||
588, 9.40962E-01, 5.24912E-01, 5.25432E-05
|
||||
589, 9.34600E-01, 5.08817E-01, 4.80192E-05
|
||||
590, 9.27673E-01, 4.92599E-01, 4.39024E-05
|
||||
591, 9.20264E-01, 4.76268E-01, 4.01551E-05
|
||||
592, 9.12391E-01, 4.59893E-01, 3.67431E-05
|
||||
593, 9.04050E-01, 4.43551E-01, 3.36353E-05
|
||||
594, 8.95243E-01, 4.27314E-01, 3.08037E-05
|
||||
595, 8.85969E-01, 4.11246E-01, 2.82228E-05
|
||||
596, 8.76242E-01, 3.95396E-01, 2.58697E-05
|
||||
597, 8.66117E-01, 3.79782E-01, 2.37235E-05
|
||||
598, 8.55658E-01, 3.64410E-01, 2.17653E-05
|
||||
599, 8.44926E-01, 3.49289E-01, 1.99779E-05
|
||||
600, 8.33982E-01, 3.34429E-01, 1.83459E-05
|
||||
601, 8.22859E-01, 3.19843E-01, 1.68551E-05
|
||||
602, 8.11491E-01, 3.05564E-01, 1.54929E-05
|
||||
603, 7.99794E-01, 2.91625E-01, 1.42476E-05
|
||||
604, 7.87689E-01, 2.78053E-01, 1.31087E-05
|
||||
605, 7.75103E-01, 2.64872E-01, 1.20667E-05
|
||||
606, 7.61996E-01, 2.52099E-01, 1.11131E-05
|
||||
607, 7.48425E-01, 2.39747E-01, 1.02399E-05
|
||||
608, 7.34470E-01, 2.27822E-01, 9.43999E-06
|
||||
609, 7.20208E-01, 2.16330E-01, 8.70695E-06
|
||||
610, 7.05713E-01, 2.05273E-01, 8.03488E-06
|
||||
611, 6.91044E-01, 1.94650E-01, 7.41844E-06
|
||||
612, 6.76212E-01, 1.84448E-01, 6.85279E-06
|
||||
613, 6.61220E-01, 1.74654E-01, 6.33352E-06
|
||||
614, 6.46072E-01, 1.65256E-01, 5.85662E-06
|
||||
615, 6.30773E-01, 1.56243E-01, 5.41843E-06
|
||||
616, 6.15349E-01, 1.47602E-01, 0.00000E-00
|
||||
617, 5.99888E-01, 1.39329E-01, 0.00000E-00
|
||||
618, 5.84489E-01, 1.31416E-01, 0.00000E-00
|
||||
619, 5.69240E-01, 1.23856E-01, 0.00000E-00
|
||||
620, 5.54224E-01, 1.16641E-01, 0.00000E-00
|
||||
621, 5.39469E-01, 1.09766E-01, 0.00000E-00
|
||||
622, 5.24827E-01, 1.03226E-01, 0.00000E-00
|
||||
623, 5.10124E-01, 9.70205E-02, 0.00000E-00
|
||||
624, 4.95206E-01, 9.11430E-02, 0.00000E-00
|
||||
625, 4.79941E-01, 8.55872E-02, 0.00000E-00
|
||||
626, 4.64270E-01, 8.03428E-02, 0.00000E-00
|
||||
627, 4.48338E-01, 7.53913E-02, 0.00000E-00
|
||||
628, 4.32329E-01, 7.07136E-02, 0.00000E-00
|
||||
629, 4.16406E-01, 6.62924E-02, 0.00000E-00
|
||||
630, 4.00711E-01, 6.21120E-02, 0.00000E-00
|
||||
631, 3.85355E-01, 5.81595E-02, 0.00000E-00
|
||||
632, 3.70377E-01, 5.44276E-02, 0.00000E-00
|
||||
633, 3.55793E-01, 5.09098E-02, 0.00000E-00
|
||||
634, 3.41618E-01, 4.75991E-02, 0.00000E-00
|
||||
635, 3.27864E-01, 4.44879E-02, 0.00000E-00
|
||||
636, 3.14541E-01, 4.15659E-02, 0.00000E-00
|
||||
637, 3.01662E-01, 3.88152E-02, 0.00000E-00
|
||||
638, 2.89239E-01, 3.62181E-02, 0.00000E-00
|
||||
639, 2.77278E-01, 3.37599E-02, 0.00000E-00
|
||||
640, 2.65784E-01, 3.14282E-02, 0.00000E-00
|
||||
641, 2.54740E-01, 2.92176E-02, 0.00000E-00
|
||||
642, 2.44054E-01, 2.71403E-02, 0.00000E-00
|
||||
643, 2.33634E-01, 2.52084E-02, 0.00000E-00
|
||||
644, 2.23399E-01, 2.34286E-02, 0.00000E-00
|
||||
645, 2.13284E-01, 2.18037E-02, 0.00000E-00
|
||||
646, 2.03257E-01, 2.03285E-02, 0.00000E-00
|
||||
647, 1.93370E-01, 1.89779E-02, 0.00000E-00
|
||||
648, 1.83688E-01, 1.77272E-02, 0.00000E-00
|
||||
649, 1.74263E-01, 1.65560E-02, 0.00000E-00
|
||||
650, 1.65141E-01, 1.54480E-02, 0.00000E-00
|
||||
651, 1.56354E-01, 1.43924E-02, 0.00000E-00
|
||||
652, 1.47916E-01, 1.33896E-02, 0.00000E-00
|
||||
653, 1.39834E-01, 1.24414E-02, 0.00000E-00
|
||||
654, 1.32111E-01, 1.15488E-02, 0.00000E-00
|
||||
655, 1.24749E-01, 1.07120E-02, 0.00000E-00
|
||||
656, 1.17744E-01, 9.92994E-03, 0.00000E-00
|
||||
657, 1.11081E-01, 9.20057E-03, 0.00000E-00
|
||||
658, 1.04747E-01, 8.52126E-03, 0.00000E-00
|
||||
659, 9.87277E-02, 7.88945E-03, 0.00000E-00
|
||||
660, 9.30085E-02, 7.30255E-03, 0.00000E-00
|
||||
661, 8.75769E-02, 6.75820E-03, 0.00000E-00
|
||||
662, 8.24219E-02, 6.25474E-03, 0.00000E-00
|
||||
663, 7.75328E-02, 5.79045E-03, 0.00000E-00
|
||||
664, 7.28989E-02, 5.36347E-03, 0.00000E-00
|
||||
665, 6.85100E-02, 4.97179E-03, 0.00000E-00
|
||||
666, 6.43554E-02, 4.61300E-03, 0.00000E-00
|
||||
667, 6.04242E-02, 4.28339E-03, 0.00000E-00
|
||||
668, 5.67057E-02, 3.97940E-03, 0.00000E-00
|
||||
669, 5.31896E-02, 3.69803E-03, 0.00000E-00
|
||||
670, 4.98661E-02, 3.43667E-03, 0.00000E-00
|
||||
671, 4.67258E-02, 3.19326E-03, 0.00000E-00
|
||||
672, 4.37598E-02, 2.96653E-03, 0.00000E-00
|
||||
673, 4.09594E-02, 2.75543E-03, 0.00000E-00
|
||||
674, 3.83165E-02, 2.55896E-03, 0.00000E-00
|
||||
675, 3.58233E-02, 2.37617E-03, 0.00000E-00
|
||||
676, 3.34725E-02, 2.20618E-03, 0.00000E-00
|
||||
677, 3.12583E-02, 2.04809E-03, 0.00000E-00
|
||||
678, 2.91751E-02, 1.90110E-03, 0.00000E-00
|
||||
679, 2.72173E-02, 1.76442E-03, 0.00000E-00
|
||||
680, 2.53790E-02, 1.63734E-03, 0.00000E-00
|
||||
681, 2.36541E-02, 1.51916E-03, 0.00000E-00
|
||||
682, 2.20336E-02, 1.40913E-03, 0.00000E-00
|
||||
683, 2.05092E-02, 1.30655E-03, 0.00000E-00
|
||||
684, 1.90735E-02, 1.21078E-03, 0.00000E-00
|
||||
685, 1.77201E-02, 1.12128E-03, 0.00000E-00
|
||||
686, 1.64451E-02, 1.03766E-03, 0.00000E-00
|
||||
687, 1.52510E-02, 9.59892E-04, 0.00000E-00
|
||||
688, 1.41404E-02, 8.87951E-04, 0.00000E-00
|
||||
689, 1.31137E-02, 8.21729E-04, 0.00000E-00
|
||||
690, 1.21701E-02, 7.61051E-04, 0.00000E-00
|
||||
691, 1.13063E-02, 7.05623E-04, 0.00000E-00
|
||||
692, 1.05131E-02, 6.54874E-04, 0.00000E-00
|
||||
693, 9.78127E-03, 6.08240E-04, 0.00000E-00
|
||||
694, 9.10300E-03, 5.65240E-04, 0.00000E-00
|
||||
695, 8.47170E-03, 5.25457E-04, 0.00000E-00
|
||||
696, 7.88227E-03, 4.88550E-04, 0.00000E-00
|
||||
697, 7.33213E-03, 4.54277E-04, 0.00000E-00
|
||||
698, 6.81928E-03, 4.22436E-04, 0.00000E-00
|
||||
699, 6.34173E-03, 3.92839E-04, 0.00000E-00
|
||||
700, 5.89749E-03, 3.65317E-04, 0.00000E-00
|
||||
701, 5.48444E-03, 3.39710E-04, 0.00000E-00
|
||||
702, 5.09978E-03, 3.15856E-04, 0.00000E-00
|
||||
703, 4.74086E-03, 2.93607E-04, 0.00000E-00
|
||||
704, 4.40538E-03, 2.72834E-04, 0.00000E-00
|
||||
705, 4.09129E-03, 2.53417E-04, 0.00000E-00
|
||||
706, 3.79703E-03, 2.35265E-04, 0.00000E-00
|
||||
707, 3.52187E-03, 2.18331E-04, 0.00000E-00
|
||||
708, 3.26520E-03, 2.02574E-04, 0.00000E-00
|
||||
709, 3.02632E-03, 1.87948E-04, 0.00000E-00
|
||||
710, 2.80447E-03, 1.74402E-04, 0.00000E-00
|
||||
711, 2.59882E-03, 1.61878E-04, 0.00000E-00
|
||||
712, 2.40849E-03, 1.50305E-04, 0.00000E-00
|
||||
713, 2.23259E-03, 1.39612E-04, 0.00000E-00
|
||||
714, 2.07024E-03, 1.29734E-04, 0.00000E-00
|
||||
715, 1.92058E-03, 1.20608E-04, 0.00000E-00
|
||||
716, 1.78269E-03, 1.12176E-04, 0.00000E-00
|
||||
717, 1.65540E-03, 1.04373E-04, 0.00000E-00
|
||||
718, 1.53762E-03, 9.71383E-05, 0.00000E-00
|
||||
719, 1.42839E-03, 9.04202E-05, 0.00000E-00
|
||||
720, 1.32687E-03, 8.41716E-05, 0.00000E-00
|
||||
721, 1.23238E-03, 7.83538E-05, 0.00000E-00
|
||||
722, 1.14456E-03, 7.29425E-05, 0.00000E-00
|
||||
723, 1.06308E-03, 6.79164E-05, 0.00000E-00
|
||||
724, 9.87592E-04, 6.32542E-05, 0.00000E-00
|
||||
725, 9.17777E-04, 5.89349E-05, 0.00000E-00
|
||||
726, 8.53264E-04, 5.49360E-05, 0.00000E-00
|
||||
727, 7.93589E-04, 5.12291E-05, 0.00000E-00
|
||||
728, 7.38306E-04, 4.77872E-05, 0.00000E-00
|
||||
729, 6.87018E-04, 4.45862E-05, 0.00000E-00
|
||||
730, 6.39373E-04, 4.16049E-05, 0.00000E-00
|
||||
731, 5.95057E-04, 3.88245E-05, 0.00000E-00
|
||||
732, 5.53797E-04, 3.62302E-05, 0.00000E-00
|
||||
733, 5.15350E-04, 3.38086E-05, 0.00000E-00
|
||||
734, 4.79496E-04, 3.15474E-05, 0.00000E-00
|
||||
735, 4.46035E-04, 2.94354E-05, 0.00000E-00
|
||||
736, 4.14809E-04, 2.74634E-05, 0.00000E-00
|
||||
737, 3.85749E-04, 2.56268E-05, 0.00000E-00
|
||||
738, 3.58792E-04, 2.39217E-05, 0.00000E-00
|
||||
739, 3.33861E-04, 2.23432E-05, 0.00000E-00
|
||||
740, 3.10869E-04, 2.08860E-05, 0.00000E-00
|
||||
741, 2.89699E-04, 1.95424E-05, 0.00000E-00
|
||||
742, 2.70145E-04, 1.82990E-05, 0.00000E-00
|
||||
743, 2.52007E-04, 1.71423E-05, 0.00000E-00
|
||||
744, 2.35117E-04, 1.60611E-05, 0.00000E-00
|
||||
745, 2.19329E-04, 1.50458E-05, 0.00000E-00
|
||||
746, 2.04535E-04, 1.40893E-05, 0.00000E-00
|
||||
747, 1.90692E-04, 1.31899E-05, 0.00000E-00
|
||||
748, 1.77771E-04, 1.23462E-05, 0.00000E-00
|
||||
749, 1.65736E-04, 1.15569E-05, 0.00000E-00
|
||||
750, 1.54549E-04, 1.08200E-05, 0.00000E-00
|
||||
751, 1.44167E-04, 1.01334E-05, 0.00000E-00
|
||||
752, 1.34528E-04, 9.49367E-06, 0.00000E-00
|
||||
753, 1.25574E-04, 8.89736E-06, 0.00000E-00
|
||||
754, 1.17251E-04, 8.34135E-06, 0.00000E-00
|
||||
755, 1.09508E-04, 7.82271E-06, 0.00000E-00
|
||||
756, 1.02300E-04, 7.33865E-06, 0.00000E-00
|
||||
757, 9.55828E-05, 6.88612E-06, 0.00000E-00
|
||||
758, 8.93161E-05, 6.46228E-06, 0.00000E-00
|
||||
759, 8.34631E-05, 6.06462E-06, 0.00000E-00
|
||||
760, 7.79912E-05, 5.69093E-06, 0.00000E-00
|
||||
761, 7.28730E-05, 5.33942E-06, 0.00000E-00
|
||||
762, 6.80921E-05, 5.00929E-06, 0.00000E-00
|
||||
763, 6.36342E-05, 4.69984E-06, 0.00000E-00
|
||||
764, 5.94841E-05, 4.41034E-06, 0.00000E-00
|
||||
765, 5.56264E-05, 4.13998E-06, 0.00000E-00
|
||||
766, 5.20430E-05, 3.88772E-06, 0.00000E-00
|
||||
767, 4.87063E-05, 3.65186E-06, 0.00000E-00
|
||||
768, 4.55900E-05, 3.43070E-06, 0.00000E-00
|
||||
769, 4.26710E-05, 3.22278E-06, 0.00000E-00
|
||||
770, 3.99295E-05, 3.02683E-06, 0.00000E-00
|
||||
771, 3.73509E-05, 2.84192E-06, 0.00000E-00
|
||||
772, 3.49326E-05, 2.66795E-06, 0.00000E-00
|
||||
773, 3.26730E-05, 2.50491E-06, 0.00000E-00
|
||||
774, 3.05690E-05, 2.35267E-06, 0.00000E-00
|
||||
775, 2.86163E-05, 2.21100E-06, 0.00000E-00
|
||||
776, 2.68077E-05, 2.07946E-06, 0.00000E-00
|
||||
777, 2.51286E-05, 1.95700E-06, 0.00000E-00
|
||||
778, 2.35645E-05, 1.84258E-06, 0.00000E-00
|
||||
779, 2.21026E-05, 1.73528E-06, 0.00000E-00
|
||||
780, 2.07321E-05, 1.63433E-06, 0.00000E-00
|
||||
|
391
docs/math/data/rec709.csv
Normal file
391
docs/math/data/rec709.csv
Normal file
@@ -0,0 +1,391 @@
|
||||
390,0.028818291, 0.011877002, 0.959304707
|
||||
391,0.028818291, 0.011877002, 0.959304707
|
||||
392,0.028818291, 0.011877002, 0.959304707
|
||||
393,0.028818291, 0.011877002, 0.959304707
|
||||
394,0.028818291, 0.011877002, 0.959304707
|
||||
395,0.028818291, 0.011877002, 0.959304707
|
||||
396,0.028818291, 0.011877002, 0.959304707
|
||||
397,0.028818291, 0.011877002, 0.959304707
|
||||
398,0.028818291, 0.011877002, 0.959304707
|
||||
399,0.028818291, 0.011877002, 0.959304707
|
||||
400,0.028818291, 0.011877002, 0.959304707
|
||||
401,0.028818291, 0.011877002, 0.959304707
|
||||
402,0.028811021, 0.011877002, 0.959311977
|
||||
403,0.028802781, 0.011877002, 0.959320217
|
||||
404,0.028793521, 0.011877002, 0.959329477
|
||||
405,0.02878296, 0.011877002, 0.959340038
|
||||
406,0.028770917, 0.011877002, 0.95935208
|
||||
407,0.028757342, 0.011877002, 0.959365656
|
||||
408,0.028741827, 0.011877002, 0.959381171
|
||||
409,0.02872419, 0.011877002, 0.959398808
|
||||
410,0.028704048, 0.011877002, 0.95941895
|
||||
411,0.028681031, 0.011886657, 0.959432313
|
||||
412,0.02865476, 0.011897721, 0.959447519
|
||||
413,0.028624766, 0.011910316, 0.959464919
|
||||
414,0.028590487, 0.0119247, 0.959484814
|
||||
415,0.028551637, 0.011941085, 0.959507279
|
||||
416,0.028507641, 0.011959757, 0.959532602
|
||||
417,0.028457679, 0.011980956, 0.959561366
|
||||
418,0.028401308, 0.012005032, 0.959593661
|
||||
419,0.028337507, 0.012032367, 0.959630128
|
||||
420,0.028265518, 0.012063369, 0.959671114
|
||||
421,0.028184712, 0.012098436, 0.959716853
|
||||
422,0.028093938, 0.012138183, 0.959767881
|
||||
423,0.027992225, 0.01218309, 0.959824687
|
||||
424,0.027878758, 0.012233713, 0.959887532
|
||||
425,0.027752728, 0.012290715, 0.95995656
|
||||
426,0.027613202, 0.012354682, 0.960032118
|
||||
427,0.027459639, 0.012426334, 0.96011403
|
||||
428,0.027291406, 0.012506237, 0.96020236
|
||||
429,0.027108029, 0.012595103, 0.960296871
|
||||
430,0.026909351, 0.01269359, 0.960397062
|
||||
431,0.026695068, 0.012802303, 0.960502632
|
||||
432,0.026465327, 0.012922024, 0.960612653
|
||||
433,0.02621978, 0.013053697, 0.960726528
|
||||
434,0.02595819, 0.013198476, 0.960843339
|
||||
435,0.025680593, 0.013357408, 0.960962004
|
||||
436,0.025387006, 0.013531737, 0.961081261
|
||||
437,0.02507752, 0.013722843, 0.961199642
|
||||
438,0.024752635, 0.013932033, 0.961315337
|
||||
439,0.024412905, 0.014160874, 0.961426226
|
||||
440,0.02405883, 0.014411037, 0.961530138
|
||||
441,0.023691176, 0.014684282, 0.961624548
|
||||
442,0.02331084, 0.014982637, 0.961706529
|
||||
443,0.022918745, 0.015308115, 0.961773146
|
||||
444,0.02251608, 0.015663026, 0.9618209
|
||||
445,0.022103926, 0.016049824, 0.961846257
|
||||
446,0.021683511, 0.016471404, 0.961845091
|
||||
447,0.021256027, 0.016930724, 0.961813257
|
||||
448,0.020822729, 0.017431474, 0.961745804
|
||||
449,0.020384772, 0.017977408, 0.961637827
|
||||
450,0.019943276, 0.01857313, 0.961483602
|
||||
451,0.019499471, 0.019223505, 0.961277031
|
||||
452,0.019054471, 0.019934375, 0.961011161
|
||||
453,0.018609424, 0.020711793, 0.960678791
|
||||
454,0.018165471, 0.021562842, 0.960271695
|
||||
455,0.017723519, 0.022495442, 0.959781047
|
||||
456,0.017284601, 0.02351872, 0.959196687
|
||||
457,0.016849621, 0.024643089, 0.958507298
|
||||
458,0.016419409, 0.025880449, 0.957700149
|
||||
459,0.015994666, 0.027244468, 0.956760874
|
||||
460,0.015576139, 0.028750929, 0.95567294
|
||||
461,0.015164369, 0.030417962, 0.954417677
|
||||
462,0.014759893, 0.03226665, 0.952973465
|
||||
463,0.01436327, 0.034321187, 0.951315551
|
||||
464,0.013974834, 0.036609597, 0.949415576
|
||||
465,0.013594951, 0.039164589, 0.947240469
|
||||
466,0.01322398, 0.042024179, 0.944751849
|
||||
467,0.012862081, 0.045232687, 0.94190524
|
||||
468,0.012509509, 0.048841513, 0.938648986
|
||||
469,0.012166415, 0.052910539, 0.934923054
|
||||
470,0.011832836, 0.05750968, 0.930657491
|
||||
471,0.011508938, 0.062721079, 0.925769991
|
||||
472,0.011194664, 0.068641244, 0.9201641
|
||||
473,0.010890006, 0.075385301, 0.913724701
|
||||
474,0.010594921, 0.083088729, 0.906316358
|
||||
475,0.010309243, 0.091912392, 0.897778373
|
||||
476,0.010032852, 0.102044876, 0.887922279
|
||||
477,0.00976562, 0.113708114, 0.876526273
|
||||
478,0.009507356, 0.127159828, 0.863332823
|
||||
479,0.009257866, 0.14269643, 0.848045711
|
||||
480,0.0090169, 0.160651591, 0.830331517
|
||||
481,0.008784129, 0.181390517, 0.809825361
|
||||
482,0.008559389, 0.205290227, 0.786150391
|
||||
483,0.008342333, 0.232698734, 0.75895894
|
||||
484,0.008132602, 0.263880897, 0.727986508
|
||||
485,0.007929888, 0.298929894, 0.693140225
|
||||
486,0.007733877, 0.337660526, 0.654605604
|
||||
487,0.007544324, 0.379519416, 0.612936267
|
||||
488,0.007361023, 0.423563429, 0.569075555
|
||||
489,0.007183855, 0.468553426, 0.524262725
|
||||
490,0.007012745, 0.513160591, 0.479826671
|
||||
491,0.006847712, 0.556197975, 0.436954319
|
||||
492,0.006688746, 0.596774501, 0.39653676
|
||||
493,0.006535881, 0.634336924, 0.359127201
|
||||
494,0.006389133, 0.668637252, 0.324973622
|
||||
495,0.006248471, 0.699655061, 0.294096474
|
||||
496,0.006113831, 0.727519207, 0.266366969
|
||||
497,0.00598516, 0.752443966, 0.24157088
|
||||
498,0.005862418, 0.774683948, 0.219453641
|
||||
499,0.005745439, 0.794504131, 0.199750437
|
||||
500,0.005634161, 0.812162229, 0.182203618
|
||||
501,0.005528477, 0.827899667, 0.166571863
|
||||
502,0.005428285, 0.841936088, 0.152635634
|
||||
503,0.0053335, 0.854469313, 0.140197194
|
||||
504,0.005244008, 0.865675487, 0.129080512
|
||||
505,0.005159746, 0.875710212, 0.11913005
|
||||
506,0.00508063, 0.88471046, 0.110208918
|
||||
507,0.005006586, 0.892796076, 0.102197347
|
||||
508,0.004937545, 0.900072521, 0.094989942
|
||||
509,0.00487342, 0.906632179, 0.08849441
|
||||
510,0.004814165, 0.912555819, 0.082630025
|
||||
511,0.004759755, 0.917913767, 0.077326487
|
||||
512,0.004710142, 0.922768547, 0.07252132
|
||||
513,0.004665292, 0.92717411, 0.068160607
|
||||
514,0.004625163, 0.931178591, 0.064196255
|
||||
515,0.004589756, 0.934823889, 0.060586364
|
||||
516,0.004559076, 0.938146992, 0.057293941
|
||||
517,0.004533115, 0.941180584, 0.05428631
|
||||
518,0.004511878, 0.943953492, 0.05153464
|
||||
519,0.004495412, 0.9464914, 0.049013197
|
||||
520,0.004483749, 0.948816965, 0.046699295
|
||||
521,0.004476933, 0.950950467, 0.044572609
|
||||
522,0.004475011, 0.952909752, 0.042615247
|
||||
523,0.004478088, 0.954710433, 0.040811489
|
||||
524,0.004486263, 0.956366386, 0.039147361
|
||||
525,0.00449967, 0.957890048, 0.037610292
|
||||
526,0.004518465, 0.959292655, 0.036188889
|
||||
527,0.004542805, 0.960584215, 0.03487299
|
||||
528,0.00457288, 0.961773573, 0.033653556
|
||||
529,0.004608895, 0.962868623, 0.032522492
|
||||
530,0.00465109, 0.963876448, 0.031472471
|
||||
531,0.004699746, 0.96480335, 0.030496912
|
||||
532,0.004755186, 0.965655044, 0.029589778
|
||||
533,0.004817721, 0.966436842, 0.028745446
|
||||
534,0.004887673, 0.967153428, 0.027958907
|
||||
535,0.004965447, 0.967808972, 0.02722559
|
||||
536,0.005051466, 0.968407165, 0.026541377
|
||||
537,0.005146221, 0.968951191, 0.025902595
|
||||
538,0.005250261, 0.969443961, 0.025305785
|
||||
539,0.005364196, 0.969887939, 0.024747872
|
||||
540,0.005488688, 0.970285274, 0.024226044
|
||||
541,0.005624523, 0.970637837, 0.023737647
|
||||
542,0.005772524, 0.970947128, 0.023280354
|
||||
543,0.005933641, 0.971214249, 0.022852116
|
||||
544,0.006108994, 0.971440082, 0.02245093
|
||||
545,0.006299756, 0.971625195, 0.022075054
|
||||
546,0.006507247, 0.971769994, 0.021722764
|
||||
547,0.006733051, 0.971874423, 0.021392531
|
||||
548,0.006978854, 0.9719382, 0.02108295
|
||||
549,0.007246538, 0.971960799, 0.020792667
|
||||
550,0.00753827, 0.971941249, 0.020520485
|
||||
551,0.007856514, 0.971878264, 0.020265225
|
||||
552,0.008204064, 0.971770126, 0.020025813
|
||||
553,0.008583947, 0.971614816, 0.019801239
|
||||
554,0.008999675, 0.971409878, 0.019590449
|
||||
555,0.009455237, 0.971152241, 0.019392523
|
||||
556,0.009955215, 0.970838189, 0.019206597
|
||||
557,0.010504749, 0.970463452, 0.0190318
|
||||
558,0.011109803, 0.970022766, 0.018867431
|
||||
559,0.011777308, 0.969510027, 0.018712665
|
||||
560,0.012515126, 0.968918048, 0.018566825
|
||||
561,0.013332373, 0.96823842, 0.018429206
|
||||
562,0.014239681, 0.967461152, 0.018299166
|
||||
563,0.015249411, 0.966574582, 0.018176005
|
||||
564,0.016375927, 0.965564859, 0.018059211
|
||||
565,0.017636162, 0.96441567, 0.017948165
|
||||
566,0.019050053, 0.963107683, 0.017842261
|
||||
567,0.02064098, 0.961618056, 0.01774096
|
||||
568,0.022436706, 0.959919497, 0.017643792
|
||||
569,0.024470247, 0.957979541, 0.017550207
|
||||
570,0.026781156, 0.955759173, 0.017459665
|
||||
571,0.029416764, 0.953211636, 0.017371594
|
||||
572,0.032434165, 0.95028025, 0.017285579
|
||||
573,0.03590266, 0.946896161, 0.017201171
|
||||
574,0.03990671, 0.942975375, 0.017117908
|
||||
575,0.044549637, 0.938415042, 0.017035312
|
||||
576,0.049957946, 0.9330891, 0.016952945
|
||||
577,0.056288019, 0.926841641, 0.016870331
|
||||
578,0.063732852, 0.919480119, 0.01678702
|
||||
579,0.072532236, 0.910765162, 0.016702592
|
||||
580,0.08298439, 0.900398982, 0.016616618
|
||||
581,0.09546049, 0.888010848, 0.016528651
|
||||
582,0.11042104, 0.873140755, 0.016438193
|
||||
583,0.128430384, 0.855224817, 0.016344788
|
||||
584,0.150174712, 0.833577319, 0.016247957
|
||||
585,0.17646848, 0.807384293, 0.016147214
|
||||
586,0.208235667, 0.775722345, 0.016041975
|
||||
587,0.246440024, 0.737628435, 0.015931528
|
||||
588,0.291908018, 0.692276903, 0.015815065
|
||||
589,0.344984668, 0.639323614, 0.015691704
|
||||
590,0.405003302, 0.579436097, 0.015560587
|
||||
591,0.469770292, 0.51480865, 0.015421044
|
||||
592,0.535622243, 0.44910473, 0.015273012
|
||||
593,0.598446474, 0.386436255, 0.015117256
|
||||
594,0.655118405, 0.329926299, 0.014955281
|
||||
595,0.704188549, 0.281022574, 0.014788861
|
||||
596,0.745606932, 0.239773366, 0.014619686
|
||||
597,0.780098645, 0.205452132, 0.014449208
|
||||
598,0.808669226, 0.177052183, 0.014278574
|
||||
599,0.832329195, 0.153562082, 0.014108706
|
||||
600,0.85197346, 0.134086206, 0.013940317
|
||||
601,0.868355627, 0.117870335, 0.013774022
|
||||
602,0.882088371, 0.104301317, 0.013610295
|
||||
603,0.893665842, 0.092884622, 0.013449518
|
||||
604,0.903484049, 0.083223919, 0.013292015
|
||||
605,0.911858005, 0.075003924, 0.013138054
|
||||
606,0.91904131, 0.067970837, 0.012987836
|
||||
607,0.925236892, 0.061921566, 0.012841525
|
||||
608,0.930609071, 0.056691665, 0.012699247
|
||||
609,0.935290842, 0.052148021, 0.01256112
|
||||
610,0.939390513, 0.048182279, 0.012427191
|
||||
611,0.942996767, 0.044705727, 0.012297489
|
||||
612,0.946182355, 0.041645556, 0.012172072
|
||||
613,0.949008025, 0.038941093, 0.012050866
|
||||
614,0.951523919, 0.036542201, 0.011933864
|
||||
615,0.953772082, 0.034406857, 0.011821045
|
||||
616,0.955787697, 0.032499914, 0.011712372
|
||||
617,0.957600446, 0.030791764, 0.011607774
|
||||
618,0.959235683, 0.029257157, 0.011507144
|
||||
619,0.960714776, 0.02787477, 0.011410438
|
||||
620,0.962055945, 0.026626454, 0.011317586
|
||||
621,0.963275107, 0.02549641, 0.011228468
|
||||
622,0.964300437, 0.02447108, 0.011228468
|
||||
623,0.9652328, 0.023538717, 0.011228468
|
||||
624,0.966082492, 0.022689026, 0.011228468
|
||||
625,0.966858432, 0.021913087, 0.011228468
|
||||
626,0.967568415, 0.021203103, 0.011228468
|
||||
627,0.968219303, 0.020552216, 0.011228468
|
||||
628,0.968817046, 0.019954474, 0.011228468
|
||||
629,0.969366905, 0.019404615, 0.011228468
|
||||
630,0.969873478, 0.018898043, 0.011228468
|
||||
631,0.970340909, 0.018430612, 0.011228468
|
||||
632,0.970772869, 0.017998652, 0.011228468
|
||||
633,0.971172383, 0.017599138, 0.011228468
|
||||
634,0.97154218, 0.017229342, 0.011228468
|
||||
635,0.971884776, 0.016886746, 0.011228468
|
||||
636,0.972202337, 0.016569185, 0.011228468
|
||||
637,0.97249689, 0.016274633, 0.011228468
|
||||
638,0.972770257, 0.016001266, 0.011228468
|
||||
639,0.973023999, 0.015747524, 0.011228468
|
||||
640,0.973259632, 0.015511892, 0.011228468
|
||||
641,0.973478536, 0.015292988, 0.011228468
|
||||
642,0.973681941, 0.015089583, 0.011228468
|
||||
643,0.973870951, 0.014900573, 0.011228468
|
||||
644,0.974046776, 0.014724748, 0.011228468
|
||||
645,0.974210313, 0.014561212, 0.011228468
|
||||
646,0.974362517, 0.014409008, 0.011228468
|
||||
647,0.974504245, 0.014267281, 0.011228468
|
||||
648,0.974636162, 0.014135364, 0.011228468
|
||||
649,0.97475915, 0.014012377, 0.011228468
|
||||
650,0.97487371, 0.013897817, 0.011228468
|
||||
651,0.974980528, 0.013790999, 0.011228468
|
||||
652,0.975080171, 0.013691356, 0.011228468
|
||||
653,0.975173072, 0.013598455, 0.011228468
|
||||
654,0.975259696, 0.013511832, 0.011228468
|
||||
655,0.97534048, 0.013431048, 0.011228468
|
||||
656,0.975415806, 0.013355721, 0.011228468
|
||||
657,0.975486006, 0.013285522, 0.011228468
|
||||
658,0.975551437, 0.013220092, 0.011228468
|
||||
659,0.975612438, 0.01315909, 0.011228468
|
||||
660,0.975669295, 0.013102234, 0.011228468
|
||||
661,0.975722246, 0.013049283, 0.011228468
|
||||
662,0.97577158, 0.012999949, 0.011228468
|
||||
663,0.97581754, 0.012953989, 0.011228468
|
||||
664,0.97586035, 0.012911179, 0.011228468
|
||||
665,0.97590022, 0.01287131, 0.011228468
|
||||
666,0.975937277, 0.012834253, 0.011228468
|
||||
667,0.975971818, 0.012799711, 0.011228468
|
||||
668,0.976003931, 0.012767598, 0.011228468
|
||||
669,0.976033845, 0.012737685, 0.011228468
|
||||
670,0.976061665, 0.012709865, 0.011228468
|
||||
671,0.976087481, 0.01268405, 0.011228468
|
||||
672,0.976087481, 0.01268405, 0.011228468
|
||||
673,0.976087481, 0.01268405, 0.011228468
|
||||
674,0.976087481, 0.01268405, 0.011228468
|
||||
675,0.976087481, 0.01268405, 0.011228468
|
||||
676,0.976087481, 0.01268405, 0.011228468
|
||||
677,0.976087481, 0.01268405, 0.011228468
|
||||
678,0.976087481, 0.01268405, 0.011228468
|
||||
679,0.976087481, 0.01268405, 0.011228468
|
||||
680,0.976087481, 0.01268405, 0.011228468
|
||||
681,0.976087481, 0.01268405, 0.011228468
|
||||
682,0.976087481, 0.01268405, 0.011228468
|
||||
683,0.976087481, 0.01268405, 0.011228468
|
||||
684,0.976087481, 0.01268405, 0.011228468
|
||||
685,0.976087481, 0.01268405, 0.011228468
|
||||
686,0.976087481, 0.01268405, 0.011228468
|
||||
687,0.976087481, 0.01268405, 0.011228468
|
||||
688,0.976087481, 0.01268405, 0.011228468
|
||||
689,0.976087481, 0.01268405, 0.011228468
|
||||
690,0.976087481, 0.01268405, 0.011228468
|
||||
691,0.976087481, 0.01268405, 0.011228468
|
||||
692,0.976087481, 0.01268405, 0.011228468
|
||||
693,0.976087481, 0.01268405, 0.011228468
|
||||
694,0.976087481, 0.01268405, 0.011228468
|
||||
695,0.976087481, 0.01268405, 0.011228468
|
||||
696,0.976087481, 0.01268405, 0.011228468
|
||||
697,0.976087481, 0.01268405, 0.011228468
|
||||
698,0.976087481, 0.01268405, 0.011228468
|
||||
699,0.976087481, 0.01268405, 0.011228468
|
||||
700,0.976087481, 0.01268405, 0.011228468
|
||||
701,0.976087481, 0.01268405, 0.011228468
|
||||
702,0.976087481, 0.01268405, 0.011228468
|
||||
703,0.976087481, 0.01268405, 0.011228468
|
||||
704,0.976087481, 0.01268405, 0.011228468
|
||||
705,0.976087481, 0.01268405, 0.011228468
|
||||
706,0.976087481, 0.01268405, 0.011228468
|
||||
707,0.976087481, 0.01268405, 0.011228468
|
||||
708,0.976087481, 0.01268405, 0.011228468
|
||||
709,0.976087481, 0.01268405, 0.011228468
|
||||
710,0.976087481, 0.01268405, 0.011228468
|
||||
711,0.976087481, 0.01268405, 0.011228468
|
||||
712,0.976087481, 0.01268405, 0.011228468
|
||||
713,0.976087481, 0.01268405, 0.011228468
|
||||
714,0.976087481, 0.01268405, 0.011228468
|
||||
715,0.976087481, 0.01268405, 0.011228468
|
||||
716,0.976087481, 0.01268405, 0.011228468
|
||||
717,0.976087481, 0.01268405, 0.011228468
|
||||
718,0.976087481, 0.01268405, 0.011228468
|
||||
719,0.976087481, 0.01268405, 0.011228468
|
||||
720,0.976087481, 0.01268405, 0.011228468
|
||||
721,0.976087481, 0.01268405, 0.011228468
|
||||
722,0.976087481, 0.01268405, 0.011228468
|
||||
723,0.976087481, 0.01268405, 0.011228468
|
||||
724,0.976087481, 0.01268405, 0.011228468
|
||||
725,0.976087481, 0.01268405, 0.011228468
|
||||
726,0.976087481, 0.01268405, 0.011228468
|
||||
727,0.976087481, 0.01268405, 0.011228468
|
||||
728,0.976087481, 0.01268405, 0.011228468
|
||||
729,0.976087481, 0.01268405, 0.011228468
|
||||
730,0.976087481, 0.01268405, 0.011228468
|
||||
731,0.976087481, 0.01268405, 0.011228468
|
||||
732,0.976087481, 0.01268405, 0.011228468
|
||||
733,0.976087481, 0.01268405, 0.011228468
|
||||
734,0.976087481, 0.01268405, 0.011228468
|
||||
735,0.976087481, 0.01268405, 0.011228468
|
||||
736,0.976087481, 0.01268405, 0.011228468
|
||||
737,0.976087481, 0.01268405, 0.011228468
|
||||
738,0.976087481, 0.01268405, 0.011228468
|
||||
739,0.976087481, 0.01268405, 0.011228468
|
||||
740,0.976087481, 0.01268405, 0.011228468
|
||||
741,0.976087481, 0.01268405, 0.011228468
|
||||
742,0.976087481, 0.01268405, 0.011228468
|
||||
743,0.976087481, 0.01268405, 0.011228468
|
||||
744,0.976087481, 0.01268405, 0.011228468
|
||||
745,0.976087481, 0.01268405, 0.011228468
|
||||
746,0.976087481, 0.01268405, 0.011228468
|
||||
747,0.976087481, 0.01268405, 0.011228468
|
||||
748,0.976087481, 0.01268405, 0.011228468
|
||||
749,0.976087481, 0.01268405, 0.011228468
|
||||
750,0.976087481, 0.01268405, 0.011228468
|
||||
751,0.976087481, 0.01268405, 0.011228468
|
||||
752,0.976087481, 0.01268405, 0.011228468
|
||||
753,0.976087481, 0.01268405, 0.011228468
|
||||
754,0.976087481, 0.01268405, 0.011228468
|
||||
755,0.976087481, 0.01268405, 0.011228468
|
||||
756,0.976087481, 0.01268405, 0.011228468
|
||||
757,0.976087481, 0.01268405, 0.011228468
|
||||
758,0.976087481, 0.01268405, 0.011228468
|
||||
759,0.976087481, 0.01268405, 0.011228468
|
||||
760,0.976087481, 0.01268405, 0.011228468
|
||||
761,0.976087481, 0.01268405, 0.011228468
|
||||
762,0.976087481, 0.01268405, 0.011228468
|
||||
763,0.976087481, 0.01268405, 0.011228468
|
||||
764,0.976087481, 0.01268405, 0.011228468
|
||||
765,0.976087481, 0.01268405, 0.011228468
|
||||
766,0.976087481, 0.01268405, 0.011228468
|
||||
767,0.976087481, 0.01268405, 0.011228468
|
||||
768,0.976087481, 0.01268405, 0.011228468
|
||||
769,0.976087481, 0.01268405, 0.011228468
|
||||
770,0.976087481, 0.01268405, 0.011228468
|
||||
771,0.976087481, 0.01268405, 0.011228468
|
||||
772,0.976087481, 0.01268405, 0.011228468
|
||||
773,0.976087481, 0.01268405, 0.011228468
|
||||
774,0.976087481, 0.01268405, 0.011228468
|
||||
775,0.976087481, 0.01268405, 0.011228468
|
||||
776,0.976087481, 0.01268405, 0.011228468
|
||||
777,0.976087481, 0.01268405, 0.011228468
|
||||
778,0.976087481, 0.01268405, 0.011228468
|
||||
779,0.976087481, 0.01268405, 0.011228468
|
||||
780,0.976087481, 0.01268405, 0.011228468
|
||||
|
391
docs/math/data/scvle_1.csv
Normal file
391
docs/math/data/scvle_1.csv
Normal file
@@ -0,0 +1,391 @@
|
||||
390, 0.0022090000
|
||||
391, 0.0025470000
|
||||
392, 0.0029390000
|
||||
393, 0.0033940000
|
||||
394, 0.0039210000
|
||||
395, 0.0045300000
|
||||
396, 0.0052400000
|
||||
397, 0.0060500000
|
||||
398, 0.0069800000
|
||||
399, 0.0080600000
|
||||
400, 0.0092900000
|
||||
401, 0.0107000000
|
||||
402, 0.0123100000
|
||||
403, 0.0141300000
|
||||
404, 0.0161900000
|
||||
405, 0.0185200000
|
||||
406, 0.0211300000
|
||||
407, 0.0240500000
|
||||
408, 0.0273000000
|
||||
409, 0.0308900000
|
||||
410, 0.0348400000
|
||||
411, 0.0391600000
|
||||
412, 0.0439000000
|
||||
413, 0.0490000000
|
||||
414, 0.0545000000
|
||||
415, 0.0604000000
|
||||
416, 0.0668000000
|
||||
417, 0.0736000000
|
||||
418, 0.0808000000
|
||||
419, 0.0885000000
|
||||
420, 0.0966000000
|
||||
421, 0.1052000000
|
||||
422, 0.1141000000
|
||||
423, 0.1235000000
|
||||
424, 0.1334000000
|
||||
425, 0.1436000000
|
||||
426, 0.1541000000
|
||||
427, 0.1651000000
|
||||
428, 0.1764000000
|
||||
429, 0.1879000000
|
||||
430, 0.1998000000
|
||||
431, 0.2119000000
|
||||
432, 0.2243000000
|
||||
433, 0.2369000000
|
||||
434, 0.2496000000
|
||||
435, 0.2625000000
|
||||
436, 0.2755000000
|
||||
437, 0.2886000000
|
||||
438, 0.3017000000
|
||||
439, 0.3149000000
|
||||
440, 0.3281000000
|
||||
441, 0.3412000000
|
||||
442, 0.3543000000
|
||||
443, 0.3673000000
|
||||
444, 0.3803000000
|
||||
445, 0.3931000000
|
||||
446, 0.4060000000
|
||||
447, 0.4180000000
|
||||
448, 0.4310000000
|
||||
449, 0.4430000000
|
||||
450, 0.4550000000
|
||||
451, 0.4670000000
|
||||
452, 0.4790000000
|
||||
453, 0.4900000000
|
||||
454, 0.5020000000
|
||||
455, 0.5130000000
|
||||
456, 0.5240000000
|
||||
457, 0.5350000000
|
||||
458, 0.5460000000
|
||||
459, 0.5570000000
|
||||
460, 0.5670000000
|
||||
461, 0.5780000000
|
||||
462, 0.5880000000
|
||||
463, 0.5990000000
|
||||
464, 0.6100000000
|
||||
465, 0.6200000000
|
||||
466, 0.6310000000
|
||||
467, 0.6420000000
|
||||
468, 0.6530000000
|
||||
469, 0.6640000000
|
||||
470, 0.6760000000
|
||||
471, 0.6870000000
|
||||
472, 0.6990000000
|
||||
473, 0.7100000000
|
||||
474, 0.7220000000
|
||||
475, 0.7340000000
|
||||
476, 0.7450000000
|
||||
477, 0.7570000000
|
||||
478, 0.7690000000
|
||||
479, 0.7810000000
|
||||
480, 0.7930000000
|
||||
481, 0.8050000000
|
||||
482, 0.8170000000
|
||||
483, 0.8280000000
|
||||
484, 0.8400000000
|
||||
485, 0.8510000000
|
||||
486, 0.8620000000
|
||||
487, 0.8730000000
|
||||
488, 0.8840000000
|
||||
489, 0.8940000000
|
||||
490, 0.9040000000
|
||||
491, 0.9140000000
|
||||
492, 0.9230000000
|
||||
493, 0.9320000000
|
||||
494, 0.9410000000
|
||||
495, 0.9490000000
|
||||
496, 0.9570000000
|
||||
497, 0.9640000000
|
||||
498, 0.9700000000
|
||||
499, 0.9760000000
|
||||
500, 0.9820000000
|
||||
501, 0.9860000000
|
||||
502, 0.9900000000
|
||||
503, 0.9940000000
|
||||
504, 0.9970000000
|
||||
505, 0.9980000000
|
||||
506, 1.0000000000
|
||||
507, 1.0000000000
|
||||
508, 1.0000000000
|
||||
509, 0.9980000000
|
||||
510, 0.9970000000
|
||||
511, 0.9940000000
|
||||
512, 0.9900000000
|
||||
513, 0.9860000000
|
||||
514, 0.9810000000
|
||||
515, 0.9750000000
|
||||
516, 0.9680000000
|
||||
517, 0.9610000000
|
||||
518, 0.9530000000
|
||||
519, 0.9440000000
|
||||
520, 0.9350000000
|
||||
521, 0.9250000000
|
||||
522, 0.9150000000
|
||||
523, 0.9040000000
|
||||
524, 0.8920000000
|
||||
525, 0.8800000000
|
||||
526, 0.8670000000
|
||||
527, 0.8540000000
|
||||
528, 0.8400000000
|
||||
529, 0.8260000000
|
||||
530, 0.8110000000
|
||||
531, 0.7960000000
|
||||
532, 0.7810000000
|
||||
533, 0.7650000000
|
||||
534, 0.7490000000
|
||||
535, 0.7330000000
|
||||
536, 0.7170000000
|
||||
537, 0.7000000000
|
||||
538, 0.6830000000
|
||||
539, 0.6670000000
|
||||
540, 0.6500000000
|
||||
541, 0.6330000000
|
||||
542, 0.6160000000
|
||||
543, 0.5990000000
|
||||
544, 0.5810000000
|
||||
545, 0.5640000000
|
||||
546, 0.5480000000
|
||||
547, 0.5310000000
|
||||
548, 0.5140000000
|
||||
549, 0.4970000000
|
||||
550, 0.4810000000
|
||||
551, 0.4650000000
|
||||
552, 0.4480000000
|
||||
553, 0.4330000000
|
||||
554, 0.4170000000
|
||||
555, 0.4020000000
|
||||
556, 0.3864000000
|
||||
557, 0.3715000000
|
||||
558, 0.3569000000
|
||||
559, 0.3427000000
|
||||
560, 0.3288000000
|
||||
561, 0.3151000000
|
||||
562, 0.3018000000
|
||||
563, 0.2888000000
|
||||
564, 0.2762000000
|
||||
565, 0.2639000000
|
||||
566, 0.2519000000
|
||||
567, 0.2403000000
|
||||
568, 0.2291000000
|
||||
569, 0.2182000000
|
||||
570, 0.2076000000
|
||||
571, 0.1974000000
|
||||
572, 0.1876000000
|
||||
573, 0.1782000000
|
||||
574, 0.1690000000
|
||||
575, 0.1602000000
|
||||
576, 0.1517000000
|
||||
577, 0.1436000000
|
||||
578, 0.1358000000
|
||||
579, 0.1284000000
|
||||
580, 0.1212000000
|
||||
581, 0.1143000000
|
||||
582, 0.1078000000
|
||||
583, 0.1015000000
|
||||
584, 0.0956000000
|
||||
585, 0.0899000000
|
||||
586, 0.0845000000
|
||||
587, 0.0793000000
|
||||
588, 0.0745000000
|
||||
589, 0.0699000000
|
||||
590, 0.0655000000
|
||||
591, 0.0613000000
|
||||
592, 0.0574000000
|
||||
593, 0.0537000000
|
||||
594, 0.0502000000
|
||||
595, 0.0469000000
|
||||
596, 0.0438000000
|
||||
597, 0.0409000000
|
||||
598, 0.0381600000
|
||||
599, 0.0355800000
|
||||
600, 0.0331500000
|
||||
601, 0.0308700000
|
||||
602, 0.0287400000
|
||||
603, 0.0267400000
|
||||
604, 0.0248700000
|
||||
605, 0.0231200000
|
||||
606, 0.0214700000
|
||||
607, 0.0199400000
|
||||
608, 0.0185100000
|
||||
609, 0.0171800000
|
||||
610, 0.0159300000
|
||||
611, 0.0147700000
|
||||
612, 0.0136900000
|
||||
613, 0.0126900000
|
||||
614, 0.0117500000
|
||||
615, 0.0108800000
|
||||
616, 0.0100700000
|
||||
617, 0.0093200000
|
||||
618, 0.0086200000
|
||||
619, 0.0079700000
|
||||
620, 0.0073700000
|
||||
621, 0.0068200000
|
||||
622, 0.0063000000
|
||||
623, 0.0058200000
|
||||
624, 0.0053800000
|
||||
625, 0.0049700000
|
||||
626, 0.0045900000
|
||||
627, 0.0042400000
|
||||
628, 0.0039130000
|
||||
629, 0.0036130000
|
||||
630, 0.0033350000
|
||||
631, 0.0030790000
|
||||
632, 0.0028420000
|
||||
633, 0.0026230000
|
||||
634, 0.0024210000
|
||||
635, 0.0022350000
|
||||
636, 0.0020620000
|
||||
637, 0.0019030000
|
||||
638, 0.0017570000
|
||||
639, 0.0016210000
|
||||
640, 0.0014970000
|
||||
641, 0.0013820000
|
||||
642, 0.0012760000
|
||||
643, 0.0011780000
|
||||
644, 0.0010880000
|
||||
645, 0.0010050000
|
||||
646, 0.0009280000
|
||||
647, 0.0008570000
|
||||
648, 0.0007920000
|
||||
649, 0.0007320000
|
||||
650, 0.0006770000
|
||||
651, 0.0006260000
|
||||
652, 0.0005790000
|
||||
653, 0.0005360000
|
||||
654, 0.0004960000
|
||||
655, 0.0004590000
|
||||
656, 0.0004250000
|
||||
657, 0.0003935000
|
||||
658, 0.0003645000
|
||||
659, 0.0003377000
|
||||
660, 0.0003129000
|
||||
661, 0.0002901000
|
||||
662, 0.0002689000
|
||||
663, 0.0002493000
|
||||
664, 0.0002313000
|
||||
665, 0.0002146000
|
||||
666, 0.0001991000
|
||||
667, 0.0001848000
|
||||
668, 0.0001716000
|
||||
669, 0.0001593000
|
||||
670, 0.0001480000
|
||||
671, 0.0001375000
|
||||
672, 0.0001277000
|
||||
673, 0.0001187000
|
||||
674, 0.0001104000
|
||||
675, 0.0001026000
|
||||
676, 0.0000954000
|
||||
677, 0.0000888000
|
||||
678, 0.0000826000
|
||||
679, 0.0000769000
|
||||
680, 0.0000715000
|
||||
681, 0.0000666000
|
||||
682, 0.0000620000
|
||||
683, 0.0000578000
|
||||
684, 0.0000538000
|
||||
685, 0.0000501000
|
||||
686, 0.0000467000
|
||||
687, 0.0000436000
|
||||
688, 0.0000406000
|
||||
689, 0.0000378900
|
||||
690, 0.0000353300
|
||||
691, 0.0000329500
|
||||
692, 0.0000307500
|
||||
693, 0.0000287000
|
||||
694, 0.0000267900
|
||||
695, 0.0000250100
|
||||
696, 0.0000233600
|
||||
697, 0.0000218200
|
||||
698, 0.0000203800
|
||||
699, 0.0000190500
|
||||
700, 0.0000178000
|
||||
701, 0.0000166400
|
||||
702, 0.0000155600
|
||||
703, 0.0000145400
|
||||
704, 0.0000136000
|
||||
705, 0.0000127300
|
||||
706, 0.0000119100
|
||||
707, 0.0000111400
|
||||
708, 0.0000104300
|
||||
709, 0.0000097600
|
||||
710, 0.0000091400
|
||||
711, 0.0000085600
|
||||
712, 0.0000080200
|
||||
713, 0.0000075100
|
||||
714, 0.0000070400
|
||||
715, 0.0000066000
|
||||
716, 0.0000061800
|
||||
717, 0.0000058000
|
||||
718, 0.0000054400
|
||||
719, 0.0000051000
|
||||
720, 0.0000047800
|
||||
721, 0.0000044900
|
||||
722, 0.0000042100
|
||||
723, 0.0000039510
|
||||
724, 0.0000037090
|
||||
725, 0.0000034820
|
||||
726, 0.0000032700
|
||||
727, 0.0000030700
|
||||
728, 0.0000028840
|
||||
729, 0.0000027100
|
||||
730, 0.0000025460
|
||||
731, 0.0000023930
|
||||
732, 0.0000022500
|
||||
733, 0.0000021150
|
||||
734, 0.0000019890
|
||||
735, 0.0000018700
|
||||
736, 0.0000017590
|
||||
737, 0.0000016550
|
||||
738, 0.0000015570
|
||||
739, 0.0000014660
|
||||
740, 0.0000013790
|
||||
741, 0.0000012990
|
||||
742, 0.0000012230
|
||||
743, 0.0000011510
|
||||
744, 0.0000010840
|
||||
745, 0.0000010220
|
||||
746, 0.0000009620
|
||||
747, 0.0000009070
|
||||
748, 0.0000008550
|
||||
749, 0.0000008060
|
||||
750, 0.0000007600
|
||||
751, 0.0000007160
|
||||
752, 0.0000006750
|
||||
753, 0.0000006370
|
||||
754, 0.0000006010
|
||||
755, 0.0000005670
|
||||
756, 0.0000005350
|
||||
757, 0.0000005050
|
||||
758, 0.0000004770
|
||||
759, 0.0000004500
|
||||
760, 0.0000004250
|
||||
761, 0.0000004010
|
||||
762, 0.0000003790
|
||||
763, 0.0000003580
|
||||
764, 0.0000003382
|
||||
765, 0.0000003196
|
||||
766, 0.0000003021
|
||||
767, 0.0000002855
|
||||
768, 0.0000002699
|
||||
769, 0.0000002552
|
||||
770, 0.0000002413
|
||||
771, 0.0000002282
|
||||
772, 0.0000002159
|
||||
773, 0.0000002042
|
||||
774, 0.0000001932
|
||||
775, 0.0000001829
|
||||
776, 0.0000001731
|
||||
777, 0.0000001638
|
||||
778, 0.0000001551
|
||||
779, 0.0000001468
|
||||
780, 0.0000001390
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user