Page 1 of 1

Shader problem

Posted: 27 Jan 2018, 19:25
by musketeer925
I summon @EAGLEMUT, the master of AoE3 compatibility with modern PCs.

I recently install AoE3 on a brand new Windows 10 PC that has an i5-8600K processor and using its integrated graphics. I assumed that would be enough to run AoE3 at max. All settings work at max except Shaders at anything higher than Low, which produces the result in the attached screenshots. I am running it with XP SP3 compatibility mode.

Any thoughts on if there's some driver I need to install to get the shaders to work properly (Direct3d/older DirectX/etc?)

Re: Shader problem

Posted: 27 Jan 2018, 19:32
by Gendarme
Now I have seen it all.

Re: Shader problem

Posted: 27 Jan 2018, 23:01
by EAGLEMUT
Hey, unfortunately I don't know another solution to this, other than switching the shader quality. However, on my setup with an integrated GPU it works correctly on both "Low" and "Very High". Options "Medium" and "High" exhibit same behavior for me as on the screenshot.
Do you have a "Very High" option selectable there?

Re: Shader problem

Posted: 27 Jan 2018, 23:02
by musketeer925
EAGLEMUT wrote:Hey, unfortunately I don't know another solution to this, other than switching the shader quality. However, on my setup with an integrated GPU it works correctly on both "Low" and "Very High". Options "Medium" and "High" exhibit same behavior for me as on the screenshot.
Do you have a "Very High" option selectable there?

Interesting. I'll have to take another look when I get a chance. Thanks for the input!

Re: Shader problem

Posted: 27 Jan 2018, 23:05
by EAGLEMUT
If you don't have the "Very High" option available, perhaps try setting it manually in NewProfile3.xml using the setting "optiongrfxshaderquality" to value 3.

Re: Shader problem

Posted: 28 Jan 2018, 00:31
by Dolan
I've had this issue before and after digging through all the game components, I realised there's nothing you can do, if you want to play the game with new CPUs with integrated graphics.

This is caused by how Ensemble decided to handle how the game recognises your graphics chips. They created some hardware profiles for each common CPU that was sold when the game came out and associated those profiles with particular files, which had specific shader capabilities. So they programmed different shaders for different hardware.

When I tried to create a custom profile to force the game to recognise my newer CPU (with integrated graphics), the shaders started looking weird, like I used to see the Bayou map covered by a blue-tinged surface. I was obviously forcing the game to use the hardware in a way for which it wasn't programmed. So it was trying to use shaders that weren't supported by my CPU.

Ironically, you have a better chance at seeing the shaders right if you are playing with older hardware, for which the game was written. Or if you use a discrete GPU.

Re: Shader problem

Posted: 28 Jan 2018, 00:39
by Dolan
The newer Intel graphic chips are not recognised as DirectX 8 / 9 Shader model v 2.0 capable, and rendering defaults to basic DirectX 7 capabilities without any shaders.

For example, the game ignores everything in the devices.xml file and jumps to the last generic device with the lowest shader settings:

Code: Select all

    <device name="GenericFF">
        generic dx7
        <low>Generic DX7</low>
    </device>


If you replace this device with a Generic DX8 setting, the game starts displaying more shaders but water rendering gets some weird colour ranges from green to purple.

This Generic DX7 profile is also coded in a separate file called Generic DX7.d3dconfig, which you can find in the /Config folder (I uploaded on Google drive): https://drive.google.com/drive/folders/ ... WlleHNJODg. In this file you can find a bunch of settings such as:

Code: Select all

<d3dconfig>
    <fixedfunctionverts>true</fixedfunctionverts>
    <techniques>
        <enable>alpha transparency</enable>
        <enable>alphatest</enable>
        <enable>alphatest_flatcolor</enable>
        <enable>alphatest_blendcolor</enable>

Each of these shader capabilities have their own settings file, for example alphatest (in the /techniques/ folder):

Code: Select all

<technique>
    <pass>
        <texture stage="0">diffuse</texture>
        <rs>alphatest</rs>
        <tss>default</tss>
    </pass>
</technique>

And, of course, finally all these configuration files which are coded in format similar with XML point to shader programming files such as default_shader.psh in the /Render/ps/ folder:

Code: Select all

ps.1.1

def c7, 1, 0, 0, 0


tex t0   //base texture
#ifdef ENVMAP
tex t2   //envmap texture
#endif

mul_x2 r0.rgb, t0, v0       // texture * light
+mul r0.a, t0, v0       // texture * light

#ifdef ENVMAP
// reflectivity is a float value in the r component so the dp3 is a
// clunky way to propogate this value into all components before the lerp
dp3 r1, c6, c7
lrp r0, r1, t2, r0
#endif

#ifdef TREE
add r0, r0, c1
#endif

#ifdef TINT
add r0, r0, c0
#endif

Re: Shader problem

Posted: 28 Jan 2018, 00:43
by Dolan
To sum up, your newer Intel CPU is way more capable than what AOE3 can display and what Ensemble programmed into their shaders, but the problem is the game cannot recognise and ascribe a proper hardware profile to your chip. So it defaults to the lowest generic device.

Most likely, the options you are seeing in that dropdown menu in Graphics options do not correspond to real hardware profiles. The game is trying to access more advanced shader capabilities but it ends up rendering based on that most basic, generic device. So that's why you're getting graphics with artefacts.

Re: Shader problem

Posted: 28 Jan 2018, 03:55
by musketeer925
Thanks for the detailed input @Dolan. I actually am seeing that weird blue tint you mention in several places as well — it’s visible under the covered wagon in my screenshot I think.

What you say does make a lot of sense, as it didn’t really look like the higher settings were actually applying better shaders. The only change I saw was the artifacts. This seems consistent with it falling back to the generic profile.

I was looking to add a discrete card to the PC at some point anyway. Until then, the low shader settings will have to do.

Re: Shader problem

Posted: 28 Jan 2018, 09:37
by NekoBerk
Are you using the steam version right? , Not a pirate one

Re: Shader problem

Posted: 28 Jan 2018, 14:01
by musketeer925
NekoBerk wrote:Are you using the steam version right? , Not a pirate one

It's the CD, actually.

Re: Shader problem

Posted: 28 Jan 2018, 16:55
by NekoBerk
musketeer925 wrote:
NekoBerk wrote:Are you using the steam version right? , Not a pirate one

It's the CD, actually.


Hmm... maybe that's the problem, maybe if somebody shares you his steam account for download the game from there you fix the problem.

Re: Shader problem

Posted: 28 Jan 2018, 17:00
by EAGLEMUT
There is literally no difference between Steam and CD "versions". For the record, I can reproduce it on the Steam "version".

Re: Shader problem

Posted: 28 Jan 2018, 17:07
by musketeer925
NekoBerk wrote:
musketeer925 wrote:
NekoBerk wrote:Are you using the steam version right? , Not a pirate one

It's the CD, actually.


Hmm... maybe that's the problem, maybe if somebody shares you his steam account for download the game from there you fix the problem.

I own it on Steam as well (and Gamestop's platform, and Microsoft's defunct Games for Windows Live platform...) But based on the analysis from @EAGLEMUT and @Dolan I agree that Steam shouldn't make a difference.

Re: Shader problem

Posted: 28 Jan 2018, 17:30
by Dolan
Yeah, both versions have the same files, Microsoft hasn't hired anyone to change or add anything to the AOE3 files, since the last Robot patch.

Re: Shader problem

Posted: 29 Jan 2018, 07:31
by NekoBerk
musketeer925 wrote:
NekoBerk wrote:
Show hidden quotes


Hmm... maybe that's the problem, maybe if somebody shares you his steam account for download the game from there you fix the problem.

I own it on Steam as well (and Gamestop's platform, and Microsoft's defunct Games for Windows Live platform...) But based on the analysis from @EAGLEMUT and @Dolan I agree that Steam shouldn't make a difference.


Steam has windows 7/8/10 support, The CD doesn't have it. Just try installing the steam version bro, and check if it fix you the problem, otherwise say bye to aoe xD

Re: Shader problem

Posted: 29 Jan 2018, 07:33
by NekoBerk
Or you can try to config your Graphic Card specially for Aoe 3

Re: Shader problem

Posted: 29 Jan 2018, 11:53
by EAGLEMUT
NekoBerk wrote:Steam has windows 7/8/10 support, The CD doesn't have it. Just try installing the steam version bro, and check if it fix you the problem, otherwise say bye to aoe xD

http://store.steampowered.com/app/10545 ... ollection/
SYSTEM REQUIREMENTS
OS:Windows XP

The Steam "version" barely runs on Windows 7/8/10, just like the CD "version". Steam doesn't even claim otherwise.
Think about this; if there actually was something different about the game "version" on Steam, you couldn't actually play together with people on the CD "version", which isn't the case.

Re: Shader problem

Posted: 29 Jan 2018, 12:00
by Sargsyan
Just buy a cheap used gpu for example 750gt and carry on playing.u can even play battlefield 1 on low settings.the price should be around 50 $

Re: Shader problem

Posted: 29 Jan 2018, 12:05
by gamevideo113
Integrated GPU sux really bad. I suggest getting a proper GPU, even if cheap.