Skip to content

Commit 96887d8

Browse files
Add Mobile NeRF Ray Query Sample (#1134)
* Add Mobile NeRF Ray Query sample initial files Signed-off-by: Rodrigo Holztrattner <[email protected]> * Quick fixes Signed-off-by: Rodrigo Holztrattner <[email protected]> * Add missing device properties 2 extension Signed-off-by: Rodrigo Holztrattner <[email protected]> * Minor README fix (remove repeated word) Signed-off-by: Rodrigo Holztrattner <[email protected]> * Fix for pending shader and cast issues Signed-off-by: Rodrigo Holztrattner <[email protected]> * Address camera movement and a few minor issues Signed-off-by: Rodrigo Holztrattner <[email protected]> * Update GPU feature request logic and minor change at readme file (Adreno -> mobile devices that support ray queries) * Fix for missing shader uniform buffer array non uniform indexing Signed-off-by: Rodrigo Holztrattner <[email protected]> * Remove unused variable Signed-off-by: Rodrigo Holztrattner <[email protected]> * Change default model to USE_OPAQUE Signed-off-by: Rodrigo Holztrattner <[email protected]> --------- Signed-off-by: Rodrigo Holztrattner <[email protected]>
1 parent 58ba96a commit 96887d8

File tree

9 files changed

+2223
-1
lines changed

9 files changed

+2223
-1
lines changed

antora/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
** xref:samples/tooling/profiles/README.adoc[Profiles]
120120
* xref:samples/general/README.adoc[General samples]
121121
** xref:samples/general/mobile_nerf/README.adoc[Mobile NeRF]
122+
** xref:samples/general/mobile_nerf_rayquery/README.adoc[Mobile NeRF Ray Query]
122123
* xref:docs/README.adoc[General documentation]
123124
** xref:docs/build.adoc[Build guide]
124125
** xref:docs/memory_limits.adoc[Memory limits]

samples/general/README.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ The goal of these samples is to demonstrate different techniques or showcase com
2424

2525
=== xref:./{general_samplespath}mobile_nerf/README.adoc[Mobile NeRF]
2626

27-
A Neural Radiance Field synthesizer sample, based on textured polygons.
27+
A Neural Radiance Field synthesizer sample, based on textured polygons.
28+
29+
=== xref:./{general_samplespath}mobile_nerf_rayquery/README.adoc[Mobile NeRF Ray Query]
30+
31+
A Mobile Neural Radiance Field synthesizer sample using ray query, based on textured polygons.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 the "License";
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
get_filename_component(FOLDER_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
19+
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_LIST_DIR} PATH)
20+
get_filename_component(CATEGORY_NAME ${PARENT_DIR} NAME)
21+
22+
add_sample_with_tags(
23+
ID ${FOLDER_NAME}
24+
CATEGORY ${CATEGORY_NAME}
25+
AUTHOR "Qualcomm"
26+
NAME "Mobile NeRF Ray Query"
27+
DESCRIPTION "A Mobile Neural Radiance Field synthesizer sample using ray query, based on textured polygons."
28+
SHADER_FILES_GLSL
29+
"mobile_nerf_rayquery/quad.vert"
30+
"mobile_nerf_rayquery/rayquery_morpheus_combo.frag"
31+
"mobile_nerf_rayquery/rayquery_morpheus.frag")
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
////
2+
- Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved
3+
-
4+
- SPDX-License-Identifier: Apache-2.0
5+
-
6+
- Licensed under the Apache License, Version 2.0 the "License";
7+
- you may not use this file except in compliance with the License.
8+
- You may obtain a copy of the License at
9+
-
10+
- http://www.apache.org/licenses/LICENSE-2.0
11+
-
12+
- Unless required by applicable law or agreed to in writing, software
13+
- distributed under the License is distributed on an "AS IS" BASIS,
14+
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
- See the License for the specific language governing permissions and
16+
- limitations under the License.
17+
-
18+
////
19+
20+
= Mobile NeRF Ray Query
21+
22+
ifdef::site-gen-antora[]
23+
TIP: The source for this sample can be found in the https://github.com/KhronosGroup/Vulkan-Samples/tree/main/samples/general/mobile_nerf_rayquery[Khronos Vulkan samples github repository].
24+
endif::[]
25+
26+
NeRF is a new 3D representation method in Computer Vision that creates images of a 3D scene using several 2D pictures taken from different viewpoints.
27+
This method constructs a representation of the 3D volume. Various adaptations of NeRF target different use cases, including MobileNeRF, which focuses on rendering NeRF efficiently on mobile phones by leveraging existing traditional graphic hardware.
28+
29+
This version enhances the https://github.com/KhronosGroup/Vulkan-Samples/tree/main/samples/general/mobile_nerf[previous MobileNeRF implementation] by using the Vulkan Ray Query feature, which leverages the hardware ray tracing capabilities of mobile GPUs that support it.
30+
This enhancement greatly boosts performance in most use cases. Additionally, the Vulkan API provides great flexibility for modifying and optimizing the rendering pipeline and shaders, enabling more functionalities while delivering optimal performance.
31+
32+
== Notes
33+
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.

0 commit comments

Comments
 (0)