[Flightgear-devel] Two rendering issues

2013-02-05 Thread Renk Thorsten

I've received two bugreports in the forum for which I would like to ask some 
advice here:


1) The ultra terrain shader makes runway designation signs go away:

http://www.flightgear.org/forums/viewtopic.php?f=47t=18999

It would appear that all the sign boards in airports are driven to grey when 
the highest level terrain shading is used. I have now identified the reason, 
which is that these signs are actually handled by the terrain shader. The 
terrain shader subsequently detects a vertical surface and concludes correctly 
that terrain with such a steep surface can't be anything but rock, so they the 
signs get the rock texture overlay.

Now, one fix of the problem would be to declare the rock overlay texture void 
for all of the signs, so they would never get an overlay, but I feel that the 
root cause of the problem is that sign boards should not be handled by the 
terrain shader in the first place, they should go to a model shader instead, in 
which the whole problem would not arise in the first place because it wouldn't 
try to run all the terrain heuristics.

Is there any compelling reason these signs are handled by terrain shaders? 
Would it be a problem using model-default.eff for the signs rather than 
terrain-default.eff?

2) Flickering in water

http://www.flightgear.org/forums/viewtopic.php?f=68t=18924start=15#p176001

With the sun in the back, under some conditions a strange flickering in the 
water can be observed. Dialling down the amount of direct light, I could verify 
that these are light reflections, they go away when no direct light is 
available, although they appear unnaturally large and blocky.

What bothers me is:

* I have never before observed this flickering, I did hundreds of test flights 
under all possible conditions, I've looked at water from altitude ranges of 
zero to suborbital, I have logged several hours of flights over open water 
since I last changed the shader. Under Windows I have a 1 1/2 months old binary 
in which I am 99% sure the problem does not occur there, although it occurs on 
recent GIT.

* I have not changed the shader code or effect code for more than 3 months

So this would indicate that the problem was caused by some other developement 
and slipped in. Does anyone have an idea as to what this could have been? Were 
there any changes to the water shader files / normal maps/ textures in the 
default rendering scheme (the Atmospheric Light Scattering version uses the 
same files)? Or to the effect files? Could the ATI hack have done something 
weird? Any ideas welcome, I have no good plan of attack for this yet.

Thanks,

* Thorsten
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Two rendering issues

2013-02-05 Thread Emilian Huminiuc
On Tuesday, February 05, 2013 08:17:43 Renk Thorsten wrote:

 2) Flickering in water
 
 http://www.flightgear.org/forums/viewtopic.php?f=68t=18924start=15#p176001
 
 With the sun in the back, under some conditions a strange flickering in the
 water can be observed. Dialling down the amount of direct light, I could
 verify that these are light reflections, they go away when no direct light
 is available, although they appear unnaturally large and blocky.
 
 What bothers me is:
 
 * I have never before observed this flickering, I did hundreds of test
 flights under all possible conditions, I've looked at water from altitude
 ranges of zero to suborbital, I have logged several hours of flights over
 open water since I last changed the shader. Under Windows I have a 1 1/2
 months old binary in which I am 99% sure the problem does not occur there,
 although it occurs on recent GIT.
 
 * I have not changed the shader code or effect code for more than 3 months
 
 So this would indicate that the problem was caused by some other
 developement and slipped in. Does anyone have an idea as to what this could
 have been? Were there any changes to the water shader files / normal maps/
 textures in the default rendering scheme (the Atmospheric Light Scattering
 version uses the same files)? Or to the effect files? Could the ATI hack
 have done something weird? Any ideas welcome, I have no good plan of attack
 for this yet.
 
 Thanks,
 
 * Thorsten

Cannot reproduce here on today's GIT.

Given the intermitent nature of it, I have a possible culprit (but you're not 
going to like it):
-try with the texture fetches outside of the conditionals, see if you (or the 
reporter) can still reproduce it.

Emilian


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Two rendering issues

2013-02-05 Thread Renk Thorsten
 Cannot reproduce here on today's GIT.

 Given the intermitent nature of it, I have a possible culprit (but  
 you're not
 going to like it):
 -try with the texture fetches outside of the conditionals, see if you  
 (or the  reporter) can still reproduce it.

I think I told you a while ago that I learned that particular lesson - no 
texture2D() lookup is currently done (or has been done in the last months) 
inside the conditional block, only the sine wave evaluation is conditional on 
whether  you see their effect or not.

So that's out.

* Thorsten
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Two rendering issues

2013-02-05 Thread Emilian Huminiuc
On Tuesday, February 05, 2013 11:12:14 Renk Thorsten wrote:
  Cannot reproduce here on today's GIT.
  
  Given the intermitent nature of it, I have a possible culprit (but
  you're not
  going to like it):
  -try with the texture fetches outside of the conditionals, see if you
  (or the  reporter) can still reproduce it.
 
 I think I told you a while ago that I learned that particular lesson - no
 texture2D() lookup is currently done (or has been done in the last months)
 inside the conditional block, only the sine wave evaluation is conditional
 on whether  you see their effect or not.
 
 So that's out.
 
 * Thorsten

I think the foam texture is still read in a conditional, based on distance.
(water-lightfield.frag/water-lightfield_lr.frag lines 422-434)

Unfortunately, since I can't reproduce, I can't test if that's the cause of 
the artefacts.

Emilian.

--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Two rendering issues

2013-02-05 Thread Arnt Karlsen
On Tue, 5 Feb 2013 16:36:35 +0100, Arnt wrote in message 
20130205163635.762a1...@celsius.lan:

  Could the ATI hack have done something weird? Any ideas
 welcome, I have no good plan of attack for this yet.

..if you can tell me how to diable it, and enable it, I can 
tell you how both cases look on running the radeon driver.

..last time I saw FG flicker, I was pushing my Radeon 9250 too 
hard, 2048x1536x24(or32?)bpp@59.somethingHz, I had to back off
58.something to lose the flickering.

-- 
..med vennlig hilsen = with Kind Regards from Arnt Karlsen
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.

--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Two rendering issues

2013-02-05 Thread Arnt Karlsen
On Tue, 5 Feb 2013 16:49:44 +0100, Arnt wrote in message 
20130205164944.7c842...@celsius.lan:

 On Tue, 5 Feb 2013 16:36:35 +0100, Arnt wrote in message 
 20130205163635.762a1...@celsius.lan:
 
   Could the ATI hack have done something weird? Any ideas
  welcome, I have no good plan of attack for this yet.
 
 ..if you can tell me how to diable it, and enable it, 

...and preferrably from the commandline ;o)

 I can tell you how both cases look on running the radeon driver.

..er, once I have FG up from bash run_fgfs.sh --geometry=1600x1080 ,
do I have the ATI hack enabled, or disabled?  It looked funny, and
playing with the rendering and shader menus works, but I tried to 
pick a screen shot folder, I got these:
r300: ERROR: FS input WPOS unassigned, not enough hardware slots. (it's
not a bug, do not report it) 
run_fgfs.sh: line 5:  9713 Segmentation fault  ./fgfs
--fg-root=$PWD/../fgdata/ $@

[1]+  Exit 139bash run_fgfs.sh --geometry=1600x1080
arnt@celsius:~/FG-git$ 

 ..last time I saw FG flicker, I was pushing my Radeon 9250 too 
 hard, 2048x1536x24(or32?)bpp@59.somethingHz, I had to back off
 58.something to lose the flickering.

..an error message suggestion: 
r300: ERROR: FS input WPOS unassigned, not enough hardware slots. (it's
not a bug, do not report it) # might read: it's not a FG bug, might be
hardware or graphics drivers?, to help build debug skills and help
debug non-FG errors that now deny us new FG developers.  




-- 
..med vennlig hilsen = with Kind Regards from Arnt Karlsen
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.

--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Two rendering issues

2013-02-05 Thread Renk Thorsten
 I think the foam texture is still read in a conditional, based on  
 distance.
 (water-lightfield.frag/water-lightfield_lr.frag lines 422-434)

You got me there :-) But it turned out not to be the problem... the problem was 
that 

if (condition) {do_stuff();}
(...)
if (condition) {do_other_stuff();}

apparently isn't evaluated correctly in all cases quite independent of texture 
lookups - re-ordering the code into a single block

if (condition)
{
do_stuff();
do_other_stuff();
}

did eliminate the flickering. So your distrust in conditionals wasn't a bad 
lead after all...

I'll commit the bugfix tomorrow.

* Thorsten


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel