From: HB-GRAL <fli...@sa...> - 2010-08-07 22:31:52
|
Vivian Meazza schrieb: > > The grey patches are not snow - they denote steep areas; perhaps rock, or a > rock run. They are generated in crop.frag by: > > //"steep = gray" > c1 = mix(vec4(n-0.42, n-0.44, n-0.51, 1.0), c1, smoothstep(0.970, > 0.990, abs(normalize(Normal).z)+nvL[2]*1.3)); > //"snow" > c1 = mix(c1, clamp(n+nvL[2]*4.1+vec4(0.1, 0.1, nvL[2]*2.2, 1.0), > 0.7, 1.0), smoothstep(snowlevel+300.0, snowlevel+360.0, > (rawpos.z)+nvL[1]*3000.0)); > > not a bug but a feature :-) > > Vivian > > p.s. not my code btw > Is it possible to add (or blend) a texture in the shaders to steep= gray instead of calculating a 'simple colour cloud'? In combination with a texture it probably looks like all the 'perhaps' and is a very nice feature. Here recent 'steep = gray'-blobs do not look like rock or rock run or something else at the moment - sorry for my misunderstanding. I see that some landmass reliefs are calculated also with snow. So it should be possible to add a texture to the 'steep=grays' or not? Thanks- Yves |