Created
August 3, 2017 09:32
-
-
Save greggman/71e081485f2153af2709cc33aaed9ed5 to your computer and use it in GitHub Desktop.
mod your shader in js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getShaderSource(needsBGRA) { | |
const twizzle = needsBGRA ? '.bgra' : ''; | |
return ` | |
... | |
imageColor = texture2D(u_image, v_image_coordinates)${twizzle}; | |
... | |
`; | |
} | |
// or however you want to patch up the shader |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment