transform -1..1 to 0..255
| 161 | |
| 162 | //transform -1..1 to 0..255 |
| 163 | int NormalmapGenerator::mapComponent(double value) const { |
| 164 | return (value + 1.0) * (255.0 / 2.0); |
| 165 | } |
| 166 | |
| 167 | //uses a similar algorithm like "soft light" in PS, |
| 168 | //see http://www.michael-kreil.de/algorithmen/photoshop-layer-blending-equations/index.php |
nothing calls this directly
no outgoing calls
no test coverage detected