We had this comment from pascal and since it's important matter I decided to start topic now.Since registration at the forum is apparently not possible atm (?), I am writing this here in hope to be heard by the developers.
I read you are going to depend on Nvidia’s CG Toolkit. That is extremely unfortunate in various ways:
1. It will make it impossible to include OpenMW in any distribution that has a only-Free-Software policy, since CG is proprietary.
2. OpenMW will be restricted to platforms supported by Nvidia. One nice thing about open source is portability: While you are at the moment only targeting Windows, Mac OS and Linux, the game will also run on *BSD (I even created an OpenBSD port with little effort). Depending on CG will lock out these operating systems completely.
It contradicts the goal of creating an ‘open’ Morrowind implementation by relying on proprietary technology. So please, please, please, try to use another language (GLSL?) for shader support.
Nvidia’s CG Toolkit
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Nvidia’s CG Toolkit
Re: Nvidia’s CG Toolkit
Pretty much out of question. It would mean that we would have to write all shaders twice (once in GSLS and once in HLSL). Or drop DirectX support. Neither looks like a viable option.
- psi29a
- Posts: 5361
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Nvidia’s CG Toolkit
I agree with Zini, it would just hobble development. If someone wants to take the time to support *BSD, they should sign up here and get to work.
It is a shame that Nvidia does not release the toolkit for *BSD.
@Zini: Why is keeping directX support important?
It is a shame that Nvidia does not release the toolkit for *BSD.
@Zini: Why is keeping directX support important?
Re: Nvidia’s CG Toolkit
Quality of OpenGL drivers varies. A lot. People using Linux for high-end graphics purpose are probably smart enough to pick vendors/cards that have decent drivers. Obviously Windows user have limited motivation to do the same.
Re: Nvidia’s CG Toolkit
So you guys are using Nvidia's CG Toolkit?
I don't really know what it does, but CG is a shader language like GSLS and HLSL? By using CG, it allows you to write the shaders once and have support for both OpenGL and Direct3d?
How exactly does this Nvidia tech talk to the hardware?
When you compile the CG shader code it translates it into both Direct3d and openGL machine code or something? Is there a performance hit in using it as opposed to writing the shaders directly in GSLS or HLSL? How does it make running on a platform where OpenGL support would otherwise be questionable any better?
I'm sure I'm completely missing something, but the general idea is that OpenGL support varies across platforms w/ different hardware so you can't rely on that, and Direct3d is only on windows, so you can't rely on that. Correct?
Sorry for the all the questions, I don't expect anyone to take the time to answer them heh. I just wasn't aware this issue even existed and don't understand all of it.
I don't really know what it does, but CG is a shader language like GSLS and HLSL? By using CG, it allows you to write the shaders once and have support for both OpenGL and Direct3d?
How exactly does this Nvidia tech talk to the hardware?
When you compile the CG shader code it translates it into both Direct3d and openGL machine code or something? Is there a performance hit in using it as opposed to writing the shaders directly in GSLS or HLSL? How does it make running on a platform where OpenGL support would otherwise be questionable any better?
I'm sure I'm completely missing something, but the general idea is that OpenGL support varies across platforms w/ different hardware so you can't rely on that, and Direct3d is only on windows, so you can't rely on that. Correct?
Sorry for the all the questions, I don't expect anyone to take the time to answer them heh. I just wasn't aware this issue even existed and don't understand all of it.
Re: Nvidia’s CG Toolkit
Exactly.I don't really know what it does, but CG is a shader language like GSLS and HLSL? By using CG, it allows you to write the shaders once and have support for both OpenGL and Direct3d?
Don't know. Don't care. It works, therefore the internals are of little interest to me.How exactly does this Nvidia tech talk to the hardware?
When you compile the CG shader code it translates it into both Direct3d and openGL machine code or something?
Normally, that is not the case.Is there a performance hit in using it as opposed to writing the shaders directly in GSLS or HLSL?
When you have DirectX available, you can use that instead.How does it make running on a platform where OpenGL support would otherwise be questionable any better?
For Windows you can't rely on OpenGL, because the support varies depending on the hardware vendor. ATI for example was known to produce junk OpenGL driver for a long time. Apparently it got a bit better, but I still wouldn't trust it.I'm sure I'm completely missing something, but the general idea is that OpenGL support varies across platforms w/ different hardware so you can't rely on that, and Direct3d is only on windows, so you can't rely on that. Correct?
For Linux/OS X, DirectX is not available, so you have to use OpenGL. But if you buy a Linux box and intend to use it for high end graphics, you usually make sure, to choose graphics hardware that comes with good OpenGL drivers.
Re: Nvidia’s CG Toolkit
Zini, thanks for the reply.
I have an ATI card, the driver support for under linux has been iffy in the past, but yes it has gotten better. I've played several 3d games under archlinux with good results. I never knew there were OpenGL issues with Nvidia or ATI under windows (I'm assuming we are not talking about people with integrated graphics from other chipset manufacturers, don't know how many of them will be playing openmw).
Nvidia's page doesn't give much information, I'm going to do some digging elsewhere to find out more about how cg works. Sounds interesting.
I have an ATI card, the driver support for under linux has been iffy in the past, but yes it has gotten better. I've played several 3d games under archlinux with good results. I never knew there were OpenGL issues with Nvidia or ATI under windows (I'm assuming we are not talking about people with integrated graphics from other chipset manufacturers, don't know how many of them will be playing openmw).
Nvidia's page doesn't give much information, I'm going to do some digging elsewhere to find out more about how cg works. Sounds interesting.
Re: Nvidia’s CG Toolkit
There's hope for the people running only-Free-software systems, as Nvidia released the Cg compiler code under a non-restrictive open-source licence back in 2002. I don't know if this code is actually useful but in the long run when people decide to write an open-source Cg shader plugin it might help. Again, I don't know how shader support works exactly, if it doesn't make sense please disregard it.
EDIT: Question: how hard would it be to include both HLSL and GLSL code in OpenMW, as I understand Cg basically compiles the Cg shader code into the API-specific language and then provides a wrapper around it. You can manually compile the shaders with the cg compiler, so there is no need to write all the HLSL/GLSL code by hand. Wouldn't that make it possible to write the code in Cg and then compile it to both HLSL and GLSL and use that code in OpenMW instead?
EDIT 2: Here's an example of the Moon_FP shader in sky.cpp converted to a GLSL shader using cgc.
EDIT: Question: how hard would it be to include both HLSL and GLSL code in OpenMW, as I understand Cg basically compiles the Cg shader code into the API-specific language and then provides a wrapper around it. You can manually compile the shaders with the cg compiler, so there is no need to write all the HLSL/GLSL code by hand. Wouldn't that make it possible to write the code in Cg and then compile it to both HLSL and GLSL and use that code in OpenMW instead?
EDIT 2: Here's an example of the Moon_FP shader in sky.cpp converted to a GLSL shader using cgc.
Re: Nvidia’s CG Toolkit
Isn't Ogre internally relying on CG? For example for terrain material generator shaders?
Re: Nvidia’s CG Toolkit
I am confused by the matter. If you use only free software you cannot play Morrowind in the first place. And you cannot play an eventually modified OpenMW with the removed offending pieces because the Morrowind data files are not free (nor libre, nor gratis).
So, the request is only for free (libre) Total Conversion? It exists at least one? Even most mods are not free (libre). (Off topic: this last point always bothered me. planet elder scroll should refuse non free stuff!)
About DirectX; I am not sure why support Windows at all... All the support of the Morrowind community is for windows-only already! There is plenty of choice of Windows users.
For example, the graphics extender is written in C# and works altering GDI32.dll.GdiEntry1 that is not in Wine.
So, the request is only for free (libre) Total Conversion? It exists at least one? Even most mods are not free (libre). (Off topic: this last point always bothered me. planet elder scroll should refuse non free stuff!)
About DirectX; I am not sure why support Windows at all... All the support of the Morrowind community is for windows-only already! There is plenty of choice of Windows users.
For example, the graphics extender is written in C# and works altering GDI32.dll.GdiEntry1 that is not in Wine.