-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
just synching, trying to add some shaders too
- Loading branch information
1 parent
00ad15a
commit bd83cbb
Showing
8 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
Binary file modified
BIN
+1.13 KB
(100%)
...eproj/project.xcworkspace/xcuserdata/kalicious.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
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,21 @@ | ||
|
||
uniform float alphaAmt; | ||
|
||
varying float normPos; | ||
varying float filled; | ||
|
||
/*float map(float value, float inputMin, float inputMax, float outputMin, float outputMax) {; | ||
return clamp( ((value - inputMin) / (inputMax - inputMin) * (outputMax - outputMin) + outputMin), 0.0, 1.0); | ||
}*/ | ||
|
||
void main(){ | ||
|
||
// gl_FragColor = gl_Color; | ||
// gl_FragColor.a = alphaAmt * gl_Color.a; | ||
//float expandedAlpha = map(normPos, 0.0, 1.0, .001, .999); | ||
//float wipeValue = 1.- map(expandedAlpha, alphaAmt-.001, alphaAmt, 0., 1.0); | ||
//float fadeValue = alphaAmt; | ||
//gl_FragColor = vec4(gl_Color.rgb, mix(wipeValue,fadeValue,filled)*gl_Color.a); | ||
|
||
gl_FragColor = gl_Color; | ||
} |
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,15 @@ | ||
//varying vars get passed from the vertex shader to the fragment shader | ||
varying float normPos; | ||
varying float filled; | ||
void main() { | ||
|
||
normPos = gl_Normal.x; | ||
filled = gl_Normal.y; | ||
|
||
gl_TexCoord[0] = gl_MultiTexCoord0; | ||
gl_Position = ftransform(); | ||
|
||
//send vertex colors to the fragment shader | ||
gl_FrontColor = gl_Color; | ||
|
||
} |
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 |
---|---|---|
|
@@ -58,4 +58,6 @@ class lanscapes : public ofBaseApp{ | |
|
||
string message; | ||
|
||
ofShader shader; | ||
|
||
}; |
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