It is currently Tue, 25-09-18, 3:40 GMT

All times are UTC




Post new topic Reply to topic  [ 75 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
 Post subject: Re: A Windows Story
PostPosted: Thu, 08-01-15, 14:35 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4577
Location: Hamburg, Germany
In openSuSE 13.1 I have done the following with regard to libpng16:

I installed at 64bit level
-----------------------------
libpng16-16
libpng16-compat-devel
libpng16-devel

and the analogous set for 32bit
along with

libpng12-0-32bit (to warrant runtime compatibility for older 32bit programs).

After many, many successful builds of celestia.Sci and other programs involving libpng, I can state that this works perfectly!

@cartrite: When you see red balls this points to a problem in a shader! You may check by inspecting celestia-shaders.log that is generated after each run. This does NOT need to be a bug in the shader code. More often it merely indicates mal-functioning of the actual shader code & GLSL version, depending on the graphics hardware & drivers!

Fridger

_________________
Image


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Thu, 08-01-15, 17:59 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 806
Location: N 42.38846 W 83.45456
check the makefile in " celestia/src/celestia "

it is likely missing a lib ( -lGL)
LIBS = -lm -lGL

there is also a internalization issue
the *.po files are not being ran so text files are not copied to the install folder

( at least for using autotools and not qt creator)

_________________
"I don't pitch Linux to my friends, I let Microsoft do that for me."
Using OpenSUSE 42.1 & Scientific Linux 6.7


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Fri, 09-01-15, 4:21 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 992
Location: NE PA, USA
Well, this is what I see in the shatters log.
Code:
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: varying vec2 diffTexCoord;
  4: uniform vec3 ambientColor;
  5: uniform float opacity;
  6: vec4 diff = vec4(ambientColor, opacity);
  7: varying vec4 diffFactors;
  8: uniform vec3 lightcolor0;
  9: varying vec3 position_obj;
 10: uniform sampler2D ringTex;
 11: varying vec4 ringShadowTexCoord;
 12: uniform float ringShadowLOD0;
 13:
 14: void main(void)
 15: {
 16: vec4 color;
 17: float shadow;
 18: shadow = diffFactors.x;
 19: shadow *= 1.000000-texture2DLod(ringTex, vec2(ringShadowTexCoord.x, 0.000000), ringShadowLOD0).a;
 20: diff.rgb += shadow * lightcolor0;
 21: color = texture2D(diffTex, diffTexCoord.st);
 22: gl_FragColor = color * diff;
 23: }

Error compiling fragment shader:
0:19(20): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:19(20): error: type mismatch
0:19(11): error: operands to arithmetic operators must be numeric
0:19(1): error: operands to arithmetic operators must be numeric

This is with the intel card on the laptop. Unfortunatly there is no way to get an update. I was also seeeing the red ball on the ring planets with my pc, which also has suse 13.2 on it now. This machine also showed red balls for the ring planets. But that machine has a NVidia card in it and I was able to install a Nvidia driver. Now it works. On that machine, after installing the NVidia driver, it went from opengl version 3.0 to 3.3. As far as the laptop, :wall:
But Cosmographia works. It renders Saturn perfectly. So..................... I guess I'm gona have to figure out how to update a graphics driver for intel.
;)
cartrite


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Fri, 09-01-15, 7:09 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4577
Location: Hamburg, Germany
Steve,

that's precisely the kind of problematics I was referring to. Usually NVIDIA + driver works but HD3000 graphics is picky depending on the used driver version. Both DW and I use also HD3000 graphics on our laptops, so the Saturn issue is familiar.

The fix must be done in shadermanager.cpp etc. Sometimes, the function texture2Dlod is unavailable or not working properly...Watch out for another related issue: ring shadows being not rendered!

The HD3000 problematics with texture2Dlod also differs between Linux and Win 7.
So, indeed, this is tricky to fix for all hardware and drivers...

Fridger

_________________
Image


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Fri, 09-01-15, 8:09 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 806
Location: N 42.38846 W 83.45456
for intel
http://software.opensuse.org/package/xf86-video-intel

and is in the official update repo

the opensuse 3d driver page
http://opensuse-guide.org/3d.php

