Renamed compute shader ray tracing example

This commit is contained in:
Sascha Willems 2019-05-11 12:41:46 +02:00
parent 4326ce390d
commit b2add91d2c
15 changed files with 11 additions and 11 deletions

View file

@ -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.

View file

@ -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)

View file

@ -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 '*.*'
}

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.saschawillems.vulkanRaytracing">
package="de.saschawillems.vulkanComputeRaytracing">
<application
android:label="Vulkan compute raytracing"

View file

@ -4,6 +4,7 @@ include 'examples/:computecullandlod'
include 'examples/:computeheadless'
include 'examples/:computenbody'
include 'examples/:computeparticles'
include 'examples/:computeraytracing'
include 'examples/:computeshader'
include 'examples/:conservativeraster'
include 'examples/:debugmarker'
@ -39,7 +40,6 @@ include 'examples/:pipelinestatistics'
include 'examples/:pushconstants'
include 'examples/:pushdescriptors'
include 'examples/:radialblur'
include 'examples/:raytracing'
include 'examples/:renderheadless'
include 'examples/:scenerendering'
include 'examples/:screenshot'

View file

@ -50,6 +50,7 @@ set(EXAMPLES
computeheadless
computenbody
computeparticles
computeraytracing
computeshader
conditionalrender
conservativeraster
@ -89,7 +90,6 @@ set(EXAMPLES
pushconstants
pushdescriptors
radialblur
raytracing
renderheadless
scenerendering
screenshot

View file

@ -507,8 +507,8 @@ public:
// Display pipeline
std::array<VkPipelineShaderStageCreateInfo,2> 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