Skip to content

Commit

Permalink
VSM, GUI, and material additions:
Browse files Browse the repository at this point in the history
- Added basic PCF to VSM
- Added UI window to modify materials
- Added basic scene info to UI
- Added support for normal scale
- Added face normals to g-buffer for effects that need it (such as shadow map bias)
  • Loading branch information
JuanDiegoMontoya committed Nov 3, 2023
1 parent d9a50bf commit b8489c4
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 53 deletions.
12 changes: 9 additions & 3 deletions data/config/defaultLayout.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DockId=0x00000007,0
Pos=337,24
Size=1233,1056
Collapsed=0
DockId=0x00000001,1
DockId=0x00000001,0

[Window][###mag]
Pos=0,703
Expand Down Expand Up @@ -86,12 +86,18 @@ Size=335,404
Collapsed=0
DockId=0x0000000E,0

[Window][ Materials##materials_window]
Pos=0,297
Size=335,404
Collapsed=0
DockId=0x0000000E,1

[Docking][Data]
DockSpace ID=0x4BBE4C7A Window=0x4647B76E Pos=0,24 Size=1920,1056 Split=X Selected=0xE87781F4
DockNode ID=0x00000005 Parent=0x4BBE4C7A SizeRef=335,1056 Split=Y Selected=0x6A2E32C2
DockNode ID=0x0000000B Parent=0x00000005 SizeRef=213,677 Split=Y Selected=0x6A2E32C2
DockNode ID=0x0000000D Parent=0x0000000B SizeRef=335,271 Selected=0x30110D95
DockNode ID=0x0000000E Parent=0x0000000B SizeRef=335,404 Selected=0x45442227
DockNode ID=0x0000000D Parent=0x0000000B SizeRef=335,271 Selected=0x6A2E32C2
DockNode ID=0x0000000E Parent=0x0000000B SizeRef=335,404 Selected=0x77FA9016
DockNode ID=0x0000000C Parent=0x00000005 SizeRef=213,377 Selected=0x213C89B5
DockNode ID=0x00000006 Parent=0x4BBE4C7A SizeRef=1583,1056 Split=X
DockNode ID=0x00000001 Parent=0x00000006 SizeRef=1233,1056 CentralNode=1 Selected=0x91EB2F4F
Expand Down
89 changes: 73 additions & 16 deletions data/shaders/ShadeDeferredPbr.frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ float GetShadowBias(vec3 N, vec3 L, float texelWidth)
return quantize + b * length(cross(N, L)) / NoL;
}

float CalcVsmShadowBias(uint clipmapLevel, vec3 faceNormal)
{
const float magicClipmapLevelBias = 0.1;
const float magicConstantBias = 2.0 / (1 << 23);
const float halfOrthoFrustumLength = clipmapUniforms.projectionZLength / 2;
const float shadowTexelSize = exp2(clipmapLevel + (clipmapLevel * magicClipmapLevelBias)) * clipmapUniforms.firstClipmapTexelLength;
const float bias = magicConstantBias + GetShadowBias(faceNormal, -shadingUniforms.sunDir.xyz, shadowTexelSize) / halfOrthoFrustumLength;

return bias;
}

struct ShadowVsmOut
{
float shadow;
Expand Down Expand Up @@ -105,13 +116,9 @@ ShadowVsmOut ShadowVsm(vec3 fragWorldPos, vec3 normal)
const uint physicalAddress = GetPagePhysicalAddress(ret.pageData);
ret.shadowDepth = LoadPageTexel(pageTexel, physicalAddress);

const float magicClipmapLevelBias = 0.1;
const float magicConstantBias = 2.0 / (1 << 23);
const float halfOrthoFrustumLength = clipmapUniforms.projectionZLength / 2;
const float shadowTexelSize = exp2(addr.clipmapLevel + (addr.clipmapLevel * magicClipmapLevelBias)) * clipmapUniforms.firstClipmapTexelLength;
const float bias = magicConstantBias + GetShadowBias(normal, -shadingUniforms.sunDir.xyz, shadowTexelSize) / halfOrthoFrustumLength;
const float bias = min(0.03, CalcVsmShadowBias(addr.clipmapLevel, normal));

if (ret.shadowDepth + min(0.03, bias) < ret.projectedDepth)
if (ret.shadowDepth + bias < ret.projectedDepth)
{
ret.shadow = 0.0;
return ret;
Expand All @@ -121,6 +128,53 @@ ShadowVsmOut ShadowVsm(vec3 fragWorldPos, vec3 normal)
return ret;
}

float ShadowVsmPcf(vec3 fragWorldPos, vec3 flatNormal)
{
const ivec2 gid = ivec2(gl_FragCoord.xy);
const float depthSample = texelFetch(s_gDepth, gid, 0).x;
PageAddressInfo addr = GetClipmapPageFromDepth(depthSample, gid, textureSize(s_gDepth, 0));



const float bias = min(0.03, CalcVsmShadowBias(addr.clipmapLevel, flatNormal));

float lightOcclusion = 0.0;

for (uint i = 0; i < shadowUniforms.pcfSamples; i++)
{
vec2 xi = fract(Hammersley(i, shadowUniforms.pcfSamples) + hash(gl_FragCoord.xy) + shadingUniforms.random);
float r = sqrt(xi.x);
float theta = xi.y * 2.0 * 3.14159;
vec2 offset = shadowUniforms.pcfRadius * vec2(r * cos(theta), r * sin(theta));

const vec2 vsmOffsetUv = fract(addr.vsmUv + offset);
const ivec2 vsmTexel = ivec2(vsmOffsetUv * imageSize(i_pageTables).xy * PAGE_SIZE);
const ivec2 vsmPage = vsmTexel / PAGE_SIZE;
const ivec2 pageTexel = vsmTexel % PAGE_SIZE;
const uint pageData = imageLoad(i_pageTables, ivec3(vsmPage, addr.pageAddress.z)).x;
if (!GetIsPageBacked(pageData))
{
lightOcclusion += 1.0;
continue;
//return 1.0;
}

//const ivec2 pageTexel = ivec2((addr.pageUv + offset) * PAGE_SIZE);
const uint physicalAddress = GetPagePhysicalAddress(pageData);
float lightDepth = LoadPageTexel(pageTexel, physicalAddress);


//float lightDepth = textureLod(s_rsmDepth, uv + offset, 0).x;
lightDepth += bias;
if (lightDepth >= addr.projectedDepth)
{
lightOcclusion += 1.0;
}
}

return (lightOcclusion / shadowUniforms.pcfSamples);
}

float ShadowPCF(vec2 uv, float viewDepth, float bias)
{
float lightOcclusion = 0.0;
Expand Down Expand Up @@ -236,27 +290,30 @@ vec3 LocalLightIntensity(vec3 viewDir, Surface surface)

void main()
{
vec3 albedo = textureLod(s_gAlbedo, v_uv, 0.0).rgb;
vec3 normal = textureLod(s_gNormal, v_uv, 0.0).xyz;
float depth = textureLod(s_gDepth, v_uv, 0.0).x;
vec3 emission = textureLod(s_emission, v_uv, 0.0).rgb;
vec3 metallicRoughnessAo = textureLod(s_metallicRoughnessAo, v_uv, 0.0).rgb;
const vec3 albedo = textureLod(s_gAlbedo, v_uv, 0.0).rgb;
const vec4 normalOctAndFlatNormalOct = textureLod(s_gNormal, v_uv, 0.0).xyzw;
const vec3 normal = OctToVec3(normalOctAndFlatNormalOct.xy);
const vec3 flatNormal = OctToVec3(normalOctAndFlatNormalOct.zw);
const float depth = textureLod(s_gDepth, v_uv, 0.0).x;
const vec3 emission = textureLod(s_emission, v_uv, 0.0).rgb;
const vec3 metallicRoughnessAo = textureLod(s_metallicRoughnessAo, v_uv, 0.0).rgb;

if (depth == FAR_DEPTH)
{
discard;
}

vec3 fragWorldPos = UnprojectUV_ZO(depth, v_uv, perFrameUniforms.invViewProj);
const vec3 fragWorldPos = UnprojectUV_ZO(depth, v_uv, perFrameUniforms.invViewProj);

vec3 incidentDir = -shadingUniforms.sunDir.xyz;
float cosTheta = max(0.0, dot(incidentDir, normal));
vec3 diffuse = albedo * cosTheta * shadingUniforms.sunStrength.rgb;
const vec3 incidentDir = -shadingUniforms.sunDir.xyz;
const float cosTheta = max(0.0, dot(incidentDir, normal));
const vec3 diffuse = albedo * cosTheta * shadingUniforms.sunStrength.rgb;

//float shadow = Shadow(fragWorldPos, normal, -shadingUniforms.sunDir.xyz);
ShadowVsmOut shadowVsm = ShadowVsm(fragWorldPos, normal);
ShadowVsmOut shadowVsm = ShadowVsm(fragWorldPos, flatNormal);
float shadowSun = shadowVsm.shadow;
//shadowSun = 0;
shadowSun = ShadowVsmPcf(fragWorldPos, flatNormal);

vec3 viewDir = normalize(perFrameUniforms.cameraPos.xyz - fragWorldPos);

Expand Down
9 changes: 8 additions & 1 deletion data/shaders/Utility.h.glsl
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
#ifndef UTILITY_H
#define UTILITY_H

vec3 OctToFloat32x3(vec2 e)
vec3 OctToVec3(vec2 e)
{
vec3 v = vec3(e.xy, 1.0 - abs(e.x) - abs(e.y));
vec2 signNotZero = vec2((v.x >= 0.0) ? +1.0 : -1.0, (v.y >= 0.0) ? +1.0 : -1.0);
if (v.z < 0.0) v.xy = (1.0 - abs(v.yx)) * signNotZero;
return normalize(v);
}

vec2 Vec3ToOct(vec3 v)
{
vec2 p = vec2(v.x, v.y) * (1.0 / (abs(v.x) + abs(v.y) + abs(v.z)));
vec2 signNotZero = vec2((p.x >= 0.0) ? 1.0 : -1.0, (p.y >= 0.0) ? 1.0 : -1.0);
return (v.z <= 0.0) ? ((1.0 - abs(vec2(p.y, p.x))) * signNotZero) : p;
}

// 14-vertex CCW triangle strip in [0, 1]
vec3 CreateCube(in uint vertexID)
{
Expand Down
4 changes: 3 additions & 1 deletion data/shaders/shadows/vsm/VsmCommon.h.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ bool CullQuadVsm(vec2 minXY, vec2 maxXY, uint virtualTableIndex)
struct PageAddressInfo
{
ivec3 pageAddress;
vec2 pageUv;
vec2 pageUv; // UV within a single page
float projectedDepth;
uint clipmapLevel;
vec2 vsmUv; // UV within the whole VSM
};

// Analyzes the provided depth buffer and returns and address and data of a page.
Expand Down Expand Up @@ -192,6 +193,7 @@ PageAddressInfo GetClipmapPageFromDepth(float depth, ivec2 gid, ivec2 depthBuffe
addr.pageUv = tableSize * mod(posLightUv, 1.0 / tableSize);
addr.projectedDepth = posLightC.z / posLightC.w;
addr.clipmapLevel = clipmapLevel;
addr.vsmUv = posLightUv;

return addr;
}
Expand Down
1 change: 1 addition & 0 deletions data/shaders/visbuffer/VisbufferCommon.h.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ struct GpuMaterial
vec3 emissiveFactor;
float emissiveStrength;
uvec2 baseColorTextureHandle;
float normalXyScale;
};

layout (std430, binding = 0) restrict readonly buffer MeshletDataBuffer
Expand Down
25 changes: 8 additions & 17 deletions data/shaders/visbuffer/VisbufferResolve.frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ layout(location = 1) in flat uint i_materialId;

layout(location = 0) out vec4 o_albedo;
layout(location = 1) out vec3 o_metallicRoughnessAo;
layout(location = 2) out vec3 o_normal;
layout(location = 2) out vec4 o_normalAndFaceNormal;
layout(location = 3) out vec3 o_emission;
layout(location = 4) out vec2 o_motion;

Expand Down Expand Up @@ -126,9 +126,9 @@ vec2[3] VisbufferLoadUv(in uint[3] indexIds, in uint vertexOffset)
vec3[3] VisbufferLoadNormal(in uint[3] indexIds, in uint vertexOffset)
{
return vec3[3](
OctToFloat32x3(unpackSnorm2x16(vertices[vertexOffset + indexIds[0]].normal)),
OctToFloat32x3(unpackSnorm2x16(vertices[vertexOffset + indexIds[1]].normal)),
OctToFloat32x3(unpackSnorm2x16(vertices[vertexOffset + indexIds[2]].normal))
OctToVec3(unpackSnorm2x16(vertices[vertexOffset + indexIds[0]].normal)),
OctToVec3(unpackSnorm2x16(vertices[vertexOffset + indexIds[1]].normal)),
OctToVec3(unpackSnorm2x16(vertices[vertexOffset + indexIds[2]].normal))
);
}

Expand Down Expand Up @@ -196,16 +196,6 @@ vec4 SampleBaseColor(in GpuMaterial material, in UvGradient uvGrad)
textureGrad(s_baseColor, uvGrad.uv, uvGrad.ddx, uvGrad.ddy).rgba;
}

vec3 SampleNormal(in GpuMaterial material, in UvGradient uvGrad, vec3 faceNormal, mat3 tbn)
{
if (!bool(material.flags & MATERIAL_HAS_NORMAL))
{
return faceNormal;
}
vec3 tangentNormal = textureGrad(s_baseColor, uvGrad.uv, uvGrad.ddx, uvGrad.ddy).rgb * 2.0 - 1.0;
return tbn * faceNormal;
}

vec2 SampleMetallicRoughness(in GpuMaterial material, in UvGradient uvGrad)
{
vec2 metallicRoughnessFactor = vec2(material.metallicFactor, material.roughnessFactor);
Expand Down Expand Up @@ -250,7 +240,7 @@ vec3 SampleNormal(in GpuMaterial material, in UvGradient uvGrad)
// This allows compatibility with both RG and RGB tangent space normal maps.
vec2 xy = textureGrad(s_normal, uvGrad.uv, uvGrad.ddx, uvGrad.ddy).rg * 2.0 - 1.0;
float z = sqrt(max(1.0 - xy.x * xy.x - xy.y * xy.y, 0.0));
return vec3(xy, z);
return vec3(xy * material.normalXyScale, z);
}

void main()
Expand Down Expand Up @@ -280,7 +270,7 @@ void main()
);
const PartialDerivatives partialDerivatives = ComputeDerivatives(clipPosition, i_uv * 2.0 - 1.0, resolution);
const UvGradient uvGrad = MakeUvGradient(partialDerivatives, rawUv);
//const vec3 normal = normalize(cross(rawPosition[1] - rawPosition[0], rawPosition[2] - rawPosition[0]));
const vec3 flatNormal = normalize(cross(rawPosition[1] - rawPosition[0], rawPosition[2] - rawPosition[0]));

vec3 smoothNormal = normalize(InterpolateVec3(partialDerivatives, rawNormal));
mat3 normalMatrix = inverse(transpose(mat3(transform)));
Expand Down Expand Up @@ -315,7 +305,8 @@ void main()
o_metallicRoughnessAo = vec3(
SampleMetallicRoughness(material, uvGrad),
SampleOcclusion(material, uvGrad));
o_normal = normal;
o_normalAndFaceNormal.xy = Vec3ToOct(normal);
o_normalAndFaceNormal.zw = Vec3ToOct(flatNormal);
o_emission = SampleEmission(material, uvGrad);
o_motion = MakeSmoothMotion(partialDerivatives, worldPosition);
}
20 changes: 12 additions & 8 deletions src/FrogRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ FrogRenderer::FrogRenderer(const Application::CreateInfo& createInfo, std::optio
//Utility::LoadModelFromFileMeshlet(scene, "H:/Repositories/glTF-Sample-Models/downloaded schtuff/building0.glb", glm::scale(glm::vec3{.05f}), true);
//Utility::LoadModelFromFileMeshlet(scene, "H:/Repositories/glTF-Sample-Models/downloaded schtuff/terrain.glb", glm::scale(glm::vec3{0.125f}), true);
//Utility::LoadModelFromFileMeshlet(scene, "H:/Repositories/glTF-Sample-Models/downloaded schtuff/terrain2_compressed.glb", glm::scale(glm::translate(glm::vec3(0, 100, 0)), glm::vec3{1000.0f}), true);
//Utility::LoadModelFromFileMeshlet(scene, "H:/Repositories/glTF-Sample-Models/downloaded schtuff/terrain2_compressed.glb", glm::scale(glm::vec3{1.0f}), true);
//Utility::LoadModelFromFileMeshlet(scene, "H:/Repositories/glTF-Sample-Models/downloaded schtuff/powerplant.glb", glm::scale(glm::vec3{1.0f}), true);

//Utility::LoadModelFromFileMeshlet(scene, "H:/Repositories/glTF-Sample-Models/2.0/Sponza/glTF/Sponza.gltf", glm::scale(glm::vec3{.5}), false);
Expand Down Expand Up @@ -232,7 +233,7 @@ FrogRenderer::FrogRenderer(const Application::CreateInfo& createInfo, std::optio
{
return m.gpuMaterial;
});
materialStorageBuffer = Fwog::TypedBuffer<Utility::GpuMaterial>(materials);
materialStorageBuffer = Fwog::TypedBuffer<Utility::GpuMaterial>(materials, Fwog::BufferStorageFlag::DYNAMIC_STORAGE);

std::vector<ObjectUniforms> meshUniforms;
for (size_t i = 0; i < scene.transforms.size(); i++)
Expand Down Expand Up @@ -324,11 +325,11 @@ void FrogRenderer::OnWindowResize(uint32_t newWidth, uint32_t newHeight)
// Create gbuffer textures and render info
frame.gAlbedo = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::R8G8B8A8_SRGB, "gAlbedo");
frame.gMetallicRoughnessAo = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::R8G8B8_UNORM, "gMetallicRoughnessAo");
frame.gNormal = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::R16G16B16_SNORM, "gNormal");
frame.gNormalAndFaceNormal = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::R16G16B16A16_SNORM, "gNormalAndFaceNormal");
frame.gEmission = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::R11G11B10_FLOAT, "gEmission");
frame.gDepth = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::D32_FLOAT, "gDepth");
frame.gMotion = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::R16G16_FLOAT, "gMotion");
frame.gNormalPrev = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::R16G16B16_SNORM);
frame.gNormalPrev = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::R16G16B16A16_SNORM);
frame.gDepthPrev = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::D32_FLOAT);
frame.colorHdrRenderRes = Fwog::CreateTexture2D({renderWidth, renderHeight}, Fwog::Format::R11G11B10_FLOAT, "colorHdrRenderRes");
frame.colorHdrWindowRes = Fwog::CreateTexture2D({newWidth, newHeight}, Fwog::Format::R11G11B10_FLOAT, "colorHdrWindowRes");
Expand All @@ -339,7 +340,7 @@ void FrogRenderer::OnWindowResize(uint32_t newWidth, uint32_t newHeight)
frame.gAlbedoSwizzled = frame.gAlbedo->CreateSwizzleView({.a = Fwog::ComponentSwizzle::ONE});
frame.gRoughnessMetallicAoSwizzled = frame.gMetallicRoughnessAo->CreateSwizzleView({.a = Fwog::ComponentSwizzle::ONE});
frame.gEmissionSwizzled = frame.gEmission->CreateSwizzleView({.a = Fwog::ComponentSwizzle::ONE});
frame.gNormalSwizzled = frame.gNormal->CreateSwizzleView({.a = Fwog::ComponentSwizzle::ONE});
frame.gNormalSwizzled = frame.gNormalAndFaceNormal->CreateSwizzleView({.a = Fwog::ComponentSwizzle::ONE});
frame.gDepthSwizzled = frame.gDepth->CreateSwizzleView({.a = Fwog::ComponentSwizzle::ONE});
}

Expand Down Expand Up @@ -403,6 +404,9 @@ void FrogRenderer::OnUpdate([[maybe_unused]] double dt)

tonemapUniformBuffer.UpdateData(tonemapUniforms);
vsmContext.UpdateUniforms(vsmUniforms);
auto gpuMaterials = std::vector<Utility::GpuMaterial>(scene.materials.size());
std::ranges::transform(scene.materials, gpuMaterials.begin(), [](const auto& mat) { return mat.gpuMaterial; });
materialStorageBuffer->UpdateData(gpuMaterials);
}

static glm::vec2 GetJitterOffset(
Expand Down Expand Up @@ -482,7 +486,7 @@ void FrogRenderer::OnRender([[maybe_unused]] double dt)
{
ZoneScoped;
std::swap(frame.gDepth, frame.gDepthPrev);
std::swap(frame.gNormal, frame.gNormalPrev);
std::swap(frame.gNormalAndFaceNormal, frame.gNormalPrev);

shadingUniforms.sunDir = glm::vec4(PolarToCartesian(sunElevation, sunAzimuth), 0);
shadingUniforms.sunStrength = glm::vec4{sunStrength * sunColor, 0};
Expand Down Expand Up @@ -730,7 +734,7 @@ void FrogRenderer::OnRender([[maybe_unused]] double dt)
.loadOp = Fwog::AttachmentLoadOp::DONT_CARE,
},
{
.texture = frame.gNormal.value(),
.texture = frame.gNormalAndFaceNormal.value(),
.loadOp = Fwog::AttachmentLoadOp::DONT_CARE,
},
{
Expand Down Expand Up @@ -833,7 +837,7 @@ void FrogRenderer::OnRender([[maybe_unused]] double dt)
Fwog::MemoryBarrier(Fwog::MemoryBarrierBit::IMAGE_ACCESS_BIT | Fwog::MemoryBarrierBit::SHADER_STORAGE_BIT | Fwog::MemoryBarrierBit::TEXTURE_FETCH_BIT);
Fwog::Cmd::BindGraphicsPipeline(shadingPipeline);
Fwog::Cmd::BindSampledImage("s_gAlbedo", *frame.gAlbedo, nearestSampler);
Fwog::Cmd::BindSampledImage("s_gNormal", *frame.gNormal, nearestSampler);
Fwog::Cmd::BindSampledImage("s_gNormal", *frame.gNormalAndFaceNormal, nearestSampler);
Fwog::Cmd::BindSampledImage("s_gDepth", *frame.gDepth, nearestSampler);
// Fwog::Cmd::BindSampledImage("s_rsmIndirect", frame.rsm->GetIndirectLighting(), nearestSampler);
// Fwog::Cmd::BindSampledImage("s_rsmDepth", rsmDepth, nearestSampler);
Expand Down Expand Up @@ -1011,7 +1015,7 @@ void FrogRenderer::OnRender([[maybe_unused]] double dt)
if (glfwGetKey(window, GLFW_KEY_F1) == GLFW_PRESS)
tex = &frame.gAlbedo.value();
if (glfwGetKey(window, GLFW_KEY_F2) == GLFW_PRESS)
tex = &frame.gNormal.value();
tex = &frame.gNormalAndFaceNormal.value();
if (glfwGetKey(window, GLFW_KEY_F3) == GLFW_PRESS)
tex = &frame.gDepth.value();
if (tex)
Expand Down
4 changes: 3 additions & 1 deletion src/FrogRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ class FrogRenderer final : public Application
void GuiDrawCameraWindow();
void GuiDrawShadowWindow();
void GuiDrawViewer();
void GuiDrawMaterialsArray();

void CullMeshletsForView(const View& view, std::string_view name = "Cull Meshlet Pass");

Expand Down Expand Up @@ -223,7 +224,8 @@ class FrogRenderer final : public Application
// G-buffer textures
std::optional<Fwog::Texture> gAlbedo;
std::optional<Fwog::Texture> gMetallicRoughnessAo;
std::optional<Fwog::Texture> gNormal;
std::optional<Fwog::Texture> gNormalAndFaceNormal;
std::optional<Fwog::Texture> gFaceNormal;
std::optional<Fwog::Texture> gEmission;
std::optional<Fwog::Texture> gMotion;
std::optional<Fwog::Texture> gDepth;
Expand Down
Loading

0 comments on commit b8489c4

Please sign in to comment.