feat: Add Visibility Bitmask method for GTAO (#9101)

* Quick test

* Fix incorrect logic and add some comments

* Set thickness parameter

* refactoring

* Update

* Generated files

* Some comments

* Update

* Update generated files

* Update

* Update

* Add comments
This commit is contained in:
Doris Wu
2025-08-26 16:27:02 -07:00
committed by GitHub
parent 161b75b9b7
commit ff394f7c1b
11 changed files with 201 additions and 28 deletions

View File

@@ -586,6 +586,12 @@ int parse(jsmntok_t const* tokens, int i, const char* jsonChunk, AmbientOcclusio
i = parse(tokens, i + 1, jsonChunk, &out->sampleStepsPerSlice);
} else if (compare(tok, jsonChunk, "thicknessHeuristic") == 0) {
i = parse(tokens, i + 1, jsonChunk, &out->thicknessHeuristic);
} else if (compare(tok, jsonChunk, "useVisibilityBitmasks") == 0) {
i = parse(tokens, i + 1, jsonChunk, &out->useVisibilityBitmasks);
} else if (compare(tok, jsonChunk, "constThickness") == 0) {
i = parse(tokens, i + 1, jsonChunk, &out->constThickness);
} else if (compare(tok, jsonChunk, "linearThickness") == 0) {
i = parse(tokens, i + 1, jsonChunk, &out->linearThickness);
} else {
slog.w << "Invalid Gtao key: '" << STR(tok, jsonChunk) << "'" << io::endl;
i = parse(tokens, i + 1);
@@ -602,7 +608,10 @@ std::ostream& operator<<(std::ostream& out, const AmbientOcclusionOptions::Gtao&
return out << "{\n"
<< "\"sampleSliceCount\": " << int(in.sampleSliceCount) << ",\n"
<< "\"sampleStepsPerSlice\": " << int(in.sampleStepsPerSlice) << ",\n"
<< "\"thicknessHeuristic\": " << (in.thicknessHeuristic) << "\n"
<< "\"thicknessHeuristic\": " << (in.thicknessHeuristic) << ",\n"
<< "\"useVisibilityBitmasks\": " << to_string(in.useVisibilityBitmasks) << ",\n"
<< "\"constThickness\": " << (in.constThickness) << ",\n"
<< "\"linearThickness\": " << to_string(in.linearThickness) << "\n"
<< "}";
}