This PR silences console output during statup phase of blender. During
startup logging isn't yet initialized and print statements where used.
Logging is initialized during the first construction of a Metal Context.
The console prints are now hidden by behind the '--debug-gpu' command
line option.
Pull Request: #108593
- DRW_draw_region_engine_info:
- Remove duplicate line drawing for the last line.
- Remove string copying, pass the length to BLF_draw_default instead.
- Resolve a potential buffer overflow as the source string length was
used to define the destinations maximum size.
- CONSOLE_OT_paste:
- Remove the need to null-terminate each line.
- Buffer stepping uses const values
- console_line_insert no longer strips the string it inserts.
- CONSOLE_OT_insert:
- New lines in the middle of text now reports an error,
new lines at the end of text is stripped (as before).
Returning the pointer to the null byte when the character isn't found
is useful when handling null terminated strings that contain newlines.
This means the return value is never null and the line span always ends
at the resulting value.
While the multiscattering GGX code is cool and solves the darkening problem at higher roughnesses, it's also currently buggy, hard to maintain and often impractical to use due to the higher noise and render time.
In practice, though, having the exact correct directional distribution is not that important as long as the overall albedo is correct and we a) don't get the darkening effect and b) do get the saturation effect at higher roughnesses.
This can simply be achieved by adding a second lobe (https://blog.selfshadow.com/publications/s2017-shading-course/imageworks/s2017_pbs_imageworks_slides_v2.pdf) or scaling the single-scattering GGX lobe (https://blog.selfshadow.com/publications/turquin/ms_comp_final.pdf). Both approaches require the same precomputation and produce outputs of comparable quality, so I went for the simple albedo scaling since it's easier to implement and more efficient.
Overall, the results are pretty good: All scenarios that I tested (Glossy BSDF, Glass BSDF, Principled BSDF with metallic or transmissive = 1) pass the white furnace test (a material with pure-white color in front of a pure-white background should be indistinguishable from the background if it preserves energy), and the overall albedo for non-white materials matches that produced by the real multi-scattering code (with the expected saturation increase as the roughness increases).
In order to produce the precomputed tables, the PR also includes a utility that computes them. This is not built by default, since there's no reason for a user to run it (it only makes sense for documentation/reproducibility purposes and when making changes to the microfacet models).
Pull Request: #107958
Produce optimal layouts for `n` squares, where n == 11, 18, 19 and 26.
With thanks:
* Walter Trump
* Pertti Hamalainen
* Robert Wainwright
* Erich Friedman
The additional SocktType::VECTOR argument was being interpreted as flags,
which caused the OSL compiler to skip the input (since the Vector type enum
happens to align with the INTERNAL flag), which caused the OSL shader to
always use the hardcoded default absorption regardless of what was entered.
Add support for index buffers as subrange. When an index buffer
is a subrange it should bind the source buffer and use the index start
as an offset in the buffer.