diff --git a/libs/filamat/include/filamat/MaterialBuilder.h b/libs/filamat/include/filamat/MaterialBuilder.h index 767bdecc6fd..f21abe129e4 100644 --- a/libs/filamat/include/filamat/MaterialBuilder.h +++ b/libs/filamat/include/filamat/MaterialBuilder.h @@ -585,8 +585,7 @@ class UTILS_PUBLIC MaterialBuilder : public MaterialBuilderBase { */ MaterialBuilder& optimization(Optimization optimization) noexcept; - // TODO: this is present here for matc's "--print" flag, but ideally does not belong inside - // MaterialBuilder. + // TODO: this is present here for matc's "--print" flag, but ideally does not belong inside MaterialBuilder. //! If true, will output the generated GLSL shader code to stdout. MaterialBuilder& printShaders(bool printShaders) noexcept; diff --git a/libs/filamat/src/MaterialBuilder.cpp b/libs/filamat/src/MaterialBuilder.cpp index 96563bfa6e1..3a8061e4de5 100644 --- a/libs/filamat/src/MaterialBuilder.cpp +++ b/libs/filamat/src/MaterialBuilder.cpp @@ -1368,7 +1368,6 @@ bool MaterialBuilder::checkMaterialLevelFeatures(MaterialInfo const& info) const textureUsedByFilamentCount -= 1; // fog texture } - // TODO: we need constants somewhere for these values if (userSamplerCount > maxTextureCount - textureUsedByFilamentCount) { slog.e << "Error: material \"" << mMaterialName.c_str() << "\" has feature level " << +info.featureLevel diff --git a/libs/filamat/src/shaders/ShaderGenerator.cpp b/libs/filamat/src/shaders/ShaderGenerator.cpp index 63273b952b6..64579927096 100644 --- a/libs/filamat/src/shaders/ShaderGenerator.cpp +++ b/libs/filamat/src/shaders/ShaderGenerator.cpp @@ -489,7 +489,6 @@ std::string ShaderGenerator::createVertexProgram(ShaderModel shaderModel, CodeGenerator::generateSeparator(vs); - // TODO: should we generate per-view SIB in the vertex shader? cg.generateSamplers(vs, DescriptorSetBindingPoints::PER_MATERIAL, material.sib); // shader code diff --git a/libs/utils/include/utils/Allocator.h b/libs/utils/include/utils/Allocator.h index 8e9bed28d65..a3aaf3439ee 100644 --- a/libs/utils/include/utils/Allocator.h +++ b/libs/utils/include/utils/Allocator.h @@ -240,7 +240,6 @@ class FreeList { void push(void* p) noexcept { assert_invariant(p); assert_invariant(p >= mBegin && p < mEnd); - // TODO: assert this is one of our pointer (i.e.: it's address match one of ours) Node* const head = static_cast(p); head->next = mHead; mHead = head; diff --git a/libs/utils/src/CallStack.cpp b/libs/utils/src/CallStack.cpp index 47cb8558db2..3c95701bd28 100644 --- a/libs/utils/src/CallStack.cpp +++ b/libs/utils/src/CallStack.cpp @@ -27,7 +27,6 @@ #include #include -// FIXME: Some platforms do not have execinfo.h #if !defined(__ANDROID__) && !defined(WIN32) && !defined(__EMSCRIPTEN__) #include #define HAS_EXECINFO 1 diff --git a/libs/viewer/src/Settings.cpp b/libs/viewer/src/Settings.cpp index 639d07a2c93..6e8b03998b6 100644 --- a/libs/viewer/src/Settings.cpp +++ b/libs/viewer/src/Settings.cpp @@ -412,21 +412,30 @@ static int parse(jsmntok_t const* tokens, int i, const char* jsonChunk, out->cascadeSplitPositions[0] = splitsVector[0]; out->cascadeSplitPositions[1] = splitsVector[1]; out->cascadeSplitPositions[2] = splitsVector[2]; - // TODO: constantBias - // TODO: normalBias - // TODO: shadowFar - // TODO: shadowNearHint - // TODO: shadowFarHint + } else if (compare(tok, jsonChunk, "constantBias") == 0) { + i = parse(tokens, i + 1, jsonChunk, &out->constantBias); + } else if (compare(tok, jsonChunk, "normalBias") == 0) { + i = parse(tokens, i + 1, jsonChunk, &out->normalBias); + } else if (compare(tok, jsonChunk, "shadowFar") == 0) { + i = parse(tokens, i + 1, jsonChunk, &out->shadowFar); + } else if (compare(tok, jsonChunk, "shadowNearHint") == 0) { + i = parse(tokens, i + 1, jsonChunk, &out->shadowNearHint); + } else if (compare(tok, jsonChunk, "shadowFarHint") == 0) { + i = parse(tokens, i + 1, jsonChunk, &out->shadowFarHint); } else if (compare(tok, jsonChunk, "stable") == 0) { i = parse(tokens, i + 1, jsonChunk, &out->stable); } else if (compare(tok, jsonChunk, "lispsm") == 0) { i = parse(tokens, i + 1, jsonChunk, &out->lispsm); - // TODO: polygonOffsetConstant - // TODO: polygonOffsetSlope + } else if (compare(tok, jsonChunk, "polygonOffsetConstant") == 0) { + i = parse(tokens, i + 1, jsonChunk, &out->polygonOffsetConstant); + } else if (compare(tok, jsonChunk, "polygonOffsetSlope") == 0) { + i = parse(tokens, i + 1, jsonChunk, &out->polygonOffsetSlope); } else if (compare(tok, jsonChunk, "screenSpaceContactShadows") == 0) { i = parse(tokens, i + 1, jsonChunk, &out->screenSpaceContactShadows); - // TODO: stepCount - // TODO: maxShadowDistance + } else if (compare(tok, jsonChunk, "stepCount") == 0) { + i = parse(tokens, i + 1, jsonChunk, &out->stepCount); + } else if (compare(tok, jsonChunk, "maxShadowDistance") == 0) { + i = parse(tokens, i + 1, jsonChunk, &out->maxShadowDistance); } else if (compare(tok, jsonChunk, "vsm") == 0) { i = parse(tokens, i + 1, jsonChunk, &out->vsm); } else if (compare(tok, jsonChunk, "shadowBulbRadius") == 0) { @@ -810,10 +819,19 @@ static std::ostream& operator<<(std::ostream& out, const LightManager::ShadowOpt << "},\n" << "\"mapSize\": " << in.mapSize << ",\n" << "\"shadowCascades\": " << int(in.shadowCascades) << ",\n" - << "\"cascadeSplitPositions\": " << (splitsVector) << "\n" + << "\"cascadeSplitPositions\": " << splitsVector << "\n" + << "\"constantBias\": " << in.constantBias << ",\n" + << "\"normalBias\": " << in.normalBias << ",\n" + << "\"shadowFar\": " << in.shadowFar << ",\n" + << "\"shadowNearHint\": " << in.shadowNearHint << ",\n" + << "\"shadowFarHint\": " << in.shadowFarHint << ",\n" << "\"stable\": " << to_string(in.stable) << ",\n" << "\"lispsm\": " << to_string(in.lispsm) << ",\n" + << "\"polygonOffsetConstant\": " << in.polygonOffsetConstant << ",\n" + << "\"polygonOffsetSlope\": " << in.polygonOffsetSlope << ",\n" << "\"screenSpaceContactShadows\": " << to_string(in.screenSpaceContactShadows) << ",\n" + << "\"stepCount\": " << in.stepCount << ",\n" + << "\"maxShadowDistance\": " << in.maxShadowDistance << ",\n" << "\"shadowBulbRadius\": " << in.shadowBulbRadius << ",\n" << "\"transform\": " << in.transform.xyzw << ",\n" << "}";