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

Remove "core::matrixSIMD" #155

Open
wants to merge 54 commits into
base: cameraz
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
42bce0a
move shaders, add new files and shaders for GeoTexture handling
Erfan-Ahmadi Sep 24, 2024
701df7b
proper caching and small shader changes
Erfan-Ahmadi Sep 25, 2024
a8f92ca
Shaders Cleanup and begin implementing GeoTexture Pipeline + It's Sha…
Erfan-Ahmadi Sep 27, 2024
4bf13c8
globals.hlsl
Erfan-Ahmadi Sep 27, 2024
caeb57f
small edits + log sum of buffer sizes
Erfan-Ahmadi Oct 7, 2024
dc81405
Merge branch 'asset_converter' into cad_large_texture_streaming
Erfan-Ahmadi Oct 7, 2024
985dce3
update with using the SIntendedSubmitInfo
Erfan-Ahmadi Oct 7, 2024
bca884e
Small Fix using SIntendedSubmit
Erfan-Ahmadi Oct 18, 2024
83f001f
Hatch improvement/fixes + added tests
Erfan-Ahmadi Oct 18, 2024
482592a
small check for use input validity
Erfan-Ahmadi Oct 18, 2024
3415bb7
full subgroups require X dimension be a multiple of subgroup size
Oct 18, 2024
a69462b
Find cause of https://github.com/microsoft/DirectXShaderCompiler/issu…
Oct 18, 2024
c338018
find out that DXC doesn't like it when you put sized enums together w…
Oct 18, 2024
a2f320e
a day without a DXC bug is a day lost
Oct 19, 2024
a0ce571
shared_exp.hlsl implemented despite all the DXC bugs
Oct 19, 2024
b7e3a69
rgb9e5 encode seems to work
Oct 19, 2024
bd51cce
encode roundtrip test
Oct 19, 2024
07c351b
make the CAS loop
Oct 19, 2024
146a7b4
use float16_t in a shader fur die lulz
Oct 19, 2024
253812c
get an image on screen, and move shared_exp.hlsl to Nabla
Oct 19, 2024
68d1f48
basic tail recursion added
Oct 19, 2024
cb7a348
small changes/edits regarding font face loading
Erfan-Ahmadi Oct 21, 2024
84a1550
fixing handling bad input in addMSDF and hatch.cpp small mistake fix
Erfan-Ahmadi Oct 21, 2024
d21495e
no clue why this crashes DXC
Oct 21, 2024
fedb9c1
Saving work
Przemog1 Oct 21, 2024
bcdaded
formatting
Oct 21, 2024
2488b28
get stuff to compile
Oct 21, 2024
03f1ed4
make the CPU tests run and clean up the code a little bit
Oct 22, 2024
281a8cd
use more `hlsl::uint32_t3` instead of `vectorSIMDu32`
Oct 22, 2024
619d929
make the CPU references screenshot themselves
Oct 22, 2024
cf680b6
make ex 25 compile in debug mode
Oct 22, 2024
36ce6e9
Heavy Documentation and Fixes for AutoSubmit, specially on MSDF LRUCa…
Erfan-Ahmadi Oct 23, 2024
20189b5
adjust to BlitFilter API changes (untested!)
Oct 23, 2024
6b45fec
Modified example 09
Przemog1 Oct 23, 2024
711f960
add a polite reminder about coverage to the uninitiated
Oct 24, 2024
069a220
Changes for emulating bold/italic for glyphs inside the shaders
Erfan-Ahmadi Oct 25, 2024
13df456
Saving work
Przemog1 Oct 25, 2024
ba3b1e8
make the GPU Blit use the asset converter to deal with the input images
Oct 25, 2024
5250d89
Merge pull request #153 from Devsh-Graphics-Programming/blit
devshgraphicsprogramming Oct 25, 2024
0d87de8
Merge branch 'cad_large_texture_streaming'
Erfan-Ahmadi Oct 25, 2024
ab04a34
small cad example edits
Erfan-Ahmadi Oct 25, 2024
d1c0e9f
Saving work
Przemog1 Oct 26, 2024
57d89b3
work out the output blit format
Oct 28, 2024
f6492b0
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla-…
Oct 28, 2024
4735b73
[62.CAD] Example edit to have pipeline specific common.hlsl specific …
Erfan-Ahmadi Oct 28, 2024
e14fde3
[62.CAD] Fix text emulating italic, doing calc in ndc requires accoun…
Erfan-Ahmadi 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
1a694eb
Fixed example 61
Przemog1 Oct 29, 2024
88c3d34
Resolved confilcts, merged cameraz
Przemog1 Nov 1, 2024
424a71a
Resolved conflicts, merged cameraz
Przemog1 Nov 4, 2024
1946d5b
Refactor
Przemog1 Nov 4, 2024
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 @@ -235,9 +237,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 @@ -468,7 +470,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
Loading