NOR R/G adjustment? #46
-
Hello! Got some rough color correction code done (gets the result within about 1-2 values in either direction for each channel) and now moving onto the final adjustments and getting ready for release phase. One of those adjustments I planned to make is simplifying the existing code from Now my question is due to the fact that this does, unsurprisingly, create a slight difference in the final result, though one that's not really visible to the human eye anyways. But that fact made me wonder.....is it done normally with this slight offset for a particular reason then? Is there some edge case or something that makes it be adjusted by this small amount? Esp if its barely visible in the end result, maybe it has something to do with the internal calculations? I doubt it, but this is one of those things where I wanted to run it by you and Carlos to see if there was possibly a use for this offset that I had missed. Carlos basically shrugged and said it was good enough, and while I basically agree, I do want to check with you just in case. Maybe there's some weird reasons it's like this that I don't know about. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Normal maps are supposed to encode unit vectors with components in the range [-1.0, 1.0]. Full 32 bit floating point tends to be overkill for normals. In practice, people often use 8 bit per channel RGBA textures. The conversion to float is |
Beta Was this translation helpful? Give feedback.
Normal maps are supposed to encode unit vectors with components in the range [-1.0, 1.0]. Full 32 bit floating point tends to be overkill for normals. In practice, people often use 8 bit per channel RGBA textures. The conversion to float is
channel / 255.0 * 2.0 - 1.0
. You can't perfectly represent a final component value of 0.0 since 0.5*255.0 is not an integer. They may be offsetting the value by 1/255.0 or 1/256.0 to account for this. The differences are probably going to be imperceptible either way, so I wouldn't worry about it.