Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9dec34e
Initial plan
Copilot Jan 13, 2026
7735033
Add lighting, shadow mapping, shader manager, render pass, and post-p…
Copilot Jan 13, 2026
0270bd4
Add advanced texture support, compute shader utilities, and GPU-drive…
Copilot Jan 13, 2026
b48d071
Fix code review issues: add missing includes, fix stencil format, imp…
Copilot Jan 13, 2026
46c40df
Add implementation summary documentation
Copilot Jan 13, 2026
149c6bc
Rename AdvancedTexture to Texture for simplicity
Copilot Jan 13, 2026
8f35d69
Add ProfilerPanel and ShaderEditor for enhanced development tools
Copilot Jan 13, 2026
722321b
Enhance ImGui layer with profiler panel, shader editor, and custom st…
Copilot Jan 13, 2026
0a4de15
Remove unused shaders and layers
Jan 13, 2026
b8d285a
Enable automatic shader loading in Shader Editor from ShaderManager
Copilot Jan 13, 2026
d2f7afb
Add automatic shader loading in Shader Editor when Materials are created
Copilot Jan 13, 2026
ed82401
Fix build errors: use interface pattern to avoid circular dependencie…
Copilot Jan 13, 2026
e7c9581
Add StatsPanel and MaterialEditor with ImGui integration
Copilot Jan 13, 2026
c2af14f
Add comprehensive editor panels documentation
Copilot Jan 13, 2026
0072834
Implement live preview for editors, memory tracking system, and viewp…
Copilot Jan 13, 2026
45b46d4
Fix build errors: define OpenGL extension constants, use SetMat4 inst…
Copilot Jan 14, 2026
65fcd73
Add Model Viewer panel with real-time 3D preview and property inspection
Copilot Jan 14, 2026
6b15ecc
Fix build errors: add SetProjectionType to Camera, add DrawPreviewSph…
Copilot Jan 14, 2026
fa0721f
WIP: NFD + choc implemented + fixed shaders locations
Jan 14, 2026
819e131
Add FileSystem utility class with NFD integration for file dialogs an…
Copilot Jan 14, 2026
15172e4
Integrate FileSystem utility into editor panels for native file dialogs
Copilot Jan 14, 2026
1969a1f
Fix NFD-Extended API usage to match actual library interface
Copilot Jan 14, 2026
7f53c53
Fix Windows API macro conflicts and NFD pathSet declaration
Copilot Jan 14, 2026
ab05ec0
WIP: compiles, loads the model but doesnt preview it.
Jan 14, 2026
dea9504
WIP: added framebuffer class and changed the viewport
Jan 14, 2026
3260d62
Refactor editor panels to use new Framebuffer and Viewport classes pr…
Copilot Jan 14, 2026
74e9667
WIP: remove old framebuffer statements, and fixed some namespace prob…
Jan 14, 2026
bcf9fba
Add UniformBuffer support to ModelPanel and MaterialEditor for proper…
Copilot Jan 14, 2026
195b59c
Add preview mesh rendering (sphere/cube) to ModelPanel and MaterialEd…
Copilot Jan 14, 2026
71a7348
WIP: weird things happening with agent
Jan 14, 2026
00e1bc0
WIP: added another layer to test model upload, render and textures.
Jan 18, 2026
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
path = Core/vendor/tracy/tracy
url = https://github.com/wolfpld/tracy
branch = v0.9.1
[submodule "Core/vendor/NFD-Extended/NFD-Extended"]
path = Core/vendor/NFD-Extended/NFD-Extended
url = https://github.com/btzy/nativefiledialog-extended
83 changes: 0 additions & 83 deletions App/Resources/Shaders/Flame.frag.glsl

This file was deleted.

12 changes: 0 additions & 12 deletions App/Resources/Shaders/Fullscreen.vert.glsl

This file was deleted.

12 changes: 0 additions & 12 deletions App/Resources/Shaders/FullscreenQuad.vert.glsl

This file was deleted.

85 changes: 0 additions & 85 deletions App/Resources/Shaders/ProceduralFlame.frag.glsl

This file was deleted.

15 changes: 0 additions & 15 deletions App/Resources/Shaders/Texture.frag.glsl

This file was deleted.

128 changes: 128 additions & 0 deletions App/Resources/Shaders/TexturedModel.frag.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
#version 450 core

in vec2 v_UV;
in vec3 v_WorldPos;
in vec3 v_NormalWS;

uniform int u_HasAlbedo;
uniform int u_HasNormal;
uniform int u_HasMR;
uniform int u_HasAO;
uniform int u_HasEmissive;

uniform sampler2D u_AlbedoTex;
uniform sampler2D u_NormalTex;
uniform sampler2D u_MRTex; // assume ORM packed: R=AO, G=Roughness, B=Metallic (glTF)
uniform sampler2D u_AOTex; // optional separate AO
uniform sampler2D u_EmissiveTex;

