Renamed particle fire sample
This commit is contained in:
parent
384b2031a2
commit
9dcc8110cf
25 changed files with 15 additions and 15 deletions
|
|
@ -152,7 +152,7 @@ Advanced example that uses sub passes and input attachments to write and read ba
|
|||
|
||||
Basic offscreen rendering in two passes. First pass renders the mirrored scene to a separate framebuffer with color and depth attachments, second pass samples from that color attachment for rendering a mirror surface.
|
||||
|
||||
#### [CPU particle system](examples/particlefire/)
|
||||
#### [CPU particle system](examples/particlesystem/)
|
||||
|
||||
Implements a simple CPU based particle system. Particle data is stored in host memory, updated on the CPU per-frame and synchronized with the device before it's rendered using pre-multiplied alpha.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR)
|
||||
|
||||
set(NAME particlefire)
|
||||
set(NAME particlesystem)
|
||||
|
||||
set(SRC_DIR ../../../examples/${NAME})
|
||||
set(BASE_DIR ../../../base)
|
||||
|
|
@ -4,7 +4,7 @@ apply from: '../gradle/outputfilename.gradle'
|
|||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
defaultConfig {
|
||||
applicationId "de.saschawillems.vulkanParticlefire"
|
||||
applicationId "de.saschawillems.vulkanParticlesystem"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
|
|
@ -49,8 +49,8 @@ task copyTask {
|
|||
}
|
||||
|
||||
copy {
|
||||
from rootProject.ext.shaderPath + 'glsl/particlefire'
|
||||
into 'assets/shaders/glsl/particlefire'
|
||||
from rootProject.ext.shaderPath + 'glsl/particlesystem'
|
||||
into 'assets/shaders/glsl/particlesystem'
|
||||
include '*.*'
|
||||
}
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.saschawillems.vulkanParticlefire">
|
||||
package="de.saschawillems.vulkanParticlesystem">
|
||||
|
||||
<application
|
||||
android:label="Vulkan CPU particles"
|
||||
|
|
@ -121,7 +121,7 @@ set(EXAMPLES
|
|||
offscreen
|
||||
oit
|
||||
parallaxmapping
|
||||
particlefire
|
||||
particlesystem
|
||||
pbrbasic
|
||||
pbribl
|
||||
pbrtexture
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Vulkan Example - CPU based fire particle system
|
||||
* Vulkan Example - CPU based particle system
|
||||
*
|
||||
* Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
|
||||
*
|
||||
|
|
@ -478,8 +478,8 @@ public:
|
|||
blendAttachmentState.alphaBlendOp = VK_BLEND_OP_ADD;
|
||||
blendAttachmentState.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
|
||||
|
||||
shaderStages[0] = loadShader(getShadersPath() + "particlefire/particle.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
|
||||
shaderStages[1] = loadShader(getShadersPath() + "particlefire/particle.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
shaderStages[0] = loadShader(getShadersPath() + "particlesystem/particle.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
|
||||
shaderStages[1] = loadShader(getShadersPath() + "particlesystem/particle.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.particles));
|
||||
}
|
||||
|
||||
|
|
@ -492,8 +492,8 @@ public:
|
|||
depthStencilState.depthWriteEnable = VK_TRUE;
|
||||
inputAssemblyState.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||
|
||||
shaderStages[0] = loadShader(getShadersPath() + "particlefire/normalmap.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
|
||||
shaderStages[1] = loadShader(getShadersPath() + "particlefire/normalmap.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
shaderStages[0] = loadShader(getShadersPath() + "particlesystem/normalmap.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
|
||||
shaderStages[1] = loadShader(getShadersPath() + "particlesystem/normalmap.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.environment));
|
||||
}
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ These can be compiled with [DXC](https://github.com/microsoft/DirectXShaderCompi
|
|||
### Known issues
|
||||
|
||||
- specialization constants can't be used to specify array size.
|
||||
- `gl_PointCoord` not supported. HLSL has no equivalent. We changed the shaders to calulate the PointCoord manually in the shader. (`computenbody`, `computeparticles`, `particlefire` examples).
|
||||
- `gl_PointCoord` not supported. HLSL has no equivalent. We changed the shaders to calulate the PointCoord manually in the shader. (`computenbody`, `computeparticles`, `particlesystem` examples).
|
||||
- HLSL doesn't have inverse operation (`deferred`, `hdr`, `instancing`, `skeletalanimation` & `texturecubemap` examples).
|
||||
- `modf` causes compilation to fail without errors or warnings. (`modf` not used by any examples, easily confused with fmod)
|
||||
- In `specializationconstants` example, shader compilation fails with error:
|
||||
|
|
|
|||
|
|
@ -110,8 +110,8 @@
|
|||
# include "../examples/textoverlay/textoverlay.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_particlefire
|
||||
# include "../examples/particlefire/particlefire.cpp"
|
||||
#ifdef MVK_particlesystem
|
||||
# include "../examples/particlesystem/particlesystem.cpp"
|
||||
#endif
|
||||
|
||||
// No headless target when using xcode examples project, builds/runs fine using vulkanExamples project.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue