Skip to content

Commit 59117a8

Browse files
committed
small fix to oob bug
1 parent 77ec3d5 commit 59117a8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

26_Autoexposure/app_resources/avg_luma_tonemap.comp.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void main(uint32_t3 ID : SV_GroupThreadID, uint32_t3 GroupID : SV_GroupID)
8888
uint32_t2 pos = (glsl::gl_WorkGroupID() * glsl::gl_WorkGroupSize()).xy + coord;
8989
uint32_t texWidth, texHeight;
9090
textureOut.GetDimensions(texWidth, texHeight);
91-
if (any(pos < promote<uint32_t2>(0u)) || any(pos > uint32_t2(texWidth, texHeight)))
91+
if (any(pos < promote<uint32_t2>(0u)) || any(pos >= uint32_t2(texWidth, texHeight)))
9292
return;
9393

9494
float32_t2 uv = (float32_t2)(pos) / pushData.viewportSize;

26_Autoexposure/app_resources/median_luma_tonemap.comp.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void main(uint32_t3 ID : SV_GroupThreadID, uint32_t3 GroupID : SV_GroupID)
9494
uint32_t2 pos = (glsl::gl_WorkGroupID() * glsl::gl_WorkGroupSize()).xy + coord;
9595
uint32_t texWidth, texHeight;
9696
textureOut.GetDimensions(texWidth, texHeight);
97-
if (any(pos < promote<uint32_t2>(0u)) || any(pos > uint32_t2(texWidth, texHeight)))
97+
if (any(pos < promote<uint32_t2>(0u)) || any(pos >= uint32_t2(texWidth, texHeight)))
9898
return;
9999

100100
float32_t2 uv = (float32_t2)(pos) / pushData.viewportSize;

0 commit comments

Comments
 (0)