# Kraftshade 大解密:我們是怎麼讓 Android 特效“動”起來的 > 📌 Slido 📌 > https://app.sli.do/event/a7sxd3xGxeu45n9Jx3ixxC > 共筆請從這裡開始 Slide link: https://docs.google.com/presentation/d/1HYjql1S6vPTOUlR0AA5QCsQG-_BBMfzvrfEVn15FY6E/edit?usp=sharing Github link: https://github.com/cardinalblue/android-kraft-shade Documentation: https://cardinalblue.github.io/android-kraft-shade/docs/intro/ Medium: https://tech.pic-collage.com/kraftshade-1-unleashing-gpu-power-on-android-a-first-look-6d8c706468f7 - Use Cases - on App - export Image - export Video - How to build - AGSL: cannot export as Image or Video - Vulkan: powerful but only provide C++(Need to learn for a long time) - OpenGL: 廣泛使用 Cross-Platform(Patern一致,但同一套程式碼沒辦法在不同device上一起跑) - OpenGL Render Pipeline - Shader: 執行的程式碼 - 可能會再把輸出的東西丟到Shader跑下一次 - Kraftshade Basic Components - 會用很多的Shader去把fancy的特效畫出來 - Brightness Effect - input - buffer: 可以輸入到任何你要的載體裡面 - Shader疊加: 先做一個再做一個 - Pipeline - Idk - Compose - state去改變view裡面的狀態 - ex. AnimatedView: timeInput改變Blur的程度 - Structure of Kraftshade -  ## Keypoint for Smooth animation - 盡量只用一條GL thread(?) instead of Main thread - 同步不同效果的時間by synchronization ### Pipeline threading ## Animation with Time ### Dirty Flag Pattern - Cache要使用的圖,這樣就不需要等Render - 用過就放dirty flag,如果沒有dirty flag就代表可以直接用Cache的圖,有的話就要生成新的圖 - 確保他是同步的
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up