Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shader warning in debug exposure #663

Merged
merged 1 commit into from
May 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix warning
  • Loading branch information
FrancescoC-unity committed May 29, 2020
commit e1c0c79667003b75a9e264cc2bfeced32c82b5c5
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,15 @@ Shader "Hidden/HDRP/DebugExposure"
uint halfBarSize = barSize / 2;
uint lowerMidPoint = midXPoint - halfBarSize;
uint higherMidPoint = midXPoint + halfBarSize;
if (coordOnX < lowerMidPoint)
if (coordOnX < float(lowerMidPoint))
{
uint distanceFromCenter = lowerMidPoint - coordOnX;
float deltaBinFloat = distanceFromCenter / barSize;
uint deltaInBins = ceil(deltaBinFloat);
locWithinBin = frac(deltaBinFloat) * barSize;
binIndex = centerBin - deltaInBins;
}
else if (coordOnX > higherMidPoint)
else if (coordOnX > float(higherMidPoint))
{
uint distanceFromCenter = coordOnX - higherMidPoint;
float deltaBinFloat = distanceFromCenter / barSize;
Expand Down