"uniform vec4 uPlayerPos; /* w: distance to uSpawnPos */\n"
"uniform vec4 uSpawnPos; /* w: inverse distance to uPlayerPos */\n"
"uniform bool uAlphatest;\n"
+"uniform float uIsoAmt;\n"
"\n"
"#line 1 1 \n"
"// :D\n"
" return world_compute_lighting( diffuse, normal, co, compute_board_shadow() );\n"
"}\n"
"\n"
-"#line 11 0 \n"
+"#line 12 0 \n"
"#line 1 2 \n"
"const float k_motion_lerp_amount = 0.01;\n"
"\n"
" oMotionVec = (vmotion1-vmotion0) * (1.0/k_motion_lerp_amount);\n"
"}\n"
"\n"
-"#line 12 0 \n"
+"#line 13 0 \n"
"\n"
"vec2 smin( float a, float b, float k ){\n"
" float h = max( k-abs(a-b), 0.0 )/k;\n"
" float d3 = distance(p0,aCo);\n"
" emit += vec3(fract(t*0.2-g_realtime+d3*0.2)*max(0.0,1.0-d3*0.2));\n"
"\n"
-" oColour = vec4( vfrag+emit, 1.0 );\n"
+" vfrag += emit;\n"
+"\n"
+" if( uIsoAmt > 0.0 ){\n"
+" float height = fract( aCo.y * 0.1 );\n"
+" float lg = 2.0*length(vec2(dFdx(height), dFdy(height)));\n"
+" vfrag *= 1.0f+(lg*0.2*uIsoAmt);\n"
+" }\n"
+"\n"
+" oColour = vec4( vfrag, 1.0 );\n"
" //oColour = vec4( vfrag, 1.0 );\n"
"}\n"
""},
static GLuint _uniform_scene_override_uPlayerPos;
static GLuint _uniform_scene_override_uSpawnPos;
static GLuint _uniform_scene_override_uAlphatest;
+static GLuint _uniform_scene_override_uIsoAmt;
static GLuint _uniform_scene_override_g_world_depth;
static GLuint _uniform_scene_override_uLightsArray;
static GLuint _uniform_scene_override_uLightsIndex;
static void shader_scene_override_uAlphatest(int b){
glUniform1i(_uniform_scene_override_uAlphatest,b);
}
+static void shader_scene_override_uIsoAmt(float f){
+ glUniform1f(_uniform_scene_override_uIsoAmt,f);
+}
static void shader_scene_override_g_world_depth(int i){
glUniform1i(_uniform_scene_override_g_world_depth,i);
}
_uniform_scene_override_uPlayerPos = glGetUniformLocation( _shader_scene_override.id, "uPlayerPos" );
_uniform_scene_override_uSpawnPos = glGetUniformLocation( _shader_scene_override.id, "uSpawnPos" );
_uniform_scene_override_uAlphatest = glGetUniformLocation( _shader_scene_override.id, "uAlphatest" );
+ _uniform_scene_override_uIsoAmt = glGetUniformLocation( _shader_scene_override.id, "uIsoAmt" );
_uniform_scene_override_g_world_depth = glGetUniformLocation( _shader_scene_override.id, "g_world_depth" );
_uniform_scene_override_uLightsArray = glGetUniformLocation( _shader_scene_override.id, "uLightsArray" );
_uniform_scene_override_uLightsIndex = glGetUniformLocation( _shader_scene_override.id, "uLightsIndex" );