提交 96ec75e3 编写于 作者: M Mr.doob

Examples clean up.

上级 8c482dbc
......@@ -42,10 +42,6 @@ var files = {
"webgl_geometry_terrain_raycast",
"webgl_geometry_text",
"webgl_geometry_text_shapes",
"webgl_gpgpu_birds",
"webgl_gpgpu_water",
"webgl_gpgpu_protoplanet",
"webgl_gpu_particle_system",
"webgl_hdr",
"webgl_helpers",
"webgl_interactive_buffergeometry",
......@@ -300,6 +296,10 @@ var files = {
"webgl_custom_attributes_points",
"webgl_custom_attributes_points2",
"webgl_custom_attributes_points3",
"webgl_gpgpu_birds",
"webgl_gpgpu_water",
"webgl_gpgpu_protoplanet",
"webgl_gpu_particle_system",
"webgl_materials_modified",
"webgl_raymarching_reflect",
"webgl_shadowmap_pcss",
......
......@@ -74,6 +74,8 @@
vec4 east = texture2D( heightmap, uv + vec2( cellSize.x, 0.0 ) );
vec4 west = texture2D( heightmap, uv + vec2( - cellSize.x, 0.0 ) );
// https://web.archive.org/web/20080618181901/http://freespace.virgin.net/hugo.elias/graphics/x_water.htm
float newHeight = ( ( north.x + south.x + east.x + west.x ) * 0.5 - heightmapValue.y ) * viscosityConstant;
// Mouse influence
......@@ -182,18 +184,15 @@
gl_FragColor = encode_float( waterLevel );
}
else if ( gl_FragCoord.x < 2.5 ) {
} else if ( gl_FragCoord.x < 2.5 ) {
gl_FragColor = encode_float( normal.x );
}
else if ( gl_FragCoord.x < 3.5 ) {
} else if ( gl_FragCoord.x < 3.5 ) {
gl_FragColor = encode_float( normal.y );
}
else {
} else {
gl_FragColor = encode_float( 0.0 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册