Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BxDF tests #165

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
ba9fde5
hlsl bxdf test dir
keptsecret Dec 17, 2024
4f9dc9f
test bxdf compiles
keptsecret Dec 17, 2024
2091701
minor namespace changes
keptsecret Dec 17, 2024
385bcec
added bsdf test
keptsecret Dec 19, 2024
5ba4dfd
Merge branch 'master' into bxdf_unit_tests
keptsecret Dec 19, 2024
9212b65
fix namespace
keptsecret Dec 20, 2024
32f959d
Example 62 fix
Przemog1 Dec 20, 2024
8128422
Merge branch 'master' into bxdf_unit_tests
keptsecret Dec 23, 2024
70b28d8
working? test
keptsecret Dec 23, 2024
f177090
rng test util struct
keptsecret Dec 25, 2024
382c862
beckmann dielectric test
keptsecret Dec 25, 2024
e0bde55
Updated examples
Przemog1 Dec 28, 2024
46c80dc
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla-…
Przemog1 Dec 28, 2024
677323b
Fixes
Przemog1 Dec 30, 2024
1bc825d
Merge branch 'bxdf_unit_tests' of github.com:Devsh-Graphics-Programmi…
Przemog1 Dec 30, 2024
76db120
Merge branch 'master' into bxdf_unit_tests
keptsecret Jan 3, 2025
9de6ae8
fix syntax
keptsecret Jan 3, 2025
6dbc89a
more tests (all brdfs) and utils
keptsecret Jan 6, 2025
9c379eb
template tests
keptsecret Jan 7, 2025
5140f85
all existing tests into templates
keptsecret Jan 7, 2025
fb7b31b
simplify test template and usage
keptsecret Jan 8, 2025
3c415fd
diff v test
keptsecret Jan 8, 2025
3524449
test metadata struct for more info
keptsecret Jan 8, 2025
ef188ba
smooth dielectric bsdf tests
keptsecret Jan 8, 2025
17b253c
improve rng function
keptsecret Jan 9, 2025
59d14c3
fix bugs in rng
keptsecret Jan 9, 2025
fac1ed1
fix tests, use uniform sampling
keptsecret Jan 10, 2025
1ecd0c0
use new sampling
keptsecret Jan 10, 2025
c983141
hash to uint2 seed
keptsecret Jan 10, 2025
c02c9f0
use glm quaternions instead
keptsecret Jan 10, 2025
0c3d657
callbacks on detect error
keptsecret Jan 13, 2025
01d4799
fix callback usage bugs
keptsecret Jan 13, 2025
887c3a0
changed ior, spectral_type usage in bxdf
keptsecret Jan 13, 2025
9ab4e8e
use new pcg hlsl
keptsecret Jan 14, 2025
c8859c0
callback reruns bxdf compute
keptsecret Jan 14, 2025
414f961
added bxdf names for debugging
keptsecret Jan 14, 2025
fe23efc
Saving work
Przemog1 Jan 14, 2025
cdff4c6
Merge branch 'bxdf_unit_tests' of github.com:Devsh-Graphics-Programmi…
Przemog1 Jan 14, 2025
3668d99
check util functions
keptsecret Jan 15, 2025
a66dc44
reciprocity test
keptsecret Jan 15, 2025
b5d9778
negative value checks
keptsecret Jan 15, 2025
55362eb
Saving work
Przemog1 Jan 15, 2025
48cc64c
Merge branch 'bxdf_unit_tests' of github.com:Devsh-Graphics-Programmi…
Przemog1 Jan 15, 2025
5df264a
fix test orders
keptsecret Jan 16, 2025
983efc3
Merge branch 'bxdf_unit_tests' of github.com:Devsh-Graphics-Programmi…
keptsecret Jan 16, 2025
e6e434a
use new param structs for bxdf funcs
keptsecret Jan 17, 2025
d494e3d
print more info on error
keptsecret Jan 20, 2025
3305441
Merge branch 'master' into bxdf_unit_tests
keptsecret Jan 20, 2025
3625ad2
fix reciprocity test, adjust comparison
keptsecret Jan 21, 2025
839d42c
fixed reciprocity test
keptsecret Jan 22, 2025
a40ba94
test buckets of inf
keptsecret Jan 23, 2025
d0d5d93
bucket by polar coords
keptsecret Jan 23, 2025
c8f8dae
chi2 test
keptsecret Jan 24, 2025
8ea1538
Merge branch 'master' into bxdf_unit_tests
keptsecret Jan 24, 2025
dcc2927
Merge branch 'master' into bxdf_unit_tests
keptsecret Jan 27, 2025
8781cb0
fix chi2 test, beckmann still error
keptsecret Jan 27, 2025
724acd5
add visualization option for chi2 samples
keptsecret Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 62_CAD/Hatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bool Hatch::Segment::isStraightLineConstantMajor() const
p1 = originalBezier->P1[major],
p2 = originalBezier->P2[major];
//assert(p0 <= p1 && p1 <= p2); (PRECISION ISSUES ARISE ONCE MORE)
return abs(p1 - p0) <= core::exp2(-24.0) && abs(p2 - p0) <= exp(-24);
return abs(p1 - p0) <= core::exp2(-24.0) && abs(p2 - p0) <= hlsl::exp(-24.0f);
}

