Deferred shading - will it become commonplace?

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

BFG10K

Lifer
Aug 14, 2000
22,709
2,980
126
Okay, the vault picture seems to confirm AA is working (the bullet casings and top of the lights have less jaggies).

It's strange though, the lights still have really bad aliasing even with 4xAA. Are you using driver AA or is it in-game?
 

43st

Diamond Member
Nov 7, 2001
3,197
0
0
Originally posted by: apoppin
STALKER is a 7 year old engine

This is misleading. You imply the engine was complete and working 7 years ago. You'll never find a 7 year old build of the X-ray engine. I mean how could they even support DirectX 9 7 years ago??? DirectX 8 wasn't even released then and it's the lowest version supported by the engine.
 

apoppin

Lifer
Mar 9, 2000
34,890
1
0
alienbabeltech.com
Originally posted by: 43st
Originally posted by: apoppin
STALKER is a 7 year old engine

This is misleading. You imply the engine was complete and working 7 years ago. You'll never find a 7 year old build of the X-ray engine. I mean how could they even support DirectX 9 7 years ago??? DirectX 8 wasn't even released then and it's the lowest version supported by the engine.

no it isn't and no 'i didn't imply anything

look at the context of my statement ... it is simply a simple statement
don't attempt to analyze it or you will go insane ...


X-Ray had to *start* with deferred shading ... i seriously doubt it could be "patched in" as they went

Deferred rendering is pretty old ... around '99 i think ...

DX9 was 02 .. i think

STALKER should have been finished over 3 years ago ... in 04
[it was 'beta' then]
 

Gstanfor

Banned
Oct 19, 1999
3,307
0
0
I've a Pre-Alpha Build 1096 version of the x-ray engine, had it since 2002 I believe (first saw it running on nv28 at any rate). It certainly doesn't have the deferred lighting modes present.
 

apoppin

Lifer
Mar 9, 2000
34,890
1
0
alienbabeltech.com
Originally posted by: Gstanfor
I've a Pre-Alpha Build 1096 version of the x-ray engine, had it since 2002 I believe (first saw it running on nv28 at any rate). It certainly doesn't have the deferred lighting modes present.

interesting ... what DOES it feature?

is it DX9?
 

Gstanfor

Banned
Oct 19, 1999
3,307
0
0
its pretty much the static lighting of todays engine. Not sure on the DX9 bit, would have to dig it up and run it.
 

apoppin

Lifer
Mar 9, 2000
34,890
1
0
alienbabeltech.com
Originally posted by: Gstanfor
its pretty much the static lighting of todays engine. Not sure on the DX9 bit, would have to dig it up and run it.

now we're getting somewhere

when i said "stalker is a 7 year old engine", i had no idea it would generate this much good info

of course i don't *know* if stalker is "really" a 7 year old engine

X-ray might have been completely 'gutted' and updated in 04
:Q

i followed its progress thru when it was "beta" ... and due for release "shortly"

then it got put "on hold" and i totally lost track of it this this Winter

i don't know the "real story" ... perhaps the Devs weren't satisfied with the 'look or feel' and went back to the drawing board ...
--on both the game and it's Engine

and *fact* ... or even good speculation is welcomed
[by me as i am interested]
 

1Dark1Sharigan1

Golden Member
Oct 5, 2005
1,466
0
0
Originally posted by: BFG10K
It's strange though, the lights still have really bad aliasing even with 4xAA. Are you using driver AA or is it in-game?

Well the AA is no available in game so it has to be forced via the drivers.
 

TanisHalfElven

Diamond Member
Jun 29, 2001
3,520
0
76
Originally posted by: CaiNaM
Originally posted by: BFG10K


can you show me an example of a game which doesn't use some type of deferred rendering, but renders multiple light sources in real time where the sun, campfires, torches, other npc's using flashlights, etc. will all interact with the environment and cast multiple, complex shadows which constantly change as the light sources move, or as you move relative to the light sources?

not sure but doesn't oblivion have that. ive seen multiple times different light sources mixing and creatiing a whole arrays of shadows.
 

Gstanfor

Banned
Oct 19, 1999
3,307
0
0
For those playing S.T.A.L.K.E.R, NivenhBro has released a new version of his shader modifications, the download Mirror can be found on page 30 of this thread at the Ars Technica OpenForum.

Here they are!

20% faster, 200% better and just plain badass!

So, I announce the first release of the NEW Float32. Now go have fun and get a towel and some wetnaps.

