File tree Expand file tree Collapse file tree 3 files changed +12
-17
lines changed
include/nbl/builtin/hlsl/ext/FullScreenTriangle Expand file tree Collapse file tree 3 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ namespace FullScreenTriangle
15
15
16
16
struct VertexAttributes
17
17
{
18
- [[vk::location (0 )]] float32_t2 uv;
18
+ [[vk::location (0 )]] float32_t2 uv : TEXCOORD0 ;
19
19
};
20
20
21
21
}
Original file line number Diff line number Diff line change 1
1
// Copyright (C) 2018-2024 - DevSH Graphics Programming Sp. z O.O.
2
2
// This file is part of the "Nabla Engine".
3
3
// For conditions of distribution and use, see copyright notice in nabla.h
4
+ #include <nbl/builtin/hlsl/glsl_compat/core.hlsl>
4
5
#include <nbl/builtin/hlsl/ext/FullScreenTriangle/SVertexAttributes.hlsl>
5
6
//#include <nbl/builtin/glsl/utils/surface_transform.glsl>
6
7
7
- namespace nbl
8
- {
9
- namespace hlsl
10
- {
11
- namespace ext
12
- {
13
- namespace FullScreenTriangle
14
- {
8
+ using namespace ::nbl::hlsl;
9
+ using namespace ::nbl::hlsl::ext::FullScreenTriangle;
15
10
16
11
const static float32_t2 pos[3 ] = {
17
12
float32_t2 (-1.0 ,-1.0 ),
@@ -33,16 +28,11 @@ layout (push_constant) uniform pushConstants
33
28
34
29
VertexAttributes main ()
35
30
{
36
- using namespace nbl::hlsl::glsl;
31
+ using namespace :: nbl::hlsl::glsl;
37
32
38
33
VertexAttributes retval;
39
- // vec2 pos = nbl_glsl_surface_transform_applyToNDC(u_pushConstants.swapchainTransform, pos[gl_VertexIndex]);
40
- spirv::Position = vec4 (pos[gl_VertexIndex ()], 0.f , 1.f );
34
+ // vec2 pos = nbl_glsl_surface_transform_applyToNDC(u_pushConstants.swapchainTransform, pos[gl_VertexIndex]);
35
+ spirv::Position = float32_t4 (pos[gl_VertexIndex ()], 0.f , 1.f );
41
36
retval.uv = tc[gl_VertexIndex ()];
42
37
return retval;
43
- }
44
-
45
- }
46
- }
47
- }
48
38
}
Original file line number Diff line number Diff line change @@ -396,6 +396,11 @@ core::smart_refctd_ptr<ICPUShader> CHLSLCompiler::compileToSPIRV(const char* cod
396
396
arguments = {};
397
397
for (size_t i = 0 ; i < RequiredArgumentCount; i++)
398
398
arguments.push_back (RequiredArguments[i]);
399
+ arguments.push_back (L" -HV" );
400
+ arguments.push_back (L" 202x" );
401
+ // TODO: add this to `CHLSLCompiler::SOptions` and handle it properly in `dxc_compile_flags.empty()`
402
+ arguments.push_back (L" -E" );
403
+ arguments.push_back (L" main" );
399
404
// If a custom SPIR-V optimizer is specified, use that instead of DXC's spirv-opt.
400
405
// This is how we can get more optimizer options.
401
406
//
You can’t perform that action at this time.
0 commit comments