std::array<double, 2> Hatch::Segment::intersect(const Segment& other) const
Expand Down
4 changes: 3 additions & 1 deletion 62_CAD/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ using namespace video;
#include "HatchGlyphBuilder.h"
#include "GeoTexture.h"

#include <nbl/builtin/hlsl/tgmath.hlsl>

#include <chrono>
#define BENCHMARK_TILL_FIRST_FRAME

Expand Down Expand Up @@ -66,7 +68,7 @@ constexpr std::array<float, (uint32_t)ExampleMode::CASE_COUNT> cameraExtents =
600.0, // CASE_8
};

constexpr ExampleMode mode = ExampleMode::CASE_5;
constexpr ExampleMode mode = ExampleMode::CASE_4;

class Camera2D
{
Expand Down
1 change: 1 addition & 0 deletions 62_CAD/shaders/globals.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <nbl/builtin/hlsl/cpp_compat/basic.h>
#include <nbl/builtin/hlsl/cpp_compat/matrix.hlsl>
#include <nbl/builtin/hlsl/shapes/beziers.hlsl>
#include <nbl/builtin/hlsl/tgmath.hlsl>

#ifdef __HLSL_VERSION
#include <nbl/builtin/hlsl/math/equations/quadratic.hlsl>
Expand Down
28 changes: 28 additions & 0 deletions 66_HLSLBxDFTests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
set(NBL_INCLUDE_SEARCH_DIRECTORIES
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)

include(common RESULT_VARIABLE RES)
if(NOT RES)
message(FATAL_ERROR "common.cmake not found. Should be in {repo_root}/cmake directory")
endif()

nbl_create_executable_project("" "" "${NBL_INCLUDE_SEARCH_DIRECTORIES}" "" "${NBL_EXECUTABLE_PROJECT_CREATION_PCH_TARGET}")

if(NBL_EMBED_BUILTIN_RESOURCES)
set(_BR_TARGET_ ${EXECUTABLE_NAME}_builtinResourceData)
set(RESOURCE_DIR "app_resources")

get_filename_component(_SEARCH_DIRECTORIES_ "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
get_filename_component(_OUTPUT_DIRECTORY_SOURCE_ "${CMAKE_CURRENT_BINARY_DIR}/src" ABSOLUTE)
get_filename_component(_OUTPUT_DIRECTORY_HEADER_ "${CMAKE_CURRENT_BINARY_DIR}/include" ABSOLUTE)

file(GLOB_RECURSE BUILTIN_RESOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/${RESOURCE_DIR}" CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${RESOURCE_DIR}/*")
foreach(RES_FILE ${BUILTIN_RESOURCE_FILES})
LIST_BUILTIN_RESOURCE(RESOURCES_TO_EMBED "${RES_FILE}")
endforeach()

ADD_CUSTOM_BUILTIN_RESOURCES(${_BR_TARGET_} RESOURCES_TO_EMBED "${_SEARCH_DIRECTORIES_}" "${RESOURCE_DIR}" "nbl::this_example::builtin" "${_OUTPUT_DIRECTORY_HEADER_}" "${_OUTPUT_DIRECTORY_SOURCE_}")

LINK_BUILTIN_RESOURCES_TO_TARGET(${EXECUTABLE_NAME} ${_BR_TARGET_})
endif()
Loading