FLOAT32 RELEASE

Full reflection vector calculations, better bump mapping, real specular effects! All this detail improvement costs nothing in framerate and you will get 20% better framerate than before if not more! Shadows are soft and no longer jagged and the overall graphical quality has been vastly improved. I am not posting screenies as it does no justice. Download it and see for yourself!

ATI users make sure to read the following quote
There is an error within the shadows. GSC screwed up and did not support hardware shadows with ati hardware. I removed the software shadows from the script to clean it up since nobody who is using full dynamic should be using software shadow. Well, this broke ATI support and I forgot to fix it. So when you install the shaders, delete "shadow.h" and you should be fine. If you have the entire game extracted, then replace "shadow.h" with the stock one after installing my shaders.

I am working on a fix for you ATI folks to enjoy hardware shadows! Expect it within the next few days.

misc dev notes by NivenhBro follow:

Ok, here's what I have cooked up for the Float32 scripts...

:Fixed broken parallax and made it less ****** (the stock parallax is ******, what can i say).It isnt as shiny and warped as before without a reduction in the parallax effect.

:Enhanced the textures further by increasing fragment shader precision.

:Enhanced bump mapping further, but in a subtle way. The mapping is more detailed then previously, but not "IN YER FACE" type of bump.

: vastly decreased the amount of dumped frames. There where two coding errors before that where causing frames to be dumped.

:reduced rendering time by an average of 2ms per frame ( I am averaging 32ms looking over the newbie camp, which is the slowest spot in cordon and only a 5% average frame dump).

:More stuff specified when it is ready...

Soem folks have asked whether or not the enhanced lighting will reduce detail quality. No, it will not as I have not increased the amount of lighting nor have I changed how the lighting effects are produced. The reason the lighting quality has gone up is because I have increased the sampling precision, thus the lighting has more of the correct color. So, the color is more precise but other than that, how the lighting is rendered is the same.

The download will be up later tonight with some added features I have not specified yet (not sure if they'll be ready tonight) and I'll go over those.

I am going to keep the same scope, which is improving detail AND increase rendering performance. I just was not happy with how I had things set up previously so instead of going backwards, I will just start from scratch and reimpliment what I liked and redo what I didn't.

I was able to make parallax MUCH better than stock, and I will still be doing this. I reduced the amount of coordinate warping (which causes that ugly specular effect on the bump map that looks odd) improved the self occlusion. Occlusion is hard to implement with parallax, but I have done as much as I can. I'll post some screenies of what i have going so far soon and tease everyone

Originally posted by BFG10K:
To me the Blinn implementation looks better because it's sharper and more defined.

You are correct, but there are numerous ways to sharpen Phong without losing what you gained by using it in the first place. With this in mind, I am working to keep it sharp while provide much more natural lighting. I have however opted to keep non-infinite lights (everything besides the sun and env lights) using blinn since 90% of the time these lights will be indoors where blinn will look better. I will say that if I can tune phong to look better indoors, without performance degredation, then all lights will become phong.

Now, before anyone asks how you can use phong and blinn at the same time, the scene renders lights in 3 stages. First, infinite lights such as the sun, ambient and cube map environment lights are rendered. After that, bloom is rendered and then model lighting.

Anyway, I have come very close to getting the reflections and light intensity balanced. After that, I will optimize it as best as i can then attempt phong on the model lights. Dependant on how everything is shaping up tonight, i may go ahead and post up what i have for you guys to play with.

In a nutshell, I have changed the infinite light (sun, ambient, cube) to phong. Originally, the game was using blinn reflection model to determine how lights was reflected from surfaces. Instead of using reflection vectors, it simplifies the process by using a half angle vector. I won't get into what that is, so read the wiki entry on it if you want. The real performance savings you get from blinn is when you calculate the lights only once. Obviously, to have dynamic lighting this isn't possible. Phong does increase the number of calculations per-pixel by a small amount, but you will not notice any performance difference. The biggest difference is seen with specular reflections as they are now only going to be shiney if they are reflecting to you (the viewer). Diffuse doesn't ever change as it is equal in all directions and the specular term is only large when aligned with the viewer and will fall off rapidly as you move.

Nah, the game isn't weird, but rather bottlenecked by a few rendering equations. What I mean by that is some of the higher level shader functions (i.e. per pixel lighting) makes other things wait. You wont notice an increase in performance unless you remove that bottleneck, which is what I am trying to do (and with partial success).

Ok, so here's whats new with the shaders...

1)All infinite lights are now phong instead of blinn. I have been able to optimize the code so that the new reflection calculations only add 1 instruction extra per pixel. Better light rendering without a performance decrease. Can't beat that Wink

