Skip to content

Rm core matrix #183

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

Open
wants to merge 97 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
7ce37e0
add CCubeProjection.hpp, ILinearProjection.hpp & IProjection.hpp head…
AnastaZIuk Oct 20, 2024
e239229
add range_value_t to IProjection
AnastaZIuk Oct 20, 2024
5e03922
create IProjectionRange, pair with IProjection, use concepts for spec…
AnastaZIuk Oct 21, 2024
6196c61
save draft of CVirtualCameraEvent.hpp & ICameraControl.hpp, update so…
AnastaZIuk Oct 21, 2024
fedb9c1
Saving work
Przemog1 Oct 21, 2024
80be87d
update ICameraControl & CVirtualCameraEvent, add processVirtualEvent
AnastaZIuk Oct 23, 2024
3af8c07
put CVirtualCameraEvent logic into ICameraController, update the clas…
AnastaZIuk Oct 23, 2024
fdd47a7
add more getters & setters to ICameraController, remove some content …
AnastaZIuk Oct 23, 2024
6b45fec
Modified example 09
Przemog1 Oct 23, 2024
3ed3727
save work, make classes compile (but runtime crashes), mark TODOs for…
AnastaZIuk Oct 24, 2024
13df456
Saving work
Przemog1 Oct 25, 2024
038c5d7
create ICamera.hpp interface for all types of cameraz, update IProjec…
AnastaZIuk Oct 25, 2024
242a871
improve IProjection, make the matrix private & allow to change it wit…
AnastaZIuk Oct 25, 2024
0415999
address https://github.com/Devsh-Graphics-Programming/Nabla/pull/760/…
AnastaZIuk Oct 25, 2024
84f35e5
init default keys to virtual events, make ICameraController<T> inheri…
AnastaZIuk Oct 25, 2024
d8ff36a
split responsibilities & update sources
AnastaZIuk Oct 26, 2024
e0c66bd
add updateOrthonormalMatrix
AnastaZIuk Oct 26, 2024
d1c0e9f
Saving work
Przemog1 Oct 26, 2024
0574d72
start eliminating first runtime bugs & typos
AnastaZIuk Oct 26, 2024
221e112
add debug asserts for matrix base checks
AnastaZIuk Oct 28, 2024
13613c3
fix another bugs, make the rotation work!
AnastaZIuk Oct 28, 2024
db77a10
movement fixes, finally gimbal fully controls camera position & orien…
AnastaZIuk Oct 28, 2024
ae2b520
small typo
AnastaZIuk Oct 28, 2024
d21bd96
accumulate move & rotation deltas, add setOrientation & correct proce…
AnastaZIuk Oct 29, 2024
6cbd85c
Saving work
Przemog1 Oct 29, 2024
b69152c
Fixed CCamera.hpp
Przemog1 Oct 29, 2024
9213b89
Merge branch 'master' of https://github.com/Devsh-Graphics-Programmin…
Przemog1 Oct 30, 2024
b1d9689
Fixed example 62
Przemog1 Oct 30, 2024
ccbb37c
remove old test methods
AnastaZIuk Oct 30, 2024
1a694eb
Fixed example 61
Przemog1 Oct 29, 2024
88c3d34
Resolved confilcts, merged cameraz
Przemog1 Nov 1, 2024
d3f325d
remove gimbal member from camera interface, have matrix precision typ…
AnastaZIuk Nov 2, 2024
f9fce56
move virtual events outside templates into CVirtualGimbalEvent, have …
AnastaZIuk Nov 3, 2024
2f44640
bad typo
AnastaZIuk Nov 3, 2024
424a71a
Resolved conflicts, merged cameraz
Przemog1 Nov 4, 2024
1946d5b
Refactor
Przemog1 Nov 4, 2024
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
55362eb
Saving work
Przemog1 Jan 15, 2025
138bd7f
Adjustments
Przemog1 Jan 18, 2025
969778f
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla-…
Przemog1 Jan 18, 2025
ae6e570
Removed test code
Przemog1 Jan 21, 2025
806b879
Removed `bitreverse.hlsl` references
Przemog1 Jan 22, 2025
daccef9
Implemented C++ side tgmath tests
Przemog1 Jan 22, 2025
bc4cbbe
Implemented HLSL side tgmath tests
Przemog1 Jan 25, 2025
e91f070
Implemented intrinsics.hlsl tests
Przemog1 Jan 28, 2025
a8ac36c
Implemented `logFail`
Przemog1 Jan 28, 2025
bcd079a
Fixed gpu tests
Przemog1 Jan 28, 2025
0714468
Fixes
Przemog1 Jan 28, 2025
c39b0df
Renamed `lerp` to `mix`
Przemog1 Jan 29, 2025
086987d
Added log2 tests
Przemog1 Jan 29, 2025
06ed533
Extened tgmath tests
Przemog1 Jan 30, 2025
a927463
Added tests for new intirnsics functions
Przemog1 Jan 30, 2025
3ad088a
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla-…
Przemog1 Feb 3, 2025
2bc6d88
Example 62 fix
Przemog1 Feb 3, 2025
99cb3cf
Added modfStruct and frexpStruct tests
Przemog1 Feb 3, 2025
ccc637a
Bug fix
Przemog1 Feb 3, 2025
6087653
Updated tests
Przemog1 Feb 4, 2025
de37c21
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla-…
Przemog1 Feb 6, 2025
4f499be
Merge branch 'new_tgmath' of github.com:Devsh-Graphics-Programming/Na…
Przemog1 Feb 6, 2025
071b862
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla-…
Przemog1 Feb 7, 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
30 changes: 16 additions & 14 deletions 09_GeometryCreator/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// This file is part of the "Nabla Engine".
// For conditions of distribution and use, see copyright notice in nabla.h

#include <nbl/builtin/hlsl/matrix_utils/transformation_matrix_utils.hlsl>
#include <nbl/builtin/hlsl/projection/projection.hlsl>
#include "common.hpp"

class CSwapchainFramebuffersAndDepth final : public nbl::video::CDefaultSwapchainFramebuffers
Expand Down Expand Up @@ -230,9 +232,9 @@ class GeometryCreatorApp final : public examples::SimpleWindowedApplication

// camera
{
core::vectorSIMDf cameraPosition(-5.81655884, 2.58630896, -4.23974705);
core::vectorSIMDf cameraTarget(-0.349590302, -0.213266611, 0.317821503);
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 10000);
hlsl::float32_t3 cameraPosition(-5.81655884, 2.58630896, -4.23974705);
hlsl::float32_t3 cameraTarget(-0.349590302, -0.213266611, 0.317821503);
float32_t4x4 projectionMatrix = hlsl::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 10000);
camera = Camera(cameraPosition, cameraTarget, projectionMatrix, 1.069f, 0.4f);
}

Expand Down Expand Up @@ -303,20 +305,20 @@ class GeometryCreatorApp final : public examples::SimpleWindowedApplication
const auto viewMatrix = camera.getViewMatrix();
const auto viewProjectionMatrix = camera.getConcatenatedMatrix();

core::matrix3x4SIMD modelMatrix;
modelMatrix.setTranslation(nbl::core::vectorSIMDf(0, 0, 0, 0));
modelMatrix.setRotation(quaternion(0, 0, 0));
hlsl::float32_t3x4 modelMatrix;
hlsl::setTranslation(modelMatrix, hlsl::float32_t3(0));
hlsl::setRotation(modelMatrix, hlsl::quaternion<float>::create(0, 0, 0));

core::matrix3x4SIMD modelViewMatrix = core::concatenateBFollowedByA(viewMatrix, modelMatrix);
core::matrix4SIMD modelViewProjectionMatrix = core::concatenateBFollowedByA(viewProjectionMatrix, modelMatrix);
hlsl::float32_t3x4 modelViewMatrix = hlsl::concatenateBFollowedByA(viewMatrix, modelMatrix);
hlsl::float32_t4x4 modelViewProjectionMatrix = mul(viewProjectionMatrix, hlsl::getMatrix3x4As4x4(modelMatrix));

core::matrix3x4SIMD normalMatrix;
modelViewMatrix.getSub3x3InverseTranspose(normalMatrix);
hlsl::float32_t3x4 normalMatrix;
//modelViewMatrix.getSub3x3InverseTranspose(normalMatrix);

SBasicViewParameters uboData;
memcpy(uboData.MVP, modelViewProjectionMatrix.pointer(), sizeof(uboData.MVP));
memcpy(uboData.MV, modelViewMatrix.pointer(), sizeof(uboData.MV));
memcpy(uboData.NormalMat, normalMatrix.pointer(), sizeof(uboData.NormalMat));
memcpy(uboData.MVP, &modelViewProjectionMatrix, sizeof(uboData.MVP));
memcpy(uboData.MV, &modelViewMatrix, sizeof(uboData.MV));
memcpy(uboData.NormalMat, &normalMatrix, sizeof(uboData.NormalMat));
{
SBufferRange<IGPUBuffer> range;
range.buffer = core::smart_refctd_ptr(resources.ubo.buffer);
Expand Down Expand Up @@ -467,7 +469,7 @@ class GeometryCreatorApp final : public examples::SimpleWindowedApplication
InputSystem::ChannelReader<IMouseEventChannel> mouse;
InputSystem::ChannelReader<IKeyboardEventChannel> keyboard;

Camera camera = Camera(core::vectorSIMDf(0, 0, 0), core::vectorSIMDf(0, 0, 0), core::matrix4SIMD());
Camera camera = Camera(hlsl::float32_t3(0, 0, 0), hlsl::float32_t3(0, 0, 0), hlsl::float32_t4x4(1));
video::CDumbPresentationOracle oracle;

ResourcesBundle resources;
Expand Down
863 changes: 863 additions & 0 deletions 22_CppCompat/Testers.h

Large diffs are not rendered by default.

Loading