projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
turbo chaos
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
scene_override.fs
diff --git
a/shaders/scene_override.fs
b/shaders/scene_override.fs
index 60bf90d9c962cf25ac5f2e38f48bad2e7f398f27..2ab8d8daccdc5d92c54130bb4cb4d77d01a15858 100644
(file)
--- a/
shaders/scene_override.fs
+++ b/
shaders/scene_override.fs
@@
-6,6
+6,7
@@
uniform vec4 uPlane;
uniform vec4 uPlayerPos; /* w: distance to uSpawnPos */
uniform vec4 uSpawnPos; /* w: inverse distance to uPlayerPos */
uniform bool uAlphatest;
uniform vec4 uPlayerPos; /* w: distance to uSpawnPos */
uniform vec4 uSpawnPos; /* w: inverse distance to uPlayerPos */
uniform bool uAlphatest;
+uniform float uIsoAmt;
#include "common_scene.glsl"
#include "motion_vectors_fs.glsl"
#include "common_scene.glsl"
#include "motion_vectors_fs.glsl"
@@
-64,6
+65,15
@@
void main(){
float d3 = distance(p0,aCo);
emit += vec3(fract(t*0.2-g_realtime+d3*0.2)*max(0.0,1.0-d3*0.2));
float d3 = distance(p0,aCo);
emit += vec3(fract(t*0.2-g_realtime+d3*0.2)*max(0.0,1.0-d3*0.2));
- oColour = vec4( vfrag+emit, 1.0 );
+ vfrag += emit;
+
+ if( uIsoAmt > 0.0 ){
+ float height = fract( aCo.y * 0.1 );
+ float lg = 2.0*length(vec2(dFdx(height), dFdy(height)));
+ vfrag *= 1.0f+(lg*0.4*uIsoAmt);
+ }
+
+
+ oColour = vec4( vfrag, 1.0 );
//oColour = vec4( vfrag, 1.0 );
}
//oColour = vec4( vfrag, 1.0 );
}