aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_node.h
Commit message (Expand)AuthorAge
* Replace instances of std::map<std::string, std::string> with StringMapkwolekr2015-05-19
* Pass pointed_thing to on_punch and minetest.register_on_punchnode callbacksShadowNinja2014-01-23
* Weather supportproller2013-07-27
* Fix class/struct forward declaration inconsistencies (good on ya, MSVC)Kahrl2013-06-06
* Move scriptapi to separate folder (by sapier)sapier2013-05-25
.x, uv.y - step)).r; float bl = texture2D(normalTexture, vec2(uv.x - step, uv.y - step)).r; float l = texture2D(normalTexture, vec2(uv.x - step, uv.y)).r; float dX = (tr + 2.0 * r + br) - (tl + 2.0 * l + bl); float dY = (bl + 2.0 * b + br) - (tl + 2.0 * t + tr); vec4 bump = vec4 (normalize(vec3 (dX, dY, 0.1)),1.0); float height = 2.0 * texture2D(normalTexture, vec2(uv.x, uv.y)).r - 1.0; vec4 base = texture2D(baseTexture, uv).rgba; vec3 L = normalize(vec3(0.0, 0.75, 1.0)); float specular = pow(clamp(dot(reflect(L, bump.xyz), yawVec), 0.0, 1.0), 1.0); float diffuse = dot(yawVec, bump.xyz); vec3 color = (1.1 * diffuse + 0.05 * height + 0.5 * specular) * base.rgb; vec4 col = vec4(color.rgb, base.a); col *= gl_Color; gl_FragColor = vec4(col.rgb, base.a); }