Skip to content

Cameraz - #995

Open
AnastaZIuk wants to merge 192 commits into
masterfrom
cameraz
Open

AnastaZIuk wants to merge 192 commits into
masterfrom
cameraz

Conversation

@AnastaZIuk

@AnastaZIuk AnastaZIuk commented Feb 2, 2026

Copy link
Copy Markdown
Member

Introduces the new camera stack as Nabla::ext::Cameras.

…s - we were never be able to do ourMatrixT = glmMatrixT and its important since a lot of utils create glmMatrixT actually
…atrix xD remove the = operator glm -> to ours
…H (ambiguity dependent type issues), reference #760
… were missing an equivalent of E_KEY_CODE. Update examples_tests submodule
Comment thread include/nbl/ext/Cameras/ICamera.hpp Outdated
Comment thread include/nbl/ext/Cameras/CCameraMathUtilities.hpp Outdated
Comment thread include/nbl/ext/Cameras/IGimbal.hpp Outdated
Comment on lines +272 to +273
const TRS operator()() const
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • this function is unused and is a bit funny, cause it's the same function but when you pass hlsl::matrix<T, 4u, 4u> it treats as row-major but otherwise column major and the function is never used btw.

@Erfan-Ahmadi

Copy link
Copy Markdown
Contributor

the convention in your camera ext is super unclear:

Comment thread include/nbl/ext/Cameras/IGimbal.hpp Outdated
Comment thread include/nbl/builtin/hlsl/math/quaternions.hlsl Outdated
Comment thread include/nbl/ext/Cameras/CCameraMathUtilities.hpp Outdated
}

template<typename VecA, typename VecB, typename T>
static inline bool nearlyEqualVec3(const VecA& a, const VecB& b, const T epsilon)

@Erfan-Ahmadi Erfan-Ahmadi Sep 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have nbl::hlsl::RelativeApproxCompareHelper that should even work for matrices. this is redundant

Comment thread include/nbl/ext/Cameras/CCameraMathUtilities.hpp
@Erfan-Ahmadi

Erfan-Ahmadi commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

not included in this PR but needs to be fixed:

https://github.com/Devsh-Graphics-Programming/Nabla/blame/89cfa0b58c4d719c3dd3a245f6b46f73c6caa638/include/nbl/builtin/hlsl/testing/relative_approx_compare.hlsl#L25

compare with 0.0 or any other subnormal even with a generous tolerance with return false. that's causing some quaternion stuff to be nan when they shouldn't

e.g here:

orthogonal = orthogonal && testing::relativeApproxCompare(hlsl::dot(m[i], m[(i+1)%N]), scalar_t(0.0), 1e-4);

Comment thread include/nbl/ext/Cameras/CCameraTargetRelativeUtilities.hpp Outdated
# Conflicts:
#	examples_tests
…undant math util functions, consistent matrix conventions (mat4x4 vs new CameraBasis).
…and replace with RigPose, seperate mat4x4 from manipulate calls into a `setPose` function. a bit more documentations. remove passthrough functions that add to confusion and bloat the codebase.
…pplied it to another camera, plus everything built on it (presets, keyframe tracks, playback, persistence, follow, sequence scripts, the scripted runtime and its checks), now lives in `examples_tests/61_UI/include/camera/`
…on between projection and cameraWithProjection)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants