Big bugs in 1.5.0 Pre 2

Report bugs, bug fixes and workarounds here.
Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #41by selden » 15.05.2007, 10:43

Unfortunately, after rebuilding without the "complex cloud shaders", an eclipse with cloud shadows enabled still turns the Earth red.

Instructions to reproduce:

run Celestia, going to Earth
open eclipse finder
click on "compute"
double click on any of the resulting dates
toggle "Cloud shadows"
watch the color of the Earth change.
Selden

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #42by chris » 15.05.2007, 10:49

selden wrote:Unfortunately, after rebuilding without the "complex cloud shaders", an eclipse with cloud shadows enabled still turns the Earth red.

Instructions to reproduce:

run Celestia, going to Earth
open eclipse finder
click on "compute"
double click on any of the resulting dates
toggle "Cloud shadows"
watch the color of the Earth change.


Not on my GeForce 8800, but I suspect that might because it has a lot more interpolators than older hardware. Can you paste or link to your shaders.log?

--Chris

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #43by selden » 15.05.2007, 11:31

http://www.lepp.cornell.edu/~seb/celest ... haders.log
(29KB)

The error message at the end is


Error linking shader program:
Fragment info
-------------
(24) : error C5041: cannot locate suitable resource to bind parameter "cloudShadowTexCoord0"
Selden

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #44by chris » 15.05.2007, 17:17

selden wrote:http://www.lepp.cornell.edu/~seb/celestia/files/shaders.log
(29KB)

The error message at the end is


Error linking shader program:
Fragment info
-------------
(24) : error C5041: cannot locate suitable resource to bind parameter "cloudShadowTexCoord0"


I just checked in a fix . . . However, there are still cases where you can exhaust all of the interpolators. A complete fix will have to wait a bit longer though.

--Chris

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #45by t00fri » 15.05.2007, 17:59

selden wrote:Unfortunately, after rebuilding without the "complex cloud shaders", an eclipse with cloud shadows enabled still turns the Earth red.

Instructions to reproduce:

run Celestia, going to Earth
open eclipse finder
click on "compute"
double click on any of the resulting dates
toggle "Cloud shadows"
watch the color of the Earth change.


Not under Linux KDE (rebuilt ~20 hours ago)

Bye Fridger
Image

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #46by chris » 15.05.2007, 18:16

t00fri wrote:
selden wrote:Unfortunately, after rebuilding without the "complex cloud shaders", an eclipse with cloud shadows enabled still turns the Earth red.

Instructions to reproduce:

run Celestia, going to Earth
open eclipse finder
click on "compute"
double click on any of the resulting dates
toggle "Cloud shadows"
watch the color of the Earth change.

Not under Linux KDE (rebuilt ~20 hours ago)


It depends on what textures you have enabled . . . Selden had night textures turned on, atmospheres, cloud shadows, and specular lighting. All of these things use interpolators:

Base texture: 1
Atmopheres: 1
Cloud shadows: 1/light source
Specular lighting: 1 + 1/light source
Eclipse shadows: 1
Night texture: 2
Additional interpolators: 1 for diffuse light

That's a total of 9 interpolants (some scalar, some vector): values that are generated by the vertex shader, perspective interpolated by the graphics chip, and passed on to the pixel shader. Unfortunately, graphics hardware prior to the GeForce 8800 only supports 8 interpolators (actually 10, but two seem to be reserved.) I worked around the bug by eliminating a scalar interpolator used for the night texture. As a result, there's a small amount of extra computation done in the pixel shader, but it should have a negligible performance impact.

Shading may be separated into multiple additive passes, with one pass per light. Thus, I'm not so worried about running out of interpolators due to extra light sources. However, the shaders do need to be constructed so that the most complex single light source shader does not run over the 8 interpolator limit common on most OpenGL 2.0 hardware. I have plan for accomplishing this in a future Celestia version.

--Chris

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #47by t00fri » 15.05.2007, 18:32

Trying to compile your fix with Linux (gcc 4.1.x) gives this:

Code: Select all

shadermanager.cpp: In member function ?€?GLFragmentShader* ShaderManager::buildFragmentShader(const ShaderProperties&)?€™:
shadermanager.cpp:1564: error: name lookup of ?€?k?€™ changed for new ISO ?€?for?€™ scoping
shadermanager.cpp:1562: error:   using obsolete binding at ?€?k?€™
make[3]: *** [shadermanager.o] Error 1
make[3]: Leaving directory `/usr/local/cvs/celestia-kde/src/celengine'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/cvs/celestia-kde/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/cvs/celestia-kde'
make: *** [all] Error 2


Bye Fridger
Image

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #48by t00fri » 15.05.2007, 18:38

chris wrote:
It depends on what textures you have enabled . . . Selden had night textures turned on, atmospheres, cloud shadows, and specular lighting. All of these things use interpolators:


I use (fx 5900 Ultra): my 64k normalmap 1k x 1k tiles, 64k base+spec 1k x 1k tiles (RGBA), 32k nightlight 1k x 1k tiles, atmospheres, cloud shadows, specular lighting, eclipse shadows, my 2k clouds.

Bye Fridger
Image

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #49by chris » 15.05.2007, 18:41

t00fri wrote:Trying to compile your fix with Linux (gcc 4.1.x) gives this:

Code: Select all

shadermanager.cpp: In member function ?€?GLFragmentShader* ShaderManager::buildFragmentShader(const ShaderProperties&)?€™:
shadermanager.cpp:1564: error: name lookup of ?€?k?€™ changed for new ISO ?€?for?€™ scoping
shadermanager.cpp:1562: error:   using obsolete binding at ?€?k?€™
make[3]: *** [shadermanager.o] Error 1
make[3]: Leaving directory `/usr/local/cvs/celestia-kde/src/celengine'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/cvs/celestia-kde/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/cvs/celestia-kde'
make: *** [all] Error 2


Bye Fridger

Damned MS compiler and it's non-ANSI for looping scoping! If you change the code so that k is declared outside the for loop, it will compile, i.e. change:

Code: Select all

for (int k = 0; k < ...; k++)


to:

Code: Select all

int k;
for (k = 0; k < ...; k++)


If you make that change, please go ahead and check it in; otherwise I'll do it later today. I think that there may be an MSVC compiler flag to enable ANSI for loop scoping conventions, which would help avoid breaks like this in the future.

--Chris

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #50by t00fri » 15.05.2007, 19:00

Chris,

compilation went fine now, but that's the result:

Image

Since a long time I get a red globe again. With the same settings everything was perfect before your "fix".


See my fading star labels ;-)

Bye Fridger
Image

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #51by chris » 15.05.2007, 19:08

t00fri wrote:
Since a long time I get a red globe again. With the same settings everything was perfect before your "fix".


Ugh. Could you post your shaders.log?

--Chris

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #52by t00fri » 15.05.2007, 19:32

Image

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #53by t00fri » 15.05.2007, 20:20

Chris,

there are more things since your recent fixes that now go wrong. I just recompiled your scope-fix in shadermanager.cpp. I didn't commit it, since I think you will have more to fix...

Image

See those dirty dark stripes that don't belong here??

Bye Fridger
Image

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #54by tech2000 » 15.05.2007, 20:33

See my fading star labels

Fridger,
is your fading star labels code also went into the cvs?

Would all labels use this kind of fade?

bye, Anders

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #55by t00fri » 15.05.2007, 20:43

tech2000 wrote:
See my fading star labels
Fridger,
is your fading star labels code also went into the cvs?

Would all labels use this kind of fade?

bye, Anders


Not yet, since I still want to do some checks and possible improvements. It's so long ago and I have to "warm up" again, trying to remember the quite tricky dependences ...

Bye Fridger
Image

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #56by chris » 15.05.2007, 20:46

t00fri wrote:Chris,

there are more things since your recent fixes that now go wrong. I just recompiled your scope-fix in shadermanager.cpp. I didn't commit it, since I think you will have more to fix...

Image

See those dirty dark stripes that don't belong here??


I see the ring shadows, but I presume that's not what you're talking about. Are those gray bands above the ring shadows not supposed to be there?

I do know what's going wrong with the Earth shader; I'll have a fix late today.

Nice to see those faded star labels in the screenshot.

--Chris

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #57by t00fri » 15.05.2007, 21:10

Chris,

I am confused. I did a /fresh/ compile and all those effects
above were gone. I am now missing the glowing red Earth globe...h?¶ h?¶

I have no idea what happened, but both the Saturn
artefacts and the red Earth are gone. Only my nice fading
labels remain ;-)

Sorry for causing possibly unnecessary work. But perhaps
you found a fix for something that noone has yet discovered
;-)

Bye Fridger
Image

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #58by chris » 15.05.2007, 21:13

t00fri wrote:Chris,

I am confused. I did a /fresh/ compile and all those effects
above were gone. I am now missing the glowing red Earth globe...h?¶ h?¶

I have no idea what happened, but both the Saturn
artefacts and the red Earth are gone. Only my nice fading
labels remain ;-)

Sorry for causing possibly unnecessary work. But perhaps
you found a fix for something that noone has yet discovered
;-)


It's not unnecessary work--you definitely found a bug with the red Earth. With my latest checkin, night lights+normal maps+specular will not work. Do you think that you may have night textures disabled now?

--Chris

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #59by selden » 15.05.2007, 21:19

fyi:

Celestia as built this morning (6:35 EDT)
crashes when viewing Saturn
on my system at work.

System:
2GB, 1.86GHz Core2Duo, WinXP Pro SP2
Quadro FX 550, ForceWare 91.36

I'll update Forceware shortly to the current Quadro version, 91.85, but thought I'd let you know now, since that'll take a while.
Selden

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #60by t00fri » 15.05.2007, 21:20

chris wrote:It's not unnecessary work--you definitely found a bug with the red Earth. With my latest checkin, night lights+normal maps+specular will not work. Do you think that you may have night textures disabled now?

--Chris


Beautiful!!! I got my red Earth back...Ahem. For some
reason the rendering path had shifted from OpenGL 2.0
and that was the reason for the nice natural (non-red)
display of mother Earth.

So indeed no vasted work. Good. As a cross-check: the
red globe is gone as soon as I switch off the night lights.


Bye Fridger
Image


Return to “Bugs”