-
Notifications
You must be signed in to change notification settings - Fork 190
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
BC7 color ramp interpolation #36
Comments
Hi @lexaknyazev Once completed the results and any changes will be posted alongside this issue report. |
hi @lexaknyazev , using MSDN interpolation by bit shifting will affect the CPU decoder (as shown in the snapshot CPU_Decode_View image attached) and SSIM droped to 0.63. However, GPU decoder is fine ( as shown in the GPU_Decode_View image attached) and SSIM is 0.99. |
Hmmm,.. That looks strange.
Moreover, I couldn't find any other example that shows any difference between these formulas, so it's a bit suspicious that decoded images are that different. |
hi @lexaknyazev, the BC7 ramp calculation either by division and floor VS bit shifting produce same result. My attachment of the snapshot above are incorrect as I forgot the loop for cluster when calculating the ramp with bit shifting as shown by msdn. Both methods produce same result. Please see the latest commit 7ecb80f on the update. Thanks! |
Generation of color ramp uses different math than MSDN example.
Compare:
https://github.com/GPUOpen-Tools/Compressonator/blob/70d7d78f309f762b3c65fd112c2aa06e68ac06c6/Compressonator/Source/Codec/BC7/BC7_utils.cpp#L131-L142
and (from here):
The difference is that MSDN approach avoids floating-point calculations by using right-shift at the end.
This gives different results, e.g.:
The text was updated successfully, but these errors were encountered: