Le 18/03/2010 23:45, David Megginson a écrit :
> On Thu, Mar 18, 2010 at 5:56 PM, Frederic Bouvier wrote:
>
>   
>>> I noticed the same problem with roads and 3d buildings -- they're
>>> floating above the city.  Is it possible to make the bump maps go up
>>> instead of down?
>>>       
>> In Shaders/urban.frag, change line 57 :
>>
>>        vec2 dp = gl_TexCoord[0].st;
>>
>> into :
>>
>>        vec2 dp = gl_TexCoord[0].st - ds;
>>
>> Tell me what do you think. Try to land in the city.
>>     
> I didn't seem to make any difference -- 3D buildings, trees, etc. were
> still floating above the roofs of the bump-map buildings.  I also
> tried
>
> vec2 dp = gl_TexCoord[0].st + ds;
>
> and
>
> vec2 dp = gl_TexCoord[0].st - 2 * ds;
>   

vec2 dp = gl_TexCoord[0].st - ds;
was indeed correct, but without depth information, the effect was barely
visible. Now I think I managed to get it right with 3d objects. See :
http://frbouvi.free.fr/flightsim/fgfs-city-relief-4.jpg
As already specified, the boundary with other types of terrain will not
improve because of the parallax trickery.

-Fred


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to