Skip to content

Commit fc1f2a4

Browse files
committed
Adapt lighting to Intel Sponza.
1 parent dfc5062 commit fc1f2a4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/apps/ch11_voxel/ch11_voxel/Scene.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ void loadToBuffer(const renderer::EntitiesBlock_glsl & aData,
5555
//const renderer::ReferencePath gModelPaths[] = {renderer::ReferencePath{"models/pica-pica-mini-diorama-01/sketchfab_gltf/scene.gltf"}};
5656
//constexpr float gModelScale = 10.f;
5757

58+
// ATTENTION: seems thath the tangent space is in the wrong handedness (LHS) after loading with Assimp
59+
// Note: Assimpl GLTF2 importer is supposed to apply the handedness factor stored in tangent.w.
60+
// We should read the actual tangent data from the file to be certain, but it might be the file is created wrong.
5861
const renderer::ReferencePath gModelPaths[] = {
5962
renderer::ReferencePath{"models/Intel_Sponza/pkg_a_curtains/NewSponza_Curtains_glTF.gltf"},
6063
renderer::ReferencePath{"models/Intel_Sponza/NewSponza_Main_glTF_003-No_Decals.gltf"},

src/apps/ch11_voxel/ch11_voxel/Scene.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ struct Scene
144144

145145
renderer::LightsDataCommon mLights{
146146
.mDirectionalCount = 1,
147-
.mPointCount = 1,
147+
.mPointCount = 0,
148148
// We decode a sRGB 50% white (which is also perceptually ~50%)
149149
// to linear space for computation.
150150
.mAmbientColor = math::decode_sRGB(math::hdr::gWhite<float> * 0.25f),
@@ -157,7 +157,7 @@ struct Scene
157157
.mDirection = math::UnitVec<3, float>{ {0.1f, -0.94f, 0.325f} },
158158
// TODO: decode the srgb value to have it show correctly in Imgui
159159
// (and have it perceptually proportional to the factor)
160-
.mColors = renderer::LightColors_glsl{} * 5,
160+
.mColors = renderer::LightColors_glsl{} * 8,
161161
},
162162
},
163163
.mPointLights = {

0 commit comments

Comments
 (0)