diff --git a/README.md b/README.md index 3760f440..ef7f2837 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ Attraction based 2D GPU particle system using compute shaders. Particle data is N-body simulation based particle system with multiple attractors and particle-to-particle interaction using two passes separating particle movement calculation and final integration. Shared compute shader memory is used to speed up compute calculations. -#### [04 - Ray tracing](examples/raytracing/) +#### [04 - Ray tracing](examples/computeraytracing/) Simple GPU ray tracer with shadows and reflections using a compute shader. No scene geometry is rendered in the graphics pass. diff --git a/android/examples/raytracing/CMakeLists.txt b/android/examples/computeraytracing/CMakeLists.txt similarity index 97% rename from android/examples/raytracing/CMakeLists.txt rename to android/examples/computeraytracing/CMakeLists.txt index 49af10e2..571f56e4 100644 --- a/android/examples/raytracing/CMakeLists.txt +++ b/android/examples/computeraytracing/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) -set(NAME raytracing) +set(NAME computeraytracing) set(SRC_DIR ../../../examples/${NAME}) set(BASE_DIR ../../../base) diff --git a/android/examples/raytracing/build.gradle b/android/examples/computeraytracing/build.gradle similarity index 87% rename from android/examples/raytracing/build.gradle rename to android/examples/computeraytracing/build.gradle index 9289e4b6..01814b12 100644 --- a/android/examples/raytracing/build.gradle +++ b/android/examples/computeraytracing/build.gradle @@ -4,7 +4,7 @@ apply from: '../gradle/outputfilename.gradle' android { compileSdkVersion 26 defaultConfig { - applicationId "de.saschawillems.vulkanRaytracing" + applicationId "de.saschawillems.vulkanComputeRaytracing" minSdkVersion 19 targetSdkVersion 26 versionCode 1 @@ -49,8 +49,8 @@ task copyTask << { } copy { - from '../../../data/shaders/raytracing' - into 'assets/shaders/raytracing' + from '../../../data/shaders/computeraytracing' + into 'assets/shaders/computeraytracing' include '*.*' } diff --git a/android/examples/raytracing/src/main/AndroidManifest.xml b/android/examples/computeraytracing/src/main/AndroidManifest.xml similarity index 94% rename from android/examples/raytracing/src/main/AndroidManifest.xml rename to android/examples/computeraytracing/src/main/AndroidManifest.xml index 710c4237..c7c94398 100644 --- a/android/examples/raytracing/src/main/AndroidManifest.xml +++ b/android/examples/computeraytracing/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="de.saschawillems.vulkanComputeRaytracing"> shaderStages; - shaderStages[0] = loadShader(getAssetPath() + "shaders/raytracing/texture.vert.spv", VK_SHADER_STAGE_VERTEX_BIT); - shaderStages[1] = loadShader(getAssetPath() + "shaders/raytracing/texture.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT); + shaderStages[0] = loadShader(getAssetPath() + "shaders/computeraytracing/texture.vert.spv", VK_SHADER_STAGE_VERTEX_BIT); + shaderStages[1] = loadShader(getAssetPath() + "shaders/computeraytracing/texture.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT); VkGraphicsPipelineCreateInfo pipelineCreateInfo = vks::initializers::pipelineCreateInfo( @@ -633,7 +633,7 @@ public: compute.pipelineLayout, 0); - computePipelineCreateInfo.stage = loadShader(getAssetPath() + "shaders/raytracing/raytracing.comp.spv", VK_SHADER_STAGE_COMPUTE_BIT); + computePipelineCreateInfo.stage = loadShader(getAssetPath() + "shaders/computeraytracing/raytracing.comp.spv", VK_SHADER_STAGE_COMPUTE_BIT); VK_CHECK_RESULT(vkCreateComputePipelines(device, pipelineCache, 1, &computePipelineCreateInfo, nullptr, &compute.pipeline)); // Separate command pool as queue family for compute may be different than graphics