uniform vec4 u_BaseColorFactor;
uniform float u_MetallicFactor;
uniform float u_RoughnessFactor;

out vec4 o_Color;

vec3 SRGBToLinear(vec3 c) { return pow(c, vec3(2.2)); }
vec3 LinearToSRGB(vec3 c) { return pow(c, vec3(1.0/2.2)); }

vec3 GetNormalWS()
{
vec3 N = normalize(v_NormalWS);

if (u_HasNormal == 0)
return N;

// Build TBN from derivatives (no tangent attribute required)
vec3 dp1 = dFdx(v_WorldPos);
vec3 dp2 = dFdy(v_WorldPos);
vec2 duv1 = dFdx(v_UV);
vec2 duv2 = dFdy(v_UV);

vec3 T = normalize(dp1 * duv2.y - dp2 * duv1.y);
vec3 B = normalize(-dp1 * duv2.x + dp2 * duv1.x);

mat3 TBN = mat3(T, B, N);

vec3 nTS = texture(u_NormalTex, v_UV).xyz * 2.0 - 1.0;
return normalize(TBN * nTS);
}

// tiny GGX helpers
float D_GGX(float NoH, float a)
{
float a2 = a*a;
float d = (NoH*NoH)*(a2-1.0) + 1.0;
return a2 / (3.14159 * d * d);
}
float V_SmithGGX(float NoV, float NoL, float a)
{
float a2 = a*a;
float gv = NoL * sqrt(NoV*(NoV - NoV*a2) + a2);
float gl = NoV * sqrt(NoL*(NoL - NoL*a2) + a2);
return 0.5 / max(gv + gl, 1e-6);
}
vec3 F_Schlick(vec3 F0, float VoH)
{
return F0 + (1.0 - F0) * pow(1.0 - VoH, 5.0);
}

void main()
{
vec3 base = vec3(0.8);
if (u_HasAlbedo == 1)
base = SRGBToLinear(texture(u_AlbedoTex, v_UV).rgb);

base *= u_BaseColorFactor.rgb;

float ao = 1.0;
float rough = 0.8;
float metal = 0.0;

if (u_HasMR == 1)
{
vec3 orm = texture(u_MRTex, v_UV).rgb;
ao = orm.r;
rough = orm.g;
metal = orm.b;
}

if (u_HasAO == 1)
ao = texture(u_AOTex, v_UV).r;

rough = clamp(rough * u_RoughnessFactor, 0.04, 1.0);
metal = clamp(metal * u_MetallicFactor, 0.0, 1.0);

vec3 N = GetNormalWS();
vec3 V = normalize(vec3(0.0, 0.0, 1.0)); // ok-ish placeholder if you don't have camera pos in shader
// If you can pass camera position, use: normalize(u_CameraPos - v_WorldPos)

vec3 L = normalize(vec3(0.4, 0.8, 0.2));
vec3 H = normalize(V + L);

float NoL = max(dot(N, L), 0.0);
float NoV = max(dot(N, V), 0.001);
float NoH = max(dot(N, H), 0.001);
float VoH = max(dot(V, H), 0.001);

vec3 F0 = mix(vec3(0.04), base, metal);

float a = rough * rough;
vec3 F = F_Schlick(F0, VoH);
float D = D_GGX(NoH, a);
float G = V_SmithGGX(NoV, NoL, a);

vec3 spec = (D * G) * F;
vec3 kd = (1.0 - F) * (1.0 - metal);
vec3 diff = kd * base / 3.14159;

vec3 color = (diff + spec) * NoL;

// emissive
if (u_HasEmissive == 1)
color += SRGBToLinear(texture(u_EmissiveTex, v_UV).rgb);

// cheap ambient with AO
color += base * 0.03 * ao;

o_Color = vec4(LinearToSRGB(color), 1.0);
}
24 changes: 24 additions & 0 deletions App/Resources/Shaders/TexturedModel.vert.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#version 450 core

layout(location = 0) in vec3 a_Position;
layout(location = 1) in vec3 a_Normal;
layout(location = 2) in vec2 a_TexCoord;

layout(std140, binding = 0) uniform FrameData { mat4 u_ViewProjection; };
layout(std140, binding = 1) uniform ObjectData { mat4 u_Model; };

out vec2 v_UV;
out vec3 v_WorldPos;
out vec3 v_NormalWS;

void main()
{
vec4 wp = u_Model * vec4(a_Position, 1.0);
v_WorldPos = wp.xyz;
v_UV = a_TexCoord;

// ok for uniform scaling; if you do non-uniform later, use inverse transpose
v_NormalWS = mat3(u_Model) * a_Normal;

gl_Position = u_ViewProjection * wp;
}
14 changes: 0 additions & 14 deletions App/Resources/Shaders/Transform.vert.glsl

This file was deleted.

Loading