diff --git a/03_DeviceSelectionAndSharedSources/Testers.h b/03_DeviceSelectionAndSharedSources/Testers.h index f957e50a0..fcd5c5ee4 100644 --- a/03_DeviceSelectionAndSharedSources/Testers.h +++ b/03_DeviceSelectionAndSharedSources/Testers.h @@ -56,7 +56,7 @@ class IntrospectionTesterBase // if the extension is generic (.glsl or .hlsl) the stage is unknown. // But it can still be overriden from within the source with a `#pragma shader_stage` options.stage = shaderStage == IShader::E_SHADER_STAGE::ESS_COMPUTE ? shaderStage : IShader::E_SHADER_STAGE::ESS_VERTEX; // TODO: do smth with it - options.targetSpirvVersion = device->getPhysicalDevice()->getLimits().spirvVersion; + options.preprocessorOptions.targetSpirvVersion = device->getPhysicalDevice()->getLimits().spirvVersion; // we need to perform an unoptimized compilation with source debug info or we'll lose names of variable sin the introspection options.spirvOptimizer = nullptr; options.debugInfoFlags |= IShaderCompiler::E_DEBUG_INFO_FLAGS::EDIF_SOURCE_BIT; diff --git a/03_DeviceSelectionAndSharedSources/main.cpp b/03_DeviceSelectionAndSharedSources/main.cpp index c09228ce5..b8fd3d18b 100644 --- a/03_DeviceSelectionAndSharedSources/main.cpp +++ b/03_DeviceSelectionAndSharedSources/main.cpp @@ -275,7 +275,7 @@ class DeviceSelectionAndSharedSourcesApp final : public application_templates::M // if the extension is generic (.glsl or .hlsl) the stage is unknown. // But it can still be overriden from within the source with a `#pragma shader_stage` options.stage = shaderStage == IShader::E_SHADER_STAGE::ESS_COMPUTE ? shaderStage : IShader::E_SHADER_STAGE::ESS_VERTEX; // TODO: do smth with it - options.targetSpirvVersion = m_device->getPhysicalDevice()->getLimits().spirvVersion; + options.preprocessorOptions.targetSpirvVersion = m_device->getPhysicalDevice()->getLimits().spirvVersion; // we need to perform an unoptimized compilation with source debug info or we'll lose names of variable sin the introspection options.spirvOptimizer = nullptr; options.debugInfoFlags |= IShaderCompiler::E_DEBUG_INFO_FLAGS::EDIF_SOURCE_BIT; diff --git a/23_Arithmetic2UnitTest/main.cpp b/23_Arithmetic2UnitTest/main.cpp index 3939fd443..8d70547bc 100644 --- a/23_Arithmetic2UnitTest/main.cpp +++ b/23_Arithmetic2UnitTest/main.cpp @@ -294,7 +294,7 @@ class Workgroup2ScanTestApp final : public application_templates::BasicMultiQueu auto compiler = make_smart_refctd_ptr(smart_refctd_ptr(m_system)); CHLSLCompiler::SOptions options = {}; options.stage = IShader::E_SHADER_STAGE::ESS_COMPUTE; - options.targetSpirvVersion = m_device->getPhysicalDevice()->getLimits().spirvVersion; + options.preprocessorOptions.targetSpirvVersion = m_device->getPhysicalDevice()->getLimits().spirvVersion; options.spirvOptimizer = nullptr; #ifndef _NBL_DEBUG ISPIRVOptimizer::E_OPTIMIZER_PASS optPasses = ISPIRVOptimizer::EOP_STRIP_DEBUG_INFO; diff --git a/29_Arithmetic2Bench/main.cpp b/29_Arithmetic2Bench/main.cpp index 75f483db0..5809c4a9a 100644 --- a/29_Arithmetic2Bench/main.cpp +++ b/29_Arithmetic2Bench/main.cpp @@ -527,7 +527,7 @@ class ArithmeticBenchApp final : public examples::SimpleWindowedApplication, pub auto compiler = make_smart_refctd_ptr(smart_refctd_ptr(m_system)); CHLSLCompiler::SOptions options = {}; options.stage = IShader::E_SHADER_STAGE::ESS_COMPUTE; - options.targetSpirvVersion = m_device->getPhysicalDevice()->getLimits().spirvVersion; + options.preprocessorOptions.targetSpirvVersion = m_device->getPhysicalDevice()->getLimits().spirvVersion; options.spirvOptimizer = nullptr; #ifndef _NBL_DEBUG ISPIRVOptimizer::E_OPTIMIZER_PASS optPasses = ISPIRVOptimizer::EOP_STRIP_DEBUG_INFO; diff --git a/64_EmulatedFloatTest/main.cpp b/64_EmulatedFloatTest/main.cpp index fd3e465e7..3fc635e87 100644 --- a/64_EmulatedFloatTest/main.cpp +++ b/64_EmulatedFloatTest/main.cpp @@ -280,7 +280,7 @@ class CompatibilityTest final : public MonoDeviceApplication, public BuiltinReso nbl::asset::IShaderCompiler::SCompilerOptions options = {}; options.stage = ESS_COMPUTE; - options.targetSpirvVersion = base.m_device->getPhysicalDevice()->getLimits().spirvVersion; + options.preprocessorOptions.targetSpirvVersion = base.m_device->getPhysicalDevice()->getLimits().spirvVersion; options.spirvOptimizer = nullptr; options.debugInfoFlags |= IShaderCompiler::E_DEBUG_INFO_FLAGS::EDIF_SOURCE_BIT; options.preprocessorOptions.sourceIdentifier = source->getFilepathHint(); @@ -946,7 +946,7 @@ class CompatibilityTest final : public MonoDeviceApplication, public BuiltinReso IShaderCompiler::SCompilerOptions options = {}; options.stage = ESS_COMPUTE; - options.targetSpirvVersion = base.m_device->getPhysicalDevice()->getLimits().spirvVersion; + options.preprocessorOptions.targetSpirvVersion = base.m_device->getPhysicalDevice()->getLimits().spirvVersion; options.spirvOptimizer = nullptr; options.debugInfoFlags |= IShaderCompiler::E_DEBUG_INFO_FLAGS::EDIF_SOURCE_BIT; options.preprocessorOptions.sourceIdentifier = source->getFilepathHint(); diff --git a/70_FLIPFluids/main.cpp b/70_FLIPFluids/main.cpp index 66596c526..899d00ba4 100644 --- a/70_FLIPFluids/main.cpp +++ b/70_FLIPFluids/main.cpp @@ -1426,7 +1426,7 @@ class FLIPFluidsApp final : public SimpleWindowedApplication, public BuiltinReso options.stage = shaderStage; if (!(options.stage == IShader::E_SHADER_STAGE::ESS_COMPUTE || options.stage == IShader::E_SHADER_STAGE::ESS_FRAGMENT)) options.stage = IShader::E_SHADER_STAGE::ESS_VERTEX; - options.targetSpirvVersion = m_device->getPhysicalDevice()->getLimits().spirvVersion; + options.preprocessorOptions.targetSpirvVersion = m_device->getPhysicalDevice()->getLimits().spirvVersion; options.spirvOptimizer = nullptr; #ifndef _NBL_DEBUG ISPIRVOptimizer::E_OPTIMIZER_PASS optPasses = ISPIRVOptimizer::EOP_STRIP_DEBUG_INFO; diff --git a/CMakeLists.txt b/CMakeLists.txt index 66d6f682d..6891691f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,15 @@ if(NBL_BUILD_EXAMPLES) target_link_libraries(${T} PUBLIC ${NBL_EXAMPLES_API_TARGET}) target_include_directories(${T} PUBLIC $) target_precompile_headers(${T} REUSE_FROM "${NBL_EXAMPLES_API_TARGET}") + + # TODO: make them all INTERFACE if not NBL_EMBED_BUILTIN_RESOURCES and link in loop without checking the var + if(NBL_EMBED_BUILTIN_RESOURCES) + LINK_BUILTIN_RESOURCES_TO_TARGET(${T} NblExtExamplesAPIBuiltinsSource) + LINK_BUILTIN_RESOURCES_TO_TARGET(${T} NblExtExamplesAPIBuiltinsInclude) + LINK_BUILTIN_RESOURCES_TO_TARGET(${T} NblExtExamplesAPIBuiltinsBuild) + else() + target_link_libraries(${T} PUBLIC NblExtExamplesAPIBuiltinsBuild) + endif() endforeach() NBL_ADJUST_FOLDERS(examples) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 3a55e7a26..2c4037e2d 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -13,6 +13,61 @@ nbl_create_ext_library_project(ExamplesAPI "" "${CMAKE_CURRENT_SOURCE_DIR}/src/n set_target_properties(${LIB_NAME} PROPERTIES DISABLE_PRECOMPILE_HEADERS OFF) target_precompile_headers(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include/nbl/examples/PCH.hpp") +set(COMMON_INCLUDE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include") + +function(INTERFACE_TO_BUILTINS TARGET) + #[[ + even though builtin target is static library its still valid to reuse + common PCH to boost its build speed to not preprocess entire Nabla again + ]] + set_target_properties(${TARGET} PROPERTIES DISABLE_PRECOMPILE_HEADERS OFF) + target_precompile_headers(${TARGET} REUSE_FROM "${LIB_NAME}") + + target_include_directories(${TARGET} PUBLIC "${COMMON_INCLUDE_DIRECTORY}") + target_link_libraries(${TARGET} INTERFACE ${LIB_NAME}) +endfunction() + +function(REGISTER_COMMON_BUILTINS) + cmake_parse_arguments(EX "" "TARGET;ARCHIVE_ABS_ENTRY;ARCHIVE_NAMESPACE" "GLOB_RGX" ${ARGN}) + + get_filename_component(INPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE) + get_filename_component(OUTPUT_SRC "${CMAKE_CURRENT_BINARY_DIR}/builtin/${EX_TARGET}/src" ABSOLUTE) + get_filename_component(OUTPUT_INCLUDE "${CMAKE_CURRENT_BINARY_DIR}/builtin/${EX_TARGET}/include" ABSOLUTE) + + set(KEYS_ENTRY "${INPUT_DIRECTORY}/${EX_ARCHIVE_ABS_ENTRY}") + list(TRANSFORM EX_GLOB_RGX PREPEND "${KEYS_ENTRY}/") + file(GLOB_RECURSE KEYS RELATIVE "${KEYS_ENTRY}" CONFIGURE_DEPENDS ${EX_GLOB_RGX}) + + #[[ + note we do force you to specify full globbing expressions relative to keys entry which we do not filter + because if runtime outputs .spv compilation artifacts/shader cache preprocessed.hlsl(s) to source you will hit CMake + reconfiguration each time the file content or timestampts change and it could lead to embeding intermediate trash + ]] + + unset(EXAMPLES_RESOURCES_TO_EMBED) + foreach(KEY IN LISTS KEYS) + LIST_BUILTIN_RESOURCE(EXAMPLES_RESOURCES_TO_EMBED "${KEY}") + endforeach() + + ADD_CUSTOM_BUILTIN_RESOURCES(${EX_TARGET} EXAMPLES_RESOURCES_TO_EMBED "${INPUT_DIRECTORY}" "${EX_ARCHIVE_ABS_ENTRY}" "${EX_ARCHIVE_NAMESPACE}" "${OUTPUT_INCLUDE}" "${OUTPUT_SRC}") + INTERFACE_TO_BUILTINS(${EX_TARGET}) +endfunction() + +#! common example API builtins as static library targets linked to each example +if(NBL_EMBED_BUILTIN_RESOURCES) + REGISTER_COMMON_BUILTINS(TARGET NblExtExamplesAPIBuiltinsSource + ARCHIVE_ABS_ENTRY src/nbl/examples + ARCHIVE_NAMESPACE nbl::builtin::examples::src + GLOB_RGX *.hlsl *.txt + ) + + REGISTER_COMMON_BUILTINS(TARGET NblExtExamplesAPIBuiltinsInclude + ARCHIVE_ABS_ENTRY include/nbl/examples + ARCHIVE_NAMESPACE nbl::builtin::examples::include + GLOB_RGX *.hpp *.h *.hlsl *.txt + ) +endif() + #! Examples API common libraries #[[ The rule is to avoid creating additional libraries as part of the examples' common @@ -24,10 +79,10 @@ target_precompile_headers(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/includ but If you have a good reason to create library because you cannot make it header only AND you *can REUSE* the examples' PCH then go ahead anyway and put it under `src/nbl/examples`, otherwise keep it header only - a good example would be to use our embedded-whatever-you-want tool - which does create library but can reuse example's PCH + which does create library but can reuse example's PCH (see NblExtExamplesAPIBuiltinsSource + and NblExtExamplesAPIBuiltinsInclude targets) ]] -#! NOTE: as I write it we don't have any targets there yet add_subdirectory("src/nbl/examples" EXCLUDE_FROM_ALL) NBL_GET_ALL_TARGETS(TARGETS) @@ -35,7 +90,7 @@ list(REMOVE_ITEM TARGETS ${LIB_NAME}) # the Examples API proxy library CMake target name #[[ - this one gets linked to each executable automatically + this one gets linked to each executable automatically with its interface libraries ]] set(NBL_EXAMPLES_API_TARGET ${LIB_NAME} PARENT_SCOPE) @@ -45,4 +100,6 @@ set(NBL_EXAMPLES_API_TARGET ${LIB_NAME} PARENT_SCOPE) then you must target_link_libraries() the lib you want as we don't link all those libraries to each executable automatically ]] -set(NBL_EXAMPLES_API_LIBRARIES ${TARGETS} PARENT_SCOPE) \ No newline at end of file +set(NBL_EXAMPLES_API_LIBRARIES ${TARGETS} PARENT_SCOPE) + +NBL_ADJUST_FOLDERS(common) \ No newline at end of file diff --git a/common/include/nbl/examples/common/BuiltinResourcesApplication.hpp b/common/include/nbl/examples/common/BuiltinResourcesApplication.hpp index aa1949ecd..b0a21fb05 100644 --- a/common/include/nbl/examples/common/BuiltinResourcesApplication.hpp +++ b/common/include/nbl/examples/common/BuiltinResourcesApplication.hpp @@ -4,20 +4,25 @@ #ifndef _NBL_EXAMPLES_BUILTIN_RESOURCE_APPLICATION_HPP_INCLUDED_ #define _NBL_EXAMPLES_BUILTIN_RESOURCE_APPLICATION_HPP_INCLUDED_ - // we need a system, logger and an asset manager #include "nbl/application_templates/MonoAssetManagerApplication.hpp" #ifdef NBL_EMBED_BUILTIN_RESOURCES -// TODO: the include/header `nbl/examples` archive -// TODO: the source `nbl/examples` archive -// TODO: the build `nbl/examples` archive -#if __has_include("nbl/this_example/builtin/CArchive.h") - #include "nbl/this_example/builtin/CArchive.h" -#endif + #include "nbl/builtin/examples/include/CArchive.h" + #include "nbl/builtin/examples/src/CArchive.h" + #include "nbl/builtin/examples/build/CArchive.h" + #if __has_include("nbl/this_example/builtin/CArchive.h") + #include "nbl/this_example/builtin/CArchive.h" + #endif + // TODO: (**) there should be also 5th arch "nbl/this_example/builtin/build/CArchive.h" + /* + #if __has_include("nbl/this_example/builtin/build/CArchive.h") + #include "nbl/this_example/builtin/build/CArchive.h" + #endif + */ + //! this ain't meant to be the same as this_example ordinary archive #endif - namespace nbl::examples { @@ -40,24 +45,30 @@ class BuiltinResourcesApplication : public virtual application_templates::MonoAs using namespace core; - smart_refctd_ptr examplesHeaderArch,examplesSourceArch,examplesBuildArch,thisExampleArch; - #ifdef NBL_EMBED_BUILTIN_RESOURCES -// TODO: the 3 examples archives + smart_refctd_ptr examplesHeaderArch,examplesSourceArch,examplesBuildSpirvArch,thisExampleArch; + #ifdef NBL_EMBED_BUILTIN_RESOURCES + examplesHeaderArch = core::make_smart_refctd_ptr(smart_refctd_ptr(m_logger)); + examplesSourceArch = core::make_smart_refctd_ptr(smart_refctd_ptr(m_logger)); + examplesBuildSpirvArch = core::make_smart_refctd_ptr(smart_refctd_ptr(m_logger)); + #ifdef _NBL_THIS_EXAMPLE_BUILTIN_C_ARCHIVE_H_ thisExampleArch = make_smart_refctd_ptr(smart_refctd_ptr(m_logger)); #endif - #else + // TODO: (**) + #else examplesHeaderArch = make_smart_refctd_ptr(localInputCWD/"../common/include/nbl/examples",smart_refctd_ptr(m_logger),m_system.get()); examplesSourceArch = make_smart_refctd_ptr(localInputCWD/"../common/src/nbl/examples",smart_refctd_ptr(m_logger),m_system.get()); -// TODO: examplesBuildArch = + examplesBuildSpirvArch = make_smart_refctd_ptr(NBL_EXAMPLES_BUILD_MOUNT_POINT, smart_refctd_ptr(m_logger), m_system.get()); thisExampleArch = make_smart_refctd_ptr(localInputCWD/"app_resources",smart_refctd_ptr(m_logger),m_system.get()); - #endif + // TODO: (**) + #endif // yes all 3 aliases are meant to be the same m_system->mount(std::move(examplesHeaderArch),"nbl/examples"); m_system->mount(std::move(examplesSourceArch),"nbl/examples"); -// m_system->mount(std::move(examplesBuildArch),"nbl/examples"); + m_system->mount(std::move(examplesBuildSpirvArch),"nbl/examples"); if (thisExampleArch) m_system->mount(std::move(thisExampleArch),"app_resources"); + // TODO: (**) return true; } @@ -65,4 +76,4 @@ class BuiltinResourcesApplication : public virtual application_templates::MonoAs } -#endif // _CAMERA_IMPL_ \ No newline at end of file +#endif // _NBL_EXAMPLES_BUILTIN_RESOURCE_APPLICATION_HPP_INCLUDED_ \ No newline at end of file diff --git a/common/include/nbl/examples/geometry/CSimpleDebugRenderer.hpp b/common/include/nbl/examples/geometry/CSimpleDebugRenderer.hpp index c1cf6567f..d5b48de0e 100644 --- a/common/include/nbl/examples/geometry/CSimpleDebugRenderer.hpp +++ b/common/include/nbl/examples/geometry/CSimpleDebugRenderer.hpp @@ -108,14 +108,14 @@ class CSimpleDebugRenderer final : public core::IReferenceCounted // load shader smart_refctd_ptr shader; { - const auto bundle = assMan->getAsset("nbl/examples/geometry/shaders/unified.hlsl",{}); -// TODO: Arek - //const auto bundle = assMan->getAsset("nbl/examples/geometry/shaders/unified.spv",{}); + constexpr std::string_view key = "nbl/examples/shaders/geometry/unified.spv"; + const auto bundle = assMan->getAsset(key.data(), {}); + const auto contents = bundle.getContents(); if (contents.empty() || bundle.getAssetType()!=IAsset::ET_SHADER) return nullptr; shader = IAsset::castDown(contents[0]); - shader = device->compileShader({.source=shader.get()}); + if (!shader) return nullptr; } diff --git a/common/src/nbl/examples/CMakeLists.txt b/common/src/nbl/examples/CMakeLists.txt index a95372eea..f79b23d9b 100644 --- a/common/src/nbl/examples/CMakeLists.txt +++ b/common/src/nbl/examples/CMakeLists.txt @@ -1,4 +1,65 @@ -# TODO builtin SPIR-V shaders -# add_subdirectory(geometry EXCLUDE_FROM_ALL) +set(OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/auto-gen") +set(ARGS + TARGET NblExtExamplesAPISPIRV + BINARY_DIR ${OUTPUT_DIRECTORY} + COMMON_OPTIONS -I "${COMMON_INCLUDE_DIRECTORY}" + OUTPUT_VAR KEYS +) -# TODO: make docs once I get n4ce embed SPIRV tool to build system and then use the tool with Matts new shader \ No newline at end of file +# note json is array of objects, you can register all rules at once +set(JSON [=[ +[ + { + "INPUT": "shaders/geometry/unified.hlsl", + "COMPILE_OPTIONS": ["-T", "lib_6_6"], + "DEPENDS": [], + "CAPS": [] + } +] +]=]) + +NBL_CREATE_NSC_COMPILE_RULES(${ARGS} INPUTS ${JSON}) + +set(JSON [=[ +[ + { + "INPUT": "shaders/geometry/unified.hlsl", + "COMPILE_OPTIONS": ["-T", "lib_6_6"], + "DEPENDS": [], + "CAPS": [ + { + "name": "shaderFloat64", + "type": "bool", + "values": ["true", "false"] + }, + { + "name": "subgroupSize", + "type": "uint16_t", + "values": ["32", "64"] + } + ] + } +] +]=]) + +# but it also supports incremental rule updates, uncomment to add rules with permutation caps +# NBL_CREATE_NSC_COMPILE_RULES(${ARGS} INPUTS ${JSON}) + +# note we can add more inputs from build dir which keys can be part of the same archive/mount point, +# ex. one could auto generate bc texture or whatever and add here like +# file(WRITE "${OUTPUT_DIRECTORY}/dummy.txt" "dummy, test") +# list(APPEND KEYS dummy.txt) + +NBL_CREATE_RESOURCE_ARCHIVE( + TARGET NblExtExamplesAPIBuiltinsBuild + BIND "${OUTPUT_DIRECTORY}" + NAMESPACE nbl::builtin::examples::build + MOUNT_POINT_DEFINE NBL_EXAMPLES_BUILD_MOUNT_POINT + BUILTINS ${KEYS} +) + +if(NBL_EMBED_BUILTIN_RESOURCES) + INTERFACE_TO_BUILTINS(NblExtExamplesAPIBuiltinsBuild) +endif() + +target_link_libraries(NblExtExamplesAPIBuiltinsBuild PUBLIC NblExtExamplesAPISPIRV) diff --git a/common/src/nbl/examples/geometry/shaders/grid.vertex.hlsl b/common/src/nbl/examples/geometry/shaders/grid.vertex.hlsl deleted file mode 100644 index 389c37bf2..000000000 --- a/common/src/nbl/examples/geometry/shaders/grid.vertex.hlsl +++ /dev/null @@ -1,11 +0,0 @@ -#include "template/grid.common.hlsl" - - -PSInput VSMain(VSInput input) -{ - PSInput output; - output.position = mul(params.MVP, float4(input.position, 1.0)); - output.uv = (input.uv - float2(0.5, 0.5)) * abs(input.position.xy); - - return output; -} \ No newline at end of file diff --git a/common/src/nbl/examples/geometry/shaders/template/grid.common.hlsl b/common/src/nbl/examples/geometry/shaders/template/grid.common.hlsl deleted file mode 100644 index 7ec9017e9..000000000 --- a/common/src/nbl/examples/geometry/shaders/template/grid.common.hlsl +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _NBL_EXAMPLES_GRID_COMMON_HLSL_ -#define _NBL_EXAMPLES_GRID_COMMON_HLSL_ - -#include "common/SBasicViewParameters.hlsl" - -#ifdef __HLSL_VERSION -// TODO: why is there even a mesh with HW vertices for this? -struct VSInput -{ - [[vk::location(0)]] float3 position : POSITION; - [[vk::location(1)]] float4 color : COLOR; - [[vk::location(2)]] float2 uv : TEXCOORD; - [[vk::location(3)]] float3 normal : NORMAL; -}; - -struct PSInput -{ - float4 position : SV_Position; - float2 uv : TEXCOORD0; -}; - -[[vk::push_constant]] SBasicViewParameters params; -#endif // __HLSL_VERSION - - -float gridTextureGradBox(float2 p, float2 ddx, float2 ddy) -{ - float N = 30.0; // grid ratio - float2 w = max(abs(ddx), abs(ddy)) + 0.01; // filter kernel - - // analytic (box) filtering - float2 a = p + 0.5 * w; - float2 b = p - 0.5 * w; - float2 i = (floor(a) + min(frac(a) * N, 1.0) - floor(b) - min(frac(b) * N, 1.0)) / (N * w); - - // pattern - return (1.0 - i.x) * (1.0 - i.y); -} - -#endif // _NBL_EXAMPLES_GRID_COMMON_HLSL_ -/* - do not remove this text, WAVE is so bad that you can get errors if no proper ending xD -*/ \ No newline at end of file diff --git a/common/src/nbl/examples/geometry/shaders/unified.hlsl b/common/src/nbl/examples/shaders/geometry/unified.hlsl similarity index 100% rename from common/src/nbl/examples/geometry/shaders/unified.hlsl rename to common/src/nbl/examples/shaders/geometry/unified.hlsl