2)Removed the fake specular highlights the original code has used. It caused purely diffuse lit surfaces (such as dirt) to appear reflective. Dirt has more detail and depth yet isnt plastic shiny. This has increased performance and detail as well.

3)Removed the half angle vector calculations associated with the fake specular lights. This also increased performance as it isn't needed anymore.

Now, removing these things doesn't mean that quality has been reduced at all nor does it mean certain effects will be lost. This does mean however that instead of doing all of this reflection emulation, I can do it right in one calculation and get rid of the fake stuff. The original code directed specular light all the time to the viewer (you) and it looks like ass compared to what it is now. If you look at the tail lights of the bus outside of the newbie camp, you'll see the true reflection instead of fake specular.

They are coded for use with full dynamic only. Now, the shaders i am working on now are MUCH faster than the stock ones and another user has reported his once unplayable game using full dynamic is now playable at a solid 30fps. It is worth a shot once they are finished to give them a try. If for whatever reason they aren't helpful then they can be easily removed.

Here's whats going on now...

a) Biggest improvement being the lighting quality. Light reflection diffuse and specular have been totally recoded for much higher quality with a gain in performance.

b) Performance gains in the range of 15%-20% higher average FPS outdoors with full dynamic lighting and sun shadows enabled.

c)Implemented soft shadows so shadows are now crisp near and far, with absolutely no slow downs. No more stark changes between shadows as you move away or toward them.

d)HDR effects are more refined and less glaring. Glancing at the sky will no longer lead to burned retinas. Radiosity has not been changed.

e)HUGE conservation of texture memory bandwidth. Optimized texture fetching techniques so that it takes half as many texture lookups to achieve the same result. raises average FPS and reduces stutter.


I have been unable as of yet to be able to fix the burning barrel issues that i and a few other folks are having, but I have not given up on them yet.

bumping hasn't changed. The reason things look a bit flatter is because before, the game was using an vector to eye matrix that would basically interpolate between reflections so that you always had a reflection pointed at the viewer (you). Besides the fact this isnt realistic as it is just a poor emulation of rat tracing, it is also slow as hell.

The idea that i am playing with now is using a blinn half angle vector in conjuction with the phong reflection vector to liven up the surfaces which do not reflect like to you. Of course this would ONLY be with diffuse light. Also, keep in mind they where using specular highlights blended with the diffuse lighting on surfaces (dirt, wood, etc) which gave them that "plastic shiny" appearance. Diffuse and specular are now computed seperately and although this may seem slower, it isn't actually and has proven to be much faster. A reflection vector is calculated for each and every dynamic light now and does not use the matrix, which is also faster as the matrix multiply is fairly intensive. So, this means outdoors, the reflections you see are in full accordance with phongs reflection vector and that you will get reflections based on the dot product of your viewing angle and the angle of reflection. Diffuse is being calculated roughly the same but it is calculated by the dot product of the incoming light angle and the reflection vector. In the combination stage, diffuse lights are alone and specular has the diffuse color (greyscale brightness as specular has no color) blended with it to keep specular highlights vibrant while creating a realible imperical reflection model.