i do not have a intel chip
Code:
zypper se intel

Loading repository data...
Reading installed packages...

S | Name                   | Summary                                                                 | Type     
--+------------------------+-------------------------------------------------------------------------+-----------
  | intel-SINIT            | Intel(R) SINIT AC modules                                               | package   
  | intel-gpu-tools        | Collection of tools for development and testing of the Intel DRM driver | package   
  | intelhex               | Library for Intel HEX Files Manipulations                               | package   
i | libdrm_intel1          | Userspace interface for Kernel DRM services for Intel chips             | package   
i | libdrm_intel1-32bit    | Userspace interface for Kernel DRM services for Intel chips             | package   
  | ucode-intel            | Microcode Updates for Intel x86/x86-64 CPUs                             | package   
  | vaapi-intel-driver     | Intel Driver for Video Acceleration (VA) API for Linux                  | package   
  | xf86-video-intel       | Intel video driver for the Xorg X server                                | package   
  | xf86-video-intel       | Intel video driver for the Xorg X server                                | srcpackage
  | xf86-video-intel-32bit | Intel video driver for the Xorg X server                                | package   

_________________
"I don't pitch Linux to my friends, I let Microsoft do that for me."
Using OpenSUSE 42.1 & Scientific Linux 6.7


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Fri, 09-01-15, 13:25 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 992
Location: NE PA, USA
I tried the intel driver last night. Did not work. But it too small a package to actually be a driver. It must be some kind of interface to confiure with. I haven't figured out how to use it yet.
I also tried building and installing MESA 10.4.1 and 10.3.6. Both of those did not work. Also tried building Celestia with the latest version of Glew. :X
I got an Intel hd 4000 card on this laptop. From the second link John posted.
Quote:
15.3 Intel
The 3D drivers for Intel graphics cards are free software, and can therefore be included in openSUSE out of the box. No additional installation or configuration is needed.

;)
In all that statement is correct. Except for this bug, the graphics is working fine.

Two things I noticed.
1. This laptop is not on the HCL list.
2. It uses the i915 driver from the MESA package.
Since I have several versions of the MESA source code, I'm gonna take a look at the i915 code.

The MESA page states that the versions I've tried can give a gl context of the 3.3 version. But not all of the drivers in the package do this automaticlly. Which probably means the i915 driver is one of these. x/

On a good note. One of the things I noticed since installing openSuse is I no longer need an external mouse. The touch pad is working again.

cartrite


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Fri, 09-01-15, 14:18 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 992
Location: NE PA, USA
Well I haven't looked at the driver yet but found the code that was malfuntioning. In shadermanager.cpp starting at line 1177.
Code:
        if (GLEW_ARB_shader_texture_lod)
        {
            //source += mulAssign("shadow",
                      //(1.0f - texture2DLod(sampler2D("ringTex"), vec2(ringShadowTexCoord(light), 0.0f), indexedUniform("ringShadowLOD", light))["a"]));
        }
        else
        {
            // Fallback when the texture2Dlod function is unavailable. This would be a good option
            // for all GPUs except that some (GeForce 8 series, possibly others) have trouble with the
            // LOD bias. It seems that the LOD bias isn't actually implemented in hardware, and is
            // instead implemented by emitting shader instructions to compute the texture LOD using
            // the derivative instructions and adding the bias to this result. Unfortunately, the
            // derivative is computed from the plane equation of the triangle, which means that there
            // are discontinuities between triangles.
            source += mulAssign("shadow",
                      (1.0f - texture2DLodBias(sampler2D("ringTex"), vec2(ringShadowTexCoord(light), 0.0f), indexedUniform("ringShadowLOD", light))["a"]));
        }


Apparently, Glew thinks that this funtion is available but it isn't for some reason. I had to comment out the instuction that is returned when "GLEW_ARB_shader_texture_lod" thinks it is available.

cartrite


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Fri, 09-01-15, 18:07 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 992
Location: NE PA, USA
I started looking at the driver code and it looks way over my head. ;)
I'm gonna take my time with this and read thru the comments. Maybe I'll see something????
Anyhow I settled for this simple logic. Since "texture2DLod" is not realy available even though Glew thinks it is, I changed "texture2DLod" to "texture2DLodBias" which is what is supposed to be used if "texture2DLod" is not available. It works. Not a fix to publish though.

