forked from KhronosGroup/Vulkan-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Mobile NeRF sample (KhronosGroup#849)
* Add sample files and updated documentation Signed-off-by: Rodrigo Holztrattner <[email protected]> * Add missing copyright for raster_mortpheus shader Signed-off-by: Rodrigo Holztrattner <[email protected]> * Rename sample to just NeRF and address camera issues * Fix shader copyrights and file formatting * Add entry at the samples readme * Update antora --------- Signed-off-by: Rodrigo Holztrattner <[email protected]>
- Loading branch information
1 parent
6b715cc
commit 2be6f82
Showing
16 changed files
with
3,226 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 the "License"; | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
get_filename_component(FOLDER_NAME ${CMAKE_CURRENT_LIST_DIR} NAME) | ||
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_LIST_DIR} PATH) | ||
get_filename_component(CATEGORY_NAME ${PARENT_DIR} NAME) | ||
|
||
add_sample_with_tags( | ||
ID ${FOLDER_NAME} | ||
CATEGORY ${CATEGORY_NAME} | ||
AUTHOR "Qualcomm" | ||
NAME "NeRF" | ||
DESCRIPTION "A Neural Radiance Field synthesizer sample, based on textured polygons" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//// | ||
- Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved | ||
- | ||
- SPDX-License-Identifier: Apache-2.0 | ||
- | ||
- Licensed under the Apache License, Version 2.0 the "License"; | ||
- you may not use this file except in compliance with the License. | ||
- You may obtain a copy of the License at | ||
- | ||
- http://www.apache.org/licenses/LICENSE-2.0 | ||
- | ||
- Unless required by applicable law or agreed to in writing, software | ||
- distributed under the License is distributed on an "AS IS" BASIS, | ||
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
- See the License for the specific language governing permissions and | ||
- limitations under the License. | ||
- | ||
//// | ||
= NeRF | ||
|
||
ifdef::site-gen-antora[] | ||
TIP: The source for this sample can be found in the https://github.com/KhronosGroup/Vulkan-Samples/tree/main/samples/general/nerf[Khronos Vulkan samples github repository]. | ||
endif::[] | ||
|
||
This sample is a modified version of the https://mobile-nerf.github.io/[Mobile Nerf] developed by Google. | ||
It's based on its original https://github.com/google-research/jax3d/tree/main/jax3d/projects/mobilenerf[source code] but optimized for Vulkan. | ||
|
||
== Description: [https://mobile-nerf.github.io/[Mobile Nerf]] | ||
Neural Radiance Fields (NeRFs) have demonstrated amazing ability to synthesize images of 3D scenes from novel views. | ||
However, they rely upon specialized volumetric rendering algorithms based on ray marching that are mismatched to the capabilities of widely deployed graphics hardware. | ||
This paper introduces a new NeRF representation based on textured polygons that can synthesize novel images efficiently with standard rendering pipelines. | ||
The NeRF is represented as a set of polygons with textures representing binary opacities and feature vectors. | ||
Traditional rendering of the polygons with a z-buffer yields an image with features at every pixel, which are interpreted by a small, view-dependent MLP running in a fragment shader to produce a final pixel color. | ||
This approach enables NeRFs to be rendered with the traditional polygon rasterization pipeline, which provides massive pixel-level parallelism, achieving interactive frame rates on a wide range of compute platforms, including mobile phones. | ||
|
||
== Notes | ||
The original source code is also licensed under Apache-2.0, all shader files used by the sample have comments to indicate changes, when applicable. |
Oops, something went wrong.