The lighting portion is almost finished. All lights, indoor, out, sun are full phong and the game runs rediculously faster. Next one the list is the fake ass HDR (it should wrap around the trees damnit!) and several consmetic and performance enhancements on a smaller scale (I worked backwards starting with the hardest part
 

apoppin

Lifer
Mar 9, 2000
34,890
1
0
alienbabeltech.com
anyone using the NivenhBro shader modifications ...

i ain't trying it till he fixes the ATi side of it

very interesting discussion ... i am glad HE is dissecting the engine ...
i would be so LOST.
 

43st

Diamond Member
Nov 7, 2001
3,197
0
0
Originally posted by: apoppin
anyone using the NivenhBro shader modifications ...

i ain't trying it till he fixes the ATi side of it

very interesting discussion ... i am glad HE is dissecting the engine ...
i would be so LOST.

Yes, I think it's a bit more accurate, but less 'bright' and less shiny as well. The performance increase is also nice considering it's a newer shader method. It doesn't hurt to test it though, you can always delete the shaders folder if it's not to your liking.

You can use the new shaders with an ATI card if you manually delete the shadow.h file after installing the modification. Or wait for a more formal fix from NivenhBro.
 

Gstanfor

Banned
Oct 19, 1999
3,307
0
0
Originally posted by: apoppin
anyone using the NivenhBro shader modifications ...

i ain't trying it till he fixes the ATi side of it

very interesting discussion ... i am glad HE is dissecting the engine ...
i would be so LOST.

I'm using them. They are a nice visual improvement.

The xray engine is pretty straight forward and fun to muck around with.
 

apoppin

Lifer
Mar 9, 2000
34,890
1
0
alienbabeltech.com
i'll check it out as the fixes mature

i am pretty done with STALKER ... i don't there is any replayablilty

hopefully there will be an expansion

is the toolset available for fans to add their own content ?
[i haven't been keeping up]
 

Gstanfor

Banned
Oct 19, 1999
3,307
0
0
I think we are still waiting for the SDK, not that that has stopped the modders. They have already figured out how to enable motion blur and get the cars functional just as quick examples. It will be interesting indeed to see what level creators can do with the engine once we do get the SDK.
 

apoppin

Lifer
Mar 9, 2000
34,890
1
0
alienbabeltech.com
cook ... thanks ... evidently you have been keeping up
:thumbsup:

i look forward to more content as well as the mods ... looks like a pretty flexible engine
 

blckgrffn

Diamond Member
May 1, 2003
9,198
3,185
136
www.teamjuchems.com
Originally posted by: Gstanfor
I think we are still waiting for the SDK, not that that has stopped the modders. They have already figured out how to enable motion blur and get the cars functional just as quick examples. It will be interesting indeed to see what level creators can do with the engine once we do get the SDK.

A question I have is how one guy could tidy up so much of the shader code so quickly. Makes you think they could have waited ~3 months and had a really high quality game (rendering wise) to sell, given they had that kind of talent in house.

Nat
 

Drayvn

Golden Member
Jun 23, 2004
1,008
0
0
Originally posted by: blckgrffn
Originally posted by: Gstanfor
I think we are still waiting for the SDK, not that that has stopped the modders. They have already figured out how to enable motion blur and get the cars functional just as quick examples. It will be interesting indeed to see what level creators can do with the engine once we do get the SDK.

A question I have is how one guy could tidy up so much of the shader code so quickly. Makes you think they could have waited ~3 months and had a really high quality game (rendering wise) to sell, given they had that kind of talent in house.

Nat

Waiting 3 more months on top of the 6 years its already been in development probably wouldnt have been all that good.
 
Jan 31, 2002
40,819
2
0
Originally posted by: 43st
Originally posted by: apoppin
STALKER is a 7 year old engine

This is misleading. You imply the engine was complete and working 7 years ago. You'll never find a 7 year old build of the X-ray engine. I mean how could they even support DirectX 9 7 years ago??? DirectX 8 wasn't even released then and it's the lowest version supported by the engine.

Bookmarked for when I get home ...

Will need to try these shader mods, my system is getting beaten badly. Does this help static-lit performance any?

- M4H
 

Gstanfor

Banned
Oct 19, 1999
3,307
0
0
Originally posted by: blckgrffn
Originally posted by: Gstanfor
I think we are still waiting for the SDK, not that that has stopped the modders. They have already figured out how to enable motion blur and get the cars functional just as quick examples. It will be interesting indeed to see what level creators can do with the engine once we do get the SDK.

A question I have is how one guy could tidy up so much of the shader code so quickly. Makes you think they could have waited ~3 months and had a really high quality game (rendering wise) to sell, given they had that kind of talent in house.

Nat
Its amazing what a "fresh broom" can accomplish sometimes. Sometimes with code you get too familiar with it and can't see another way of doing things.

Originally posted by: MercenaryForHire
Originally posted by: 43st
Originally posted by: apoppin
STALKER is a 7 year old engine

This is misleading. You imply the engine was complete and working 7 years ago. You'll never find a 7 year old build of the X-ray engine. I mean how could they even support DirectX 9 7 years ago??? DirectX 8 wasn't even released then and it's the lowest version supported by the engine.

Bookmarked for when I get home ...

Will need to try these shader mods, my system is getting beaten badly. Does this help static-lit performance any?

- M4H

It won't help static or semi dynamic performance modes at all. It should make a difference in how playable full dynamic mode is for you though.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |