Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float mountain(vec3 x)
- {
- vec2 p = x.xz * 0.05;
- float t = 0.0, a = 1.0;
- float dist = smoothstep(0.9, 1.0, 1.0-(length(p)-0.1));
- for (int i=0; i<3; i++){
- float n = (textureLod(iChannel0, p, 0.0).r);
- t += mix(n, dist+n, dist) * a;
- p = mat2(0.8,-0.6,0.6,0.8)*p*2.0+dist*0.3;
- a *= 0.5;
- }
- return max(length(x)-5.0, x.y-t);
- }
- //link to texture: https://cdn.discordapp.com/attachments/658085531397128207/808748224227573850/8979352a182bde7c3c651ba2b2f4e0615de819585cc37b7175bcefbca15a6683.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement