Upgrade to Pro — share decks privately, control downloads, hide ads and more …

UIViewで光の三原色の混ざり合いを表現したい / potatotips 75 Blend Mode

M"e
August 12, 2021

UIViewで光の三原色の混ざり合いを表現したい / potatotips 75 Blend Mode

M"e

August 12, 2021
Tweet

More Decks by M"e

Other Decks in Programming

Transcript

  1. 6*7JFXͰޫͷࡾݪ৭ͷࠞ͟Γ߹͍
    Λදݱ͍ͨ͠
    QPUBUPUJQT
    ͑ΜͲ͏גࣜձࣾ;0;0ςΫϊϩδʔζ

    View full-size slide

  2. 3(#@$-0$,
    ੺ɺ྘ɺ੨ͷ਑͕ॏͳΔͱɺޫͷࡾݪ৭ͷ

    ࠞ͟Γ߹ָ͍͕͠ΊΔ࣌ܭ
    IUUQTHJUIVCDPN&OEPV.BSJ3(#@$-0$,
    ݩωλIUUQTUXJUUFSDPNNJUJSVYYYTUBUVT

    View full-size slide

  3. ޫͷࡾݪ৭ͷࠞ͟Γ߹͍͸"MQIBઃఆͰ͸දݱͰ͖ͳ͍
    MFUSFE7JFX6*7JFX

    SFE7JFXCBDLHSPVOE$PMPSSFE
    MFUHSFFO7JFX6*7JFX

    HSFFO7JFXCBDLHSPVOE$PMPSHSFFO
    HSFFO7JFXBMQIB
    MFUCMVF7JFX6*7JFX

    CMVF7JFXCBDLHSPVOE$PMPSCMVF
    CMVF7JFXBMQIB

    View full-size slide

  4. ࠓ೔࿩͢͜ͱ
    6*7JFXͰޫͷࡾݪ৭ͷࠞ͟Γ߹͍Λ
    දݱ͢Δํ๏ʹ͍ͭͯ

    View full-size slide

  5. දݱ͍ͨ͜͠ͱ
    7JFX͕ॏͳ͍ͬͯΔՕॴͷ৭Λ
    ม͍͑ͨ
    ੺྘ˠԫ৭
    ੺྘੨ˠന
    ॏͳΔͱ໌Δ͘ͳΔ

    View full-size slide

  6. ॏͳͬͨ7JFXͷඳը
    ॏͳ্ͬͨͷWJFX͕

    ͦͷ··දࣔ͞Ε͍ͯΔ

    View full-size slide

  7. ॏͳ্ͬͨͷWJFX͕

    ͦͷ··දࣔ͞Ε͍ͯΔ
    ॏͳͬͨ7JFXͷඳը
    ͕͜͜มΘΕ͹࣮ݱͰ͖Δ
    ͦͷ··Ͱ͸ͳ͘ɺ৭Λม͑ͯදࣔͯ͠ཉ͍͠

    View full-size slide

  8. ॏͳͬͨ7JFXΛ

    Ͳ͏ඳը͢Δ͔ͷํ͕ࣜ͋Δ

    View full-size slide

  9. #MFOE.PEFͬͯԿʁ
    ͭͷϨΠϠʔ͕ޓ͍ʹͲͷΑ͏ʹ߹੒͞ΕΔ͔Λ
    ܾఆ͢ΔͨΊͷઃఆ
    /PSNBMɺ.VMUJQMZɺ4DSFFOɺɾɾɾFUD
    ߹੒͢Δܭࢉ͕ࣜ͋Δ

    View full-size slide

  10. എܠ લܠ
    ࢀߟIUUQTEFWFMPQFSBQQMFDPNMJCSBSZBSDIJWFEPDVNFOUBUJPO(SBQIJDT*NBHJOH$PODFQUVBMESBXJOHXJUIRVBSU[EER@JNBHFTER@JNBHFTIUNM

    View full-size slide

  11. લܠͷWJFX͕ͦͷ··දࣔ͞ΕΔ
    G എܠ৭ લܠ৭
    લܠ৭
    2VBSU[ͷσϑΥϧτઃఆ
    /PSNBM#MFOE.PEF

    View full-size slide

  12. എܠͷ৭ͱલܠͷ৭ͷ৐ࢉ
    G എܠ৭ લܠ৭
    എܠ৭લܠ৭
    ݁Ռͷը૾ͷ৭͸҉͘ͳΔ
    .VMUJQMZ#MFOE.PEF

    View full-size slide

  13. എܠͷ൓సͨ͠৭ͱલܠͷ൓సͨ͠
    ৭ͷ৐ࢉ
    G എܠ৭ લܠ৭


    ɹɹɹɹɹ എܠ৭
    લܠ৭

    ॏͶΔͱݩͷը૾ΑΓ໌Δ͘ͳΔ
    4DSFFO#MFOE.PEF

    View full-size slide

  14. 7JFXΛॏͶͨͱ͖ʹ໌Δ͍ͨ͘͠ͷͰ
    4DSFFO#MFOE.PEFΛ࢖༻

    View full-size slide

  15. Ͳ͏΍ͬͯઃఆ͢Δͷ͔ʁ

    View full-size slide

  16. $($POUFYUͷTFU#MFOE.PEF
    PWFSSJEFGVODESBX @SFDU$(3FDU
    \
    ੺ԁΛඳը
    DPOUFYUCFHJO1BUI

    DPOUFYUBEE&MMJQTF JOSFDU

    DPOUFYUDMPTF1BUI

    DPOUFYUTFU'JMM$PMPS 6*$PMPSSFEDH$PMPS

    DPOUFYU
    fi
    MM1BUI

    #MFOE.PEFΛTDSFFOʹઃఆͯ͠ޫͷࡾݪ৭Λ࠶ݱ
    DPOUFYUTFU#MFOE.PEF TDSFFO


    ྘ԁΛඳը
    ɹɹɹɹɹɹɹ
    ੨ԁΛඳը
    ^

    View full-size slide

  17. $($POUFYUͷTFU#MFOE.PEF
    PWFSSJEFGVODESBX @SFDU$(3FDU
    \
    ੺ԁΛඳը
    DPOUFYUCFHJO1BUI

    DPOUFYUBEE&MMJQTF JOSFDU

    DPOUFYUDMPTF1BUI

    DPOUFYUTFU'JMM$PMPS 6*$PMPSSFEDH$PMPS

    DPOUFYU
    fi
    MM1BUI

    #MFOE.PEFΛTDSFFOʹઃఆͯ͠ޫͷࡾݪ৭Λ࠶ݱ
    DPOUFYUTFU#MFOE.PEF TDSFFO


    ྘ԁΛඳը
    ɹɹɹɹɹɹɹ
    ੨ԁΛඳը
    ^

    View full-size slide

  18. $($POUFYUͷTFU#MFOE.PEF

    View full-size slide

  19. $($POUFYUͷ#MFOE.PEF
    ຕͷ7JFXʹඳը͞Ε͍ͯΔ

    View full-size slide

  20. $($POUFYUͷ#MFOE.PEF
    7JFXͦΕͧΕʹ
    #MFOE.PEFΛઃఆ͍ͨ͠

    View full-size slide

  21. DPNQPTJUJOH'JMUFS
    $"-BZFSͷϓϩύςΟ
    WBSDPNQPTJUJOH'JMUFS"OZ \HFUTFU^
    ϨΠϠʔͱͦͷഎޙʹ͋ΔίϯςϯπΛ߹੒͢Δͨ
    Ίʹ࢖༻͞ΕΔ$PSF*NBHFϑΟϧλʔ
    IUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPO
    RVBSU[DPSFDBMBZFSDPNQPTJUJOH
    fi
    MUFS

    View full-size slide

  22. DPNQPTJUJOH'JMUFS
    MFUSFE7JFX6*7JFX

    SFE7JFXCBDLHSPVOE$PMPSSFE
    MFUHSFFO7JFX6*7JFX

    HSFFO7JFXCBDLHSPVOE$PMPSHSFFO
    HSFFO7JFXMBZFSDPNQPTJUJOH'JMUFSTDSFFO#MFOE.PEF
    MFUCMVF7JFX6*7JFX

    CMVF7JFXCBDLHSPVOE$PMPSCMVF
    CMVF7JFXMBZFSDPNQPTJUJOH'JMUFSTDSFFO#MFOE.PEF

    View full-size slide

  23. DPNQPTJUJOH'JMUFS

    View full-size slide

  24. DPNQPTJUJOH'JMUFS

    View full-size slide

  25. ਑͕ॏͳͬͨͱ͖ͷ
    ޫͷࡾݪ৭ͷࠞ͟Γ߹͍Λ࠶ݱͰ͖ͨ✨

    View full-size slide

  26. ·ͱΊ
    7JFX͕ॏͳ͍ͬͯΔͱ͖Ͳ͏ඳը͢Δ͔͸#MFOE.PEFͰܾ
    ΊΔ͜ͱ͕Ͱ͖Δ
    4DSFFO#MFOE.PEFΛ࢖༻͢Δͱޫͷࡾݪ৭ͷࠞ͟Γ߹͍
    ͱࣅ͍ͯΔ݁ՌʹͳΔ
    $($POUFYUͷTFU#MFOE.PEF͸ઃఆͨ͠#MFOE.PEFͰඳը
    ͨ݁͠ՌΛಘΒΕΔ
    7JFXʹ#MFOE.PEFΛઃఆ͢Δʹ͸$"-BZFSͷ
    DPNQPTJUJOH'JMUFSΛ࢖༻͢Δ

    View full-size slide