Jump to content

Post-processing effects test (SSAO/HDR/Bloom)


Recommended Posts

Most likely it's a mesa r300 driver issue.

You have an X1600? For some reason I thought you had the RV770-based card...

Anyway, this definitely seems like either a driver or hardware problem.

Based on what you just said, my best guess is that the shader is too long for your older card. That may be a result of actual hardware limitations, or there's a chance the driver is incorrectly trying to unroll the while loop and is thus generating a lot of useless code...

Link to comment
Share on other sites

In terrain_common.fs, in this statement:


return (1.0/9.0)*dot(size.zxzx*size.wwyy,
vec4(shadow2D(shadowTex, vec3(weight.zw, v_shadow.z)).X,
shadow2D(shadowTex, vec3(weight.xw, v_shadow.z)).X,
shadow2D(shadowTex, vec3(weight.zy, v_shadow.z)).X,
shadow2D(shadowTex, vec3(weight.xy, v_shadow.z)).X));

try changing the ".X" at the end of each line to either ".r" or ".a". One of them should work.

Link to comment
Share on other sites

I just tried this. It didn't have any effect on the shadow glitch. I have put a screenshot below, visually it flickers across the whole screen.

The minimap problem only occurs when entities are being rendered. So viewing the shroud of darkness or an empty area of the map (had to create a custom on is atlas) makes the minimap look normal. This has no effect on the terrain flickering.

Edit: (the red units are due to some debug code, not a bug)

post-13166-0-20747700-1338311381_thumb.p

Link to comment
Share on other sites

Changing from ".a" to ".r" on fglrx fixes it for me for some reason (FYI that change might have been left in the patch, the original was ".a"). It's odd that people are having trouble with terrain shadows but not with model shadows, since the same code is duplicated almost verbatim in both shaders.

Like Ykkrosh mentioned earlier, the shadowmap is created as GL_INTENSITY, so all its channels should contain the same values. Maybe there's something not quite right with the shadow2D function, which is deprecated, though I can't tell.

Mythos, I believe this is just a shadowmap issue, not a terrain blending issue. The artifacts are caused by the get_shadow function not affecting the ambient lighting.

Link to comment
Share on other sites

In terrain_common.fs, in this statement:


return (1.0/9.0)*dot(size.zxzx*size.wwyy,
vec4(shadow2D(shadowTex, vec3(weight.zw, v_shadow.z)).X,
shadow2D(shadowTex, vec3(weight.xw, v_shadow.z)).X,
shadow2D(shadowTex, vec3(weight.zy, v_shadow.z)).X,
shadow2D(shadowTex, vec3(weight.xy, v_shadow.z)).X));

try changing the ".X" at the end of each line to either ".r" or ".a". One of them should work.

the .X was actually already a .r. Modifying to .a changed nothing here.

Link to comment
Share on other sites

Build errors/warnings in VC2010:


