Fix #117977: EEVEE-Next: Broken shadows with 1GB pool size
shadow_page_unpack clamps the result to a valid page range, causing all pages that shouldn't be rendered to render to the last valid page. Pull Request: https://projects.blender.org/blender/blender/pulls/118979
This commit is contained in:
@@ -58,6 +58,12 @@ void main()
|
||||
uint page_packed = render_map_buf[render_page_index];
|
||||
|
||||
ivec3 page = ivec3(shadow_page_unpack(page_packed));
|
||||
/* If the page index is invalid this page shouldn't be rendered,
|
||||
* however shadow_page_unpack clamps the result to a valid page.
|
||||
* Instead of doing an early return (and introducing branching),
|
||||
* we simply ensure the page layer is out-of-bounds. */
|
||||
page.z = page_packed < SHADOW_MAX_PAGE ? page.z : -1;
|
||||
|
||||
ivec3 out_texel = ivec3((page.xy << page_shift) | texel_page, page.z);
|
||||
|
||||
uint u_depth = floatBitsToUint(f_depth);
|
||||
|
||||
Reference in New Issue
Block a user