projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dont try to load nothign
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
scene_override.fs
diff --git
a/shaders/scene_override.fs
b/shaders/scene_override.fs
index 2ab8d8daccdc5d92c54130bb4cb4d77d01a15858..42e97b47fab9168214df4fa5844f087efd87d6e0 100644
(file)
--- a/
shaders/scene_override.fs
+++ b/
shaders/scene_override.fs
@@
-6,7
+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;
+uniform
vec4 uMapInfo; /* x: min, y: max, z: iso line amount */
#include "common_scene.glsl"
#include "motion_vectors_fs.glsl"
#include "common_scene.glsl"
#include "motion_vectors_fs.glsl"
@@
-28,7
+28,11
@@
void main(){
float dither = fract( vDither.g / 71.0 ) - 0.5;
float dcam = (-8.0+distance( aCo, uCamera ))/4.0;
float dither = fract( vDither.g / 71.0 ) - 0.5;
float dcam = (-8.0+distance( aCo, uCamera ))/4.0;
- if( min(aCo.y*0.5 + dither, dcam + dither) < 0.51 ) discard;
+ float dy0 = aCo.y - uMapInfo.x;
+ float dy1 = uMapInfo.y - aCo.y;
+
+ if( min(min(dy0,dy1)*0.5, dcam) + dither < 0.51 )
+ discard;
compute_motion_vectors();
compute_motion_vectors();
@@
-67,13
+71,12
@@
void main(){
vfrag += emit;
vfrag += emit;
- if( u
IsoAmt
> 0.0 ){
+ if( u
MapInfo.z
> 0.0 ){
float height = fract( aCo.y * 0.1 );
float lg = 2.0*length(vec2(dFdx(height), dFdy(height)));
float height = fract( aCo.y * 0.1 );
float lg = 2.0*length(vec2(dFdx(height), dFdy(height)));
- vfrag *= 1.0f+(lg*0.
4*uIsoAmt
);
+ vfrag *= 1.0f+(lg*0.
2*uMapInfo.z
);
}
}
-
oColour = vec4( vfrag, 1.0 );
//oColour = vec4( vfrag, 1.0 );
}
oColour = vec4( vfrag, 1.0 );
//oColour = vec4( vfrag, 1.0 );
}