Fridger, we are probably using the same driver. The i915 driver is used for intelhd 2000 thru 6000. If you don't have this issue, then I must have a configuration problem which is why I don't really want to report this as a bug to MESA. I'm also not sure if this would be a driver issue or a Glew issue if my configuration is correct.

cartrite


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Fri, 09-01-15, 18:48 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4577
Location: Hamburg, Germany
Steve,

in the celestia.Sci team, we have spent a lengthy amount of time to fix the analog of this problem for all cases of interest. Since Celestia is not celestia.Sci, and since this issue is tricky, requiring an extensive study in several OS and hardware configurations, I felt unable to quote a simple fix for your case.

But you certainly went along a very sensible path of attack.

Fridger

_________________
Image


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Sat, 10-01-15, 0:43 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 2:32 GMT
Posts: 431
Location: South Korea
I already encountered this issue on my HD 3000 with celestia.Sci.

The fix was to not use textureLod.
shadermanager.cpp:1177:
< if (GLEW_ARB_shader_texture_lod)
---
> if (0)

Also I applied another fix:
shadermanager.cpp:1357:
< source += " " + VarScatterInVS() + " = (phRayleigh * rayleighCoeff + phMie * mieCoeff) * invScatterCoeffSum * sunColor * " + scatter + ";\n";
---
> source += " " + VarScatterInVS() + " = (phRayleigh * rayleighCoeff + vec3(phMie * mieCoeff)) * invScatterCoeffSum * sunColor * " + scatter + ";\n";


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Sat, 10-01-15, 0:51 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 992
Location: NE PA, USA
The thing that concerns me is that I remember that this laptop has opengl 4.0 capabilities. The driver gives me 3.0. But it is almost able to give 3.3. But the Celestia code was written for 2.0. This should not be a driver issue. So I'd like to report a bug but only if it really is a bug.
But I do appreciate your earlier comments because it led me to a temporary solution. Anyhow, Many Thanks.
cartrite


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Sat, 10-01-15, 0:57 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 992
Location: NE PA, USA
So this sounds like it is defiantly a driver bug? Or did something change with the API?


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Sat, 10-01-15, 9:27 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4577
Location: Hamburg, Germany
DW wrote:
I already encountered this issue on my HD 3000 with celestia.Sci.


Yes, but --as I emphasized earlier above-- the real challenge was to find a patch working properly not just on DW's MAC with HD3000, but also on Win7 and Linux where the manifestations of the bug (and respective patches) were partly different. Moreover on each of the three OS different HD3000 driver versions are typically used.

After plenty of checking among the celestia.Sci dev team, it seemed that the patch DW quoted above does a good overall job so far at least for celestia.Sci.

Fridger

_________________
Image


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Sat, 10-01-15, 11:32 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 2:32 GMT
Posts: 431
Location: South Korea
Yes... Fridger and I just gave up on textureLod on the HD 3000 which as he says is buggy in different ways on different platforms.
The full story is, the Celestia code is also buggy in that according to Section 8.7 of the GLSL spec v1.10.59 it should use (but doesn't) a GLSL #extension directive at the beginning of the shader to specify that the shader will use textureLod(), like this:

Code:
#if GL_ARB_shader_texture_lod
#extension GL_ARB_shader_texture_lod : enable
#endif


It worked for me, but when Fridger tried adding this to shadermanager.cpp it didn't work for his Windows and Linux HD 3000 drivers.
Clearly the drivers were not following the spec, and we don't know of any workaround so we gave up altogether on textureLod().

The second change (adding vec3()) is a fix for atmosphere shaders on the Mac but it also works on other platforms.


Top
 Profile  
 
 Post subject: Re: A Windows Story
PostPosted: Sat, 10-01-15, 14:19 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 992
Location: NE PA, USA
Another one you can add to the list is the nv92 nouveau driver that was running on the pc with a geforce 9800 card. That started working after the nvidia driver was installed.
cartrite


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 75 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group