Conversation
…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
…ng/Nabla/pull/760/files#r1816728485 for #760 PR, update examples_tests submodule
…g/Nabla into rm_core_mat_vec
| The function will figure it out if you've set an orthogonal matrix. | ||
| \param projection The new projection matrix of the camera. | ||
| */ | ||
| virtual void setProjectionMatrix(const core::matrix4SIMD& projection) =0; | ||
| virtual void setProjectionMatrix(const hlsl::float32_t4x4& projection) =0; | ||
|
|
||
| //! Gets the current projection matrix of the camera. | ||
| /** \return The current projection matrix of the camera. */ | ||
| inline const core::matrix4SIMD& getProjectionMatrix() const { return projMatrix; } | ||
| inline const hlsl::float32_t4x4& getProjectionMatrix() const { return projMatrix; } | ||
|
|
||
| //! Gets the current view matrix of the camera. | ||
| /** \return The current view matrix of the camera. */ | ||
| virtual const core::matrix3x4SIMD& getViewMatrix() const =0; | ||
| virtual const hlsl::float32_t3x4& getViewMatrix() const =0; | ||
|
|
||
| virtual const core::matrix4SIMD& getConcatenatedMatrix() const =0; | ||
| virtual const hlsl::float32_t4x4& getConcatenatedMatrix() const =0; | ||
| #if 0 | ||
| //! It is possible to send mouse and key events to the camera. | ||
| /** Most cameras may ignore this input, but camera scene nodes |
There was a problem hiding this comment.
nuke the whole file
| stores the color values in a single 32 bit integer. | ||
| */ | ||
| class SColorf : private core::vectorSIMDf | ||
| class SColorf : private hlsl::float32_t4 | ||
| { | ||
| public: | ||
| //! Default constructor for SColorf. | ||
| /** Sets red, green and blue to 0.0f and alpha to 1.0f. */ | ||
| SColorf() : vectorSIMDf(0.f,0.f,0.f,1.f) {} | ||
| SColorf() : hlsl::float32_t4(0.f,0.f,0.f,1.f) {} | ||
|
|
||
| //! Constructs a color from up to four color values: red, green, blue, and alpha. | ||
| /** \param r: Red color component. Should be a value between |
There was a problem hiding this comment.
can we nuke the file?
| #ifndef __NBL_LINE_3D_H_INCLUDED__ | ||
| #define __NBL_LINE_3D_H_INCLUDED__ | ||
|
|
||
| #include "vectorSIMD.h" | ||
| #include <vector3d.h> | ||
|
|
||
| namespace nbl | ||
| { |
There was a problem hiding this comment.
do we use this file at all?
| static inline uint64_t getLocalByteOffset(const core::vector3du32_SIMD& localXYZLayerOffset, const core::vector3du32_SIMD& byteStrides) | ||
| static inline uint64_t getLocalByteOffset(const hlsl::uint32_t3& localXYZLayerOffset, const hlsl::uint32_t3& byteStrides) | ||
| { | ||
| return core::dot(localXYZLayerOffset,byteStrides)[0]; | ||
| return hlsl::dot(localXYZLayerOffset,byteStrides); | ||
| } | ||
| inline uint64_t getByteOffset(const core::vector3du32_SIMD& localXYZLayerOffset, const core::vector3du32_SIMD& byteStrides) const | ||
| inline uint64_t getByteOffset(const hlsl::uint32_t3& localXYZLayerOffset, const hlsl::uint32_t3& byteStrides) const |
There was a problem hiding this comment.
check if this vector is not supposed to be 4D (xyz + layer) so uint32_t4 instead
| auto minPt = core::vector3du32_SIMD(off.x,off.y,off.z); | ||
| auto minPt = hlsl::uint32_t3(off.x,off.y,off.z); | ||
| auto srcBlockDims = asset::getBlockDimensions(srcImage->getCreationParameters().format); | ||
| if (((minPt%srcBlockDims)!=zero).any()) |
There was a problem hiding this comment.
.any() is not a method of HLSL/GLM vector
There was a problem hiding this comment.
whenever you change a templated function, you need to instantiate it to check it still compiles (or better, add a unit test to some example)
| return core::vector4du32_SIMD(4u, 4u, 1u, 1u); | ||
| return hlsl::uint32_t4(4u, 4u, 1u, 1u); | ||
| case EF_ASTC_5x4_UNORM_BLOCK: | ||
| case EF_ASTC_5x4_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(5u, 4u, 1u, 1u); | ||
| return hlsl::uint32_t4(5u, 4u, 1u, 1u); | ||
| case EF_ASTC_5x5_UNORM_BLOCK: | ||
| case EF_ASTC_5x5_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(5u, 5u, 1u, 1u); | ||
| return hlsl::uint32_t4(5u, 5u, 1u, 1u); | ||
| case EF_ASTC_6x5_UNORM_BLOCK: | ||
| case EF_ASTC_6x5_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(6u, 5u, 1u, 1u); | ||
| return hlsl::uint32_t4(6u, 5u, 1u, 1u); | ||
| case EF_ASTC_6x6_UNORM_BLOCK: | ||
| case EF_ASTC_6x6_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(6u, 6u, 1u, 1u); | ||
| return hlsl::uint32_t4(6u, 6u, 1u, 1u); | ||
| case EF_ASTC_8x5_UNORM_BLOCK: | ||
| case EF_ASTC_8x5_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(8u, 5u, 1u, 1u); | ||
| return hlsl::uint32_t4(8u, 5u, 1u, 1u); | ||
| case EF_ASTC_8x6_UNORM_BLOCK: | ||
| case EF_ASTC_8x6_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(8u, 6u, 1u, 1u); | ||
| return hlsl::uint32_t4(8u, 6u, 1u, 1u); | ||
| case EF_ASTC_8x8_UNORM_BLOCK: | ||
| case EF_ASTC_8x8_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(8u, 8u, 1u, 1u); | ||
| return hlsl::uint32_t4(8u, 8u, 1u, 1u); | ||
| case EF_ASTC_10x5_UNORM_BLOCK: | ||
| case EF_ASTC_10x5_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(10u, 5u, 1u, 1u); | ||
| return hlsl::uint32_t4(10u, 5u, 1u, 1u); | ||
| case EF_ASTC_10x6_UNORM_BLOCK: | ||
| case EF_ASTC_10x6_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(10u, 6u, 1u, 1u); | ||
| return hlsl::uint32_t4(10u, 6u, 1u, 1u); | ||
| case EF_ASTC_10x8_UNORM_BLOCK: | ||
| case EF_ASTC_10x8_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(10u, 8u, 1u, 1u); | ||
| return hlsl::uint32_t4(10u, 8u, 1u, 1u); | ||
| case EF_ASTC_10x10_UNORM_BLOCK: | ||
| case EF_ASTC_10x10_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(10u, 10u, 1u, 1u); | ||
| return hlsl::uint32_t4(10u, 10u, 1u, 1u); | ||
| case EF_ASTC_12x10_UNORM_BLOCK: | ||
| case EF_ASTC_12x10_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(12u, 10u, 1u, 1u); | ||
| return hlsl::uint32_t4(12u, 10u, 1u, 1u); | ||
| case EF_ASTC_12x12_UNORM_BLOCK: | ||
| case EF_ASTC_12x12_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(12u, 12u, 1u, 1u); | ||
| return hlsl::uint32_t4(12u, 12u, 1u, 1u); | ||
| case EF_PVRTC1_2BPP_UNORM_BLOCK_IMG: | ||
| case EF_PVRTC2_2BPP_SRGB_BLOCK_IMG: | ||
| case EF_PVRTC2_2BPP_UNORM_BLOCK_IMG: | ||
| case EF_PVRTC1_2BPP_SRGB_BLOCK_IMG: | ||
| return core::vector4du32_SIMD(8u, 4u, 1u, 1u); | ||
| return hlsl::uint32_t4(8u, 4u, 1u, 1u); | ||
| case EF_PVRTC1_4BPP_UNORM_BLOCK_IMG: | ||
| case EF_PVRTC2_4BPP_UNORM_BLOCK_IMG: | ||
| case EF_PVRTC1_4BPP_SRGB_BLOCK_IMG: | ||
| case EF_PVRTC2_4BPP_SRGB_BLOCK_IMG: | ||
| return core::vector4du32_SIMD(4u, 4u, 1u, 1u); | ||
| return hlsl::uint32_t4(4u, 4u, 1u, 1u); | ||
| default: | ||
| return core::vector4du32_SIMD(1u); | ||
| return hlsl::uint32_t4(1u); |
There was a problem hiding this comment.
uint32_t3 same as the return type, cut off the last coord w=1
| return core::vector4du32_SIMD(4u, 4u, 1u, 1u); | ||
| return hlsl::uint32_t4(4u, 4u, 1u, 1u); | ||
| case EF_ASTC_5x4_UNORM_BLOCK: | ||
| case EF_ASTC_5x4_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(5u, 4u, 1u, 1u); | ||
| return hlsl::uint32_t4(5u, 4u, 1u, 1u); | ||
| case EF_ASTC_5x5_UNORM_BLOCK: | ||
| case EF_ASTC_5x5_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(5u, 5u, 1u, 1u); | ||
| return hlsl::uint32_t4(5u, 5u, 1u, 1u); | ||
| case EF_ASTC_6x5_UNORM_BLOCK: | ||
| case EF_ASTC_6x5_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(6u, 5u, 1u, 1u); | ||
| return hlsl::uint32_t4(6u, 5u, 1u, 1u); | ||
| case EF_ASTC_6x6_UNORM_BLOCK: | ||
| case EF_ASTC_6x6_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(6u, 6u, 1u, 1u); | ||
| return hlsl::uint32_t4(6u, 6u, 1u, 1u); | ||
| case EF_ASTC_8x5_UNORM_BLOCK: | ||
| case EF_ASTC_8x5_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(8u, 5u, 1u, 1u); | ||
| return hlsl::uint32_t4(8u, 5u, 1u, 1u); | ||
| case EF_ASTC_8x6_UNORM_BLOCK: | ||
| case EF_ASTC_8x6_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(8u, 6u, 1u, 1u); | ||
| return hlsl::uint32_t4(8u, 6u, 1u, 1u); | ||
| case EF_ASTC_8x8_UNORM_BLOCK: | ||
| case EF_ASTC_8x8_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(8u, 8u, 1u, 1u); | ||
| return hlsl::uint32_t4(8u, 8u, 1u, 1u); | ||
| case EF_ASTC_10x5_UNORM_BLOCK: | ||
| case EF_ASTC_10x5_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(10u, 5u, 1u, 1u); | ||
| return hlsl::uint32_t4(10u, 5u, 1u, 1u); | ||
| case EF_ASTC_10x6_UNORM_BLOCK: | ||
| case EF_ASTC_10x6_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(10u, 6u, 1u, 1u); | ||
| return hlsl::uint32_t4(10u, 6u, 1u, 1u); | ||
| case EF_ASTC_10x8_UNORM_BLOCK: | ||
| case EF_ASTC_10x8_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(10u, 8u, 1u, 1u); | ||
| return hlsl::uint32_t4(10u, 8u, 1u, 1u); | ||
| case EF_ASTC_10x10_UNORM_BLOCK: | ||
| case EF_ASTC_10x10_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(10u, 10u, 1u, 1u); | ||
| return hlsl::uint32_t4(10u, 10u, 1u, 1u); | ||
| case EF_ASTC_12x10_UNORM_BLOCK: | ||
| case EF_ASTC_12x10_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(12u, 10u, 1u, 1u); | ||
| return hlsl::uint32_t4(12u, 10u, 1u, 1u); | ||
| case EF_ASTC_12x12_UNORM_BLOCK: | ||
| case EF_ASTC_12x12_SRGB_BLOCK: | ||
| return core::vector4du32_SIMD(12u, 12u, 1u, 1u); | ||
| return hlsl::uint32_t4(12u, 12u, 1u, 1u); | ||
| case EF_PVRTC1_2BPP_UNORM_BLOCK_IMG: | ||
| case EF_PVRTC2_2BPP_SRGB_BLOCK_IMG: | ||
| case EF_PVRTC2_2BPP_UNORM_BLOCK_IMG: | ||
| case EF_PVRTC1_2BPP_SRGB_BLOCK_IMG: | ||
| return core::vector4du32_SIMD(8u, 4u, 1u, 1u); | ||
| return hlsl::uint32_t4(8u, 4u, 1u, 1u); | ||
| case EF_PVRTC1_4BPP_UNORM_BLOCK_IMG: | ||
| case EF_PVRTC2_4BPP_UNORM_BLOCK_IMG: | ||
| case EF_PVRTC1_4BPP_SRGB_BLOCK_IMG: | ||
| case EF_PVRTC2_4BPP_SRGB_BLOCK_IMG: | ||
| return core::vector4du32_SIMD(4u, 4u, 1u, 1u); | ||
| return hlsl::uint32_t4(4u, 4u, 1u, 1u); | ||
| default: | ||
| return core::vector4du32_SIMD(1u); | ||
| return hlsl::uint32_t4(1u); |
There was a problem hiding this comment.
| core::vector3df_SIMD ambient = core::vector3df_SIMD(1.f); | ||
| hlsl::float32_t4 ambient = hlsl::float32_t4(1.f); | ||
| //Kd | ||
| core::vector3df_SIMD diffuse = core::vector3df_SIMD(1.f); | ||
| hlsl::float32_t4 diffuse = hlsl::float32_t4(1.f); | ||
| //Ks | ||
| core::vector3df_SIMD specular = core::vector3df_SIMD(1.f); | ||
| hlsl::float32_t4 specular = hlsl::float32_t4(1.f); | ||
| //Ke | ||
| core::vector3df_SIMD emissive = core::vector3df_SIMD(1.f); | ||
| hlsl::float32_t4 emissive = hlsl::float32_t4(1.f); | ||
| //Tf | ||
| core::vector3df_SIMD transmissionFilter = core::vector3df_SIMD(1.f); | ||
| hlsl::float32_t4 transmissionFilter = hlsl::float32_t4(1.f); |
There was a problem hiding this comment.
use float32_t3 and adjust the static assert at the end
|
btw can you edit the descriptor and let me know if the #760 PR is supposed to be merged/done first or this is an UBER PR which removes old vectors and matrices all at once? |
No description provided.