Skip to content

Instantly share code, notes, and snippets.

@Yanrishatum
Created January 6, 2018 17:10
Show Gist options
  • Save Yanrishatum/c4c2cac65bd03b755099c1fffb17db8f to your computer and use it in GitHub Desktop.
Save Yanrishatum/c4c2cac65bd03b755099c1fffb17db8f to your computer and use it in GitHub Desktop.
FD Bug for override completion, unstable, sample.
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.
}
@SlavaRa
Copy link

SlavaRa commented Jan 6, 2018

ok:

@:glFragmentSource(
  )

bug:

@:glFragmentSource(
  
  )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment