Created
January 6, 2018 17:10
-
-
Save Yanrishatum/c4c2cac65bd03b755099c1fffb17db8f to your computer and use it in GitHub Desktop.
FD Bug for override completion, unstable, sample.
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
package graphics.shaders; | |
import openfl.display.Shader; | |
/** | |
* ... | |
* @author | |
*/ | |
class BRSwapShader extends Shader | |
{ | |
private var target:Float = 0; | |
private var current:Float = 0; | |
public var speed:Float = 2; | |
@:glVertexSource( | |
" | |
attribute vec4 aPosition; | |
attribute vec2 aTexCoord; | |
varying vec2 vTexCoord; | |
uniform mat4 uMatrix; | |
void main(void) { | |
vTexCoord = aTexCoord; | |
gl_Position = aPosition; | |
}" | |
) | |
@:glFragmentSource( | |
"varying vec2 vTexCoord; | |
uniform sampler2D uImage0; | |
uniform float uSwap; | |
void main(void) { | |
gl_FragColor = texture2D(uImage0, vTexCoord); | |
}" | |
) | |
public function new() | |
{ | |
} | |
// literally anything. Even commentary. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok:
@:glFragmentSource( )
bug:
@:glFragmentSource( )