Removed extra float in vertex

This commit is contained in:
Antoine Pilote
2023-07-26 15:46:20 -04:00
parent 4cdaaacecb
commit afb06e382f
7 changed files with 28 additions and 35 deletions

View File

@@ -85,7 +85,6 @@ namespace Nuake
bufferLayout.Push<float>(3); // Normal
bufferLayout.Push<float>(3); // Tangent
bufferLayout.Push<float>(3); // Bitangent
bufferLayout.Push<float>(1); // Texture
m_VertexArray->AddBuffer(*m_VertexBuffer, bufferLayout);
m_VertexArray->Unbind();

View File

@@ -6,10 +6,12 @@
#include "src/Rendering/Buffers/Framebuffer.h"
#include "src/Rendering/PostFX/Bloom.h"
#include "src/Rendering/PostFX/Volumetric.h"
#include <src/Rendering/PostFX/SSR.h>
#include "src/Rendering/PostFX/SSR.h"
namespace Nuake {
class SceneRenderer {
namespace Nuake
{
class SceneRenderer
{
public:
void Init();
void Cleanup();
@@ -32,7 +34,7 @@ namespace Nuake {
Scope<FrameBuffer> mShadingBuffer;
Scope<FrameBuffer> mToneMapBuffer;
private:
void ShadowPass(Scene& scene);
void GBufferPass(Scene& scene);
void ShadingPass(Scene& scene);

View File

@@ -3,15 +3,13 @@
namespace Nuake
{
class Vertex
struct Vertex
{
public:
Vector3 position;
Vector2 uv;
Vector3 normal;
Vector3 tangent;
Vector3 bitangent;
float texture;
};
struct LineVertex

View File

@@ -82,7 +82,6 @@ namespace Nuake
for (uint32_t i = 0; i < mesh->mNumVertices; i++)
{
Vertex vertex;
vertex.texture = 1.0f;
Vector3 current;

View File

@@ -83,7 +83,7 @@ namespace Nuake {
Vector2(0,0),
vertexNormal,
vertexTangent,
glm::vec3(0.0, 1.0, 0.0), 0.0f
glm::vec3(0.0, 1.0, 0.0)
});
}
@@ -162,7 +162,7 @@ namespace Nuake {
vertexUV,
vertexNormal,
vertexTangent,
glm::vec3(0.0, 1.0, 0.0), 0.0f
glm::vec3(0.0, 1.0, 0.0)
});
}
@@ -296,8 +296,7 @@ namespace Nuake {
vertexUV,
vertexNormal,
vertexTangent,
glm::vec3(0.0, 1.0, 0.0),
0.0f
glm::vec3(0.0, 1.0, 0.0)
}
);
}
@@ -564,12 +563,11 @@ namespace Nuake {
Vector3 vertexBitangent = glm::cross(vertexNormal, vertexTangent) * (float)vertex.tangent.w;
vertices.push_back(Vertex {
vertexPos * (1.0f/64.0f),
vertexPos * (1.0f / 64.0f),
vertexUV,
vertexNormal,
vertexTangent,
vertexBitangent,
0.0f
vertexBitangent
});
}

View File

@@ -260,7 +260,6 @@ namespace Nuake
{
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
//io.Fonts->AddFontDefault();
io.Fonts->AddFontFromFileTTF("resources/Fonts/OpenSans-Regular.ttf", 16.0);
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;

View File

@@ -1,7 +1,7 @@
#pragma once
#include "Core/Core.h"
#include "Core/Timestep.h"
#include "Core/Maths.h"
#include "Core/Timestep.h"
struct GLFWwindow;
@@ -12,21 +12,6 @@ namespace Nuake
class Window
{
private:
const std::string DEFAULT_TITLE = "Untitled Window";
const uint32_t DEFAULT_WIDTH = 1280;
const uint32_t DEFAULT_HEIGHT = 720;
GLFWwindow* m_Window;
std::string m_Title;
uint32_t m_Width;
uint32_t m_Height;
Vector2 m_Position;
Ref<FrameBuffer> m_Framebuffer;
Ref<Scene> m_Scene;
public:
Window();
~Window() = default;
@@ -37,10 +22,8 @@ namespace Nuake
bool ShouldClose();
int Init();
void Update(Timestep ts);
void FixedUpdate(Timestep ts);
void Draw();
void EndDraw();
@@ -65,7 +48,22 @@ namespace Nuake
void SetVSync(bool enabled);
void SetDecorated(bool enabled);
private:
const std::string DEFAULT_TITLE = "Untitled Window";
const uint32_t DEFAULT_WIDTH = 1280;
const uint32_t DEFAULT_HEIGHT = 720;
GLFWwindow* m_Window;
std::string m_Title;
uint32_t m_Width;
uint32_t m_Height;
Vector2 m_Position;
Ref<FrameBuffer> m_Framebuffer;
Ref<Scene> m_Scene;
void InitImgui();
};
}