TheThinMatrix / LowPolyTerrain

A demonstration of 4 possible techniques for generating and rendering a low-poly terrain.
The Unlicense
63 stars 17 forks source link

8 bit = 256 #1

Closed brean closed 6 years ago

brean commented 6 years ago

Hi,

Maybe I am wrong but to convert colors shouldn't this be 256 instead of 255? https://github.com/TheThinMatrix/LowPolyTerrain/blob/c8a8f75101c58f4a50e550751ab3af610ef3aa87/OpenGlWrapper/utils/Colour.java#L28

TheThinMatrix commented 6 years ago

8 bits gives 256 possible values, which gives us numbers from 0 to 255. The highest possible value for a colour is therefore 255 which is why 255 is used here.