챕터 4의 내용을 토대로 입력 기반을 cin 에서,
실시간 입력으로 바꾸었다.
칸단위에서 도트단위로 이동하는 방법을 생각 중.
실시간 입력으로 바꾸었다.
칸단위에서 도트단위로 이동하는 방법을 생각 중.
오늘은 소프트웨어 알파 블랜딩과 add 효과를 완료 했다.
예전에 포토샵의 레이어를 이용한 스크린 효과 공식을 본게 있었는데, 그게 이거 였구나...
| Blend mode | Commutativity | Formula | Addtl .info |
| Darken | commutative | R = min(Target,Blend) | |
| Multiply | commutative | R = Target x Blend | |
| Color Burn | non-commutative | R = 1 - (1-Target) / Blend | |
| Linear Burn | commutative | R = Target + Blend - 1 | |
| Lighten | commutative | R = max(Target,Blend) | |
| Screen | commutative | R = 1 - (1-Target) x (1-Blend) | |
| Color Dodge | non-commutative | R = Target / (1-Blend) | |
| Linear Dodge | commutative | R = Target + Blend | |
| Overlay | non-commutative | if (Target > ½) R = 1 - (1-2x(Target-½)) x (1-Blend) if (Target <= ½) R = (2xTarget) x Blend | A combination of multiply and screen.Also the same as Hard Light commuted |
| Soft Light | non-commutative | if (Blend > ½) R = 1 - (1-Target) x (1-(Blend-½)) if (Blend <= ½) R = Target x (Blend+½) | A combination of multiply and screen(The formula is only approximate) |
| Hard Light | non-commutative | if (Blend > ½) R = 1 - (1-Target) x (1-2x(Blend-½)) if (Blend <= ½) R = Target x (2xBlend) | A combination of multiply and screen. Also the same as Overlay commuted |
| Vivid Light | non-commutative | if (Blend > ½) R = 1 - (1-Target) / (2x(Blend-½)) if (Blend <= ½) R = Target / (1-2xBlend) | A combination of color burn and color dodge |
| Linear Light | non-commutative | if (Blend > ½) R = Target + 2x(Blend-½) if (Blend <= ½) R = Target + 2xBlend - 1 | A combination of linear burn and linear dodge |
| Pin Light | non-commutative | if (Blend > ½) R = max(Target,2x(Blend-½)) if (Blend <= ½) R = min(Target,2xBlend)) | A combination of darken and lighten |
| Difference | commutative | R = | Target - Blend | | |
| Exclusion | commutative | R = ½ - 2x(Target-½)x(Blend-½) |
최근 덧글