1>------ Build started: Project: graphics, Configuration: Release Win32 ------
1> mikktspace.cpp
1>..\..\..\source\graphics\mikktspace.cpp(31): warning C4627: '#include "mikktspace.h"': skipped when looking for precompiled header use
1> Add directive to 'precompiled.h' or rebuild precompiled header
1>..\..\..\source\graphics\mikktspace.cpp(440): warning C4005: 'NOINLINE' : macro redefinition
1> ..\..\..\source\graphics\mikktspace.cpp(438) : see previous definition of 'NOINLINE'
1>..\..\..\source\graphics\mikktspace.cpp(1896): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "precompiled.h"' to your source?
1> weldmesh.cpp
1>..\..\..\source\graphics\weldmesh.cpp(22): warning C4627: '#include "weldmesh.h"': skipped when looking for precompiled header use
1> Add directive to 'precompiled.h' or rebuild precompiled header
1>..\..\..\source\graphics\weldmesh.cpp(195): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "precompiled.h"' to your source?
1> InstancingModelRenderer.cpp
1>..\..\..\source\renderer\InstancingModelRenderer.cpp(166): warning C4189: 'faces' : local variable is initialized but not referenced
1>..\..\..\source\renderer\InstancingModelRenderer.cpp(100): warning C4189: 'vertices' : local variable is initialized but not referenced
1>..\..\..\source\renderer\InstancingModelRenderer.cpp(127): warning C4189: 'p' : local variable is initialized but not referenced
1> MikktspaceWrap.cpp
1>C:\Users\Ben\devel\ps\source\renderer/MikktspaceWrap.h(77): warning C4512: 'MikkTSpace' : assignment operator could not be generated
1> C:\Users\Ben\devel\ps\source\renderer/MikktspaceWrap.h(8) : see declaration of 'MikkTSpace'
1>..\..\..\source\renderer\MikktspaceWrap.cpp(44): warning C4100: 'iFace' : unreferenced formal parameter
1>..\..\..\source\renderer\MikktspaceWrap.cpp(44): warning C4100: 'pContext' : unreferenced formal parameter
1>..\..\..\source\renderer\MikktspaceWrap.cpp(89): warning C4100: 'fMagT' : unreferenced formal parameter
1>..\..\..\source\renderer\MikktspaceWrap.cpp(89): warning C4100: 'fMagS' : unreferenced formal parameter
1>..\..\..\source\renderer\MikktspaceWrap.cpp(89): warning C4100: 'fvBiTangent' : unreferenced formal parameter
1> ModelRenderer.cpp
1>C:\Users\Ben\devel\ps\source\renderer/MikktspaceWrap.h(77): warning C4512: 'MikkTSpace' : assignment operator could not be generated
1> C:\Users\Ben\devel\ps\source\renderer/MikktspaceWrap.h(8) : see declaration of 'MikkTSpace'

Some of the source files are missing #include "precompiled.h" as the first line of code.

Not looked into this one: "'MikkTSpace' : assignment operator could not be generated"

It compiled successfully after fixing the missing includes. There were no obvious bugs that I noticed with Radeon HD 6850 / Win7 64-bit (y)

Link to comment
Share on other sites

It compiled successfully after fixing the missing includes. There were no obvious bugs that I noticed with Radeon HD 6850 / Win7 64-bit (y)

Thanks for testing! I'm relieved that it worked on Windows/MSVC without any important changes.

No Nvidia users about? Do let me know how horribly and inexplicably it breaks on your hardware. ;)

Link to comment
Share on other sites

Very nice :) I've got an old Nvidia card (GeForce 7950 GT) and I'd love to test it, but I think I need an .exe?

I'm afraid I don't have a Windows installation any more. If historic_bruno or another Windows user doesn't mind uploading a compiled binary, I'll upload a separate archive with the shaders and other files you'll need to run it.

Link to comment
Share on other sites

Well, I'm on windows 7 64bit with an Nvidia card ( GTX 560 Ti).

I can test it if you provide some more detailed steps ;) so I know what to do ( I don't know much about this)

Well, either you need to build the engine from source, or you can wait until someone uploads the compiled executables for your system.

Btw, bumpy specular terrain has arrived! :)

Edited by myconid
Link to comment
Share on other sites

:shocking: Wow, very nice job myconid!! :clap:

I thought it would take a lot of time to see this graphic enhacements in 0 AD ^_^

I also need a windows .exe to test it in my Nvidia card :blush: or better instructions to compile it in windows myself :P

The weird roof shadowing is due to the LOD on the parallax?

Link to comment
Share on other sites

:shocking: Wow, very nice job myconid!! :clap:

I thought it would take a lot of time to see this graphic enhacements in 0 AD ^_^

I also need a windows .exe to test it in my Nvidia card :blush: or better instructions to compile it in windows myself :P

The weird roof shadowing is due to the LOD on the parallax?

Thanks. I'll release a new patch soon(-ish) & instructions to compile.

The dark roof is because of parallax, though it's not a bug. The texture is mirrored, and it already contains shadows. So, when you look at it from the side you see just a part of the bumps that is either light or dark.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...