In this codelab, you'll learn how to use the GPU spatial upscaling API and AI spatial upscaling API of XEngine Kit to perform texture upscaling and use adaptive VRS API to change the shading rate. The sample code takes drawing the scenes of Sponza Palace as an example, and calls NAPI using XComponent to build up the EGL/OpenGL ES environment. The demo project is created based on the Native C++ template.
You can tap the drop-down list box to switch between upscaling modes and tap the check box to enable or disable adaptative VRS. The following figure shows the Sponza Palace scene drawn using XComponent.
├── entry/src/main // Code area
│ ├── cpp
│ │ ├── types
│ │ │ ├── libnativerender
└── index.d.ts // API registration file at the native layer
│ │ │── napi_init.cpp // Functions of APIs at the native layer
│ │ │── CMakeLists.txt // Compilation configurations at the native layer
│ │ │── 3rdParty // Third-party component
│ │ │── common // Common APIs
│ │ │── model // Model
│ │ │── file // File management
│ │ │── libs // Third-party dynamic libraries
│ │ │── manager // native & ArkTS interactions
│ │ │── render // Rendering
│ │ │── shader // Render shader
│ ├── ets
│ │ ├── entryability
└── EntryAbility.ts // Entry class
│ │ ├── pages
└── index.ets // Home screen display class
│ ├── resources // Directory of resource files
│ │ ├── base
│ │ │ ├── media
└── icon.png // Image resources
│ │ ├── rawfile/model/Sponza
└── sponza.obj // Model resources
The sample code uses the following APIs defined in XEngine Kit:
N/A
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。