Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renderer|FX: Working on basic lens flare shader rendering
Trying to get a simple white quad to appear on screen. This is not quite working yet.
- Loading branch information
Showing
6 changed files
with
201 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
uniform sampler2D uTex; | ||
varying highp vec2 vUV; | ||
|
||
void main(void) { | ||
gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0); | ||
/* | ||
highp vec4 original = texture2D(uTex, vUV); | ||
highp float intens = | ||
(0.2125 * original.r) + | ||
(0.7154 * original.g) + | ||
(0.0721 * original.b); | ||
gl_FragColor = vec4(vec3(intens), 1.0); | ||
if(uFadeInOut < 1.0) { | ||
gl_FragColor = mix(original, gl_FragColor, uFadeInOut); | ||
} | ||
*/ | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
uniform highp mat4 uMvpMatrix; | ||
uniform highp vec2 uViewUnit; | ||
attribute highp vec4 aVertex; | ||
attribute highp vec2 aUV; | ||
attribute highp vec2 aUV2; | ||
varying highp vec2 vUV; | ||
|
||
void main(void) { | ||
gl_Position = (uMvpMatrix * aVertex) + vec4(aUV2 * uViewUnit, 0, 0); | ||
vUV = aUV; | ||
} |
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
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
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