Skip to content

Commit 0a92d23

Browse files
committed
Added fragment_shader_barycentric.hlsl
1 parent 9caf185 commit 0a92d23

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Copyright (C) 2023 - DevSH Graphics Programming Sp. z O.O.
2+
// This file is part of the "Nabla Engine".
3+
// For conditions of distribution and use, see copyright notice in nabla.h
4+
#ifndef _NBL_BUILTIN_HLSL_SPIRV_INTRINSICS_FRAGMENT_SHADER_BARYCENTRIC_INCLUDED_
5+
#define _NBL_BUILTIN_HLSL_SPIRV_INTRINSICS_FRAGMENT_SHADER_BARYCENTRIC_INCLUDED_
6+
7+
#include "spirv/unified1/spirv.hpp"
8+
9+
namespace nbl
10+
{
11+
namespace hlsl
12+
{
13+
namespace spirv
14+
{
15+
16+
[[vk::ext_capability(/*spv::CapabilityFragmentBarycentricKHR*/5284)]]
17+
[[vk::ext_extension("SPV_KHR_fragment_shader_barycentric")]]
18+
[[vk::ext_builtin_input(/*spv::BuiltInBaryCoordKHR*/5286)]]
19+
static const float32_t3 BaryCoordKHR;
20+
21+
[[vk::ext_capability(/*spv::CapabilityFragmentBarycentricKHR*/5284)]]
22+
[[vk::ext_extension("SPV_KHR_fragment_shader_barycentric")]]
23+
[[vk::ext_builtin_input(/*spv::BuiltInBaryCoordKHR*/5287)]]
24+
static const float32_t3 BaryCoordNoPerspKHR;
25+
26+
}
27+
}
28+
}
29+
30+
#endif

src/nbl/builtin/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/matrix_utils/matrix_traits.hl
230230
#spirv intrinsics
231231
LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/spirv_intrinsics/core.hlsl")
232232
LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/spirv_intrinsics/fragment_shader_pixel_interlock.hlsl")
233+
LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/spirv_intrinsics/fragment_shader_barycentric.hlsl")
233234
LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/spirv_intrinsics/raytracing.hlsl")
234235
LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/spirv_intrinsics/subgroup_arithmetic.hlsl")
235236
LIST_BUILTIN_RESOURCE(NBL_RESOURCES_TO_EMBED "hlsl/spirv_intrinsics/subgroup_ballot.hlsl")

0 commit comments

Comments
 (0)