Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
9c5cee92
Commit
9c5cee92
authored
3 years ago
by
Lars Hoerttrich
Browse files
Options
Downloads
Patches
Plain Diff
[
#92
] added shader compilation, currently commented due to errors
parent
d87a1284
No related branches found
No related tags found
1 merge request
!75
Resolve "RTX-Module"
Pipeline
#27070
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/vkcv/ShaderStage.hpp
+6
-6
6 additions, 6 deletions
include/vkcv/ShaderStage.hpp
projects/rtx/src/main.cpp
+29
-3
29 additions, 3 deletions
projects/rtx/src/main.cpp
with
35 additions
and
9 deletions
include/vkcv/ShaderStage.hpp
+
6
−
6
View file @
9c5cee92
...
...
@@ -13,12 +13,12 @@ namespace vkcv {
COMPUTE
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eCompute
),
TASK
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eTaskNV
),
MESH
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eMeshNV
),
RAYGEN
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eRaygenKHR
),
ANY_HIT
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eAnyHitKHR
),
CLOSEST_HIT
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eClosestHitKHR
),
MISS
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eMissKHR
),
INTERSECTION
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eIntersectionKHR
),
CALLABLE
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eCallableKHR
)
RAY
_
GEN
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eRaygenKHR
),
RAY_
ANY_HIT
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eAnyHitKHR
),
RAY_
CLOSEST_HIT
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eClosestHitKHR
),
RAY_
MISS
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eMissKHR
),
RAY_
INTERSECTION
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eIntersectionKHR
),
RAY_
CALLABLE
=
static_cast
<
VkShaderStageFlags
>
(
vk
::
ShaderStageFlagBits
::
eCallableKHR
)
};
using
ShaderStages
=
vk
::
Flags
<
ShaderStage
>
;
...
...
This diff is collapsed.
Click to expand it.
projects/rtx/src/main.cpp
+
29
−
3
View file @
9c5cee92
...
...
@@ -123,9 +123,35 @@ int main(int argc, const char** argv) {
const
auto
&
material0
=
scene
.
getMaterial
(
0
);
// TODO
// vkcv::DescriptorSetLayoutHandle vertexShaderDescriptorSetLayout = core.createDescriptorSetLayout(bunnyShaderProgram.getReflectedDescriptors().at(0));
// vkcv::DescriptorSetHandle vertexShaderDescriptorSet = core.createDescriptorSet(vertexShaderDescriptorSetLayout);
/*
vkcv::ShaderProgram rayGenShaderProgram;
compiler.compile(vkcv::ShaderStage::RAY_GEN, std::filesystem::path("resources/shaders/raytrace.rgen"),
[&rayGenShaderProgram](vkcv::ShaderStage shaderStage, const std::filesystem::path& path) {
rayGenShaderProgram.addShader(shaderStage, path);
});
vkcv::ShaderProgram rayClosestHitShaderProgram;
compiler.compile(vkcv::ShaderStage::RAY_CLOSEST_HIT, std::filesystem::path("resources/shaders/raytrace.rchit"),
[&rayClosestHitShaderProgram](vkcv::ShaderStage shaderStage, const std::filesystem::path& path) {
rayClosestHitShaderProgram.addShader(shaderStage, path);
});
vkcv::ShaderProgram rayMissShaderProgram;
compiler.compile(vkcv::ShaderStage::RAY_MISS, std::filesystem::path("resources/shaders/raytrace.rmiss"),
[&rayMissShaderProgram](vkcv::ShaderStage shaderStage, const std::filesystem::path& path) {
rayMissShaderProgram.addShader(shaderStage, path);
});
*/
//TODO
// vkcv::DescriptorSetLayoutHandle rayGenShaderDescriptorSetLayout = core.createDescriptorSetLayout(rayGenShaderProgram.getReflectedDescriptors().at(0));
// vkcv::DescriptorSetHandle rayGenShaderDescriptorSet = core.createDescriptorSet(rayGenShaderDescriptorSetLayout);
// vkcv::DescriptorSetLayoutHandle rayClosestHitShaderDescriptorSetLayout = core.createDescriptorSetLayout(rayClosestHitShaderProgram.getReflectedDescriptors().at(0));
// vkcv::DescriptorSetHandle rayGenShaderDescriptorSet = core.createDescriptorSet(rayClosestHitShaderDescriptorSetLayout);
// vkcv::DescriptorSetLayoutHandle rayMissShaderDescriptorSetLayout = core.createDescriptorSetLayout(rayMissShaderProgram.getReflectedDescriptors().at(0));
// vkcv::DescriptorSetHandle rayGenShaderDescriptorSet = core.createDescriptorSet(rayMissShaderDescriptorSetLayout);
const
vkcv
::
PipelineConfig
scenePipelineDefinition
{
sceneShaderProgram
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment