jjp wrote:To hell with "correctness" when it comes to diffuse indirect lighting. This actually looks pretty decent
Praetor wrote:Unless you do a front and back face render and use them both for your AO and GI calculations. Of course, that'll be about twice as slow.
PolyVox wrote:Looks very cool! I trust you're following the current GameDev thread about this?
http://www.gamedev.net/community/forums ... _id=517130
// reflected direction to move in for the sphere
// (based on random samples and a random texture sample)
// bias the random direction away from the normal
// this tends to minimize self occlusion
float3 randomDir = reflect(RAND_SAMPLES[i], randN) + viewNorm;
// move new view-space position back into texture space
#define RADIUS 0.2125
float4 nuv = mul(ptMat, float4(viewPos.xyz + randomDir * RADIUS, 1));
nuv.xy /= nuv.w;
// compute occlusion based on the (scaled) Z difference
float zd = max(far * (depth - unpack(TEX2DLOD(depthMap, nuv.xy))), 0);
#define OCC_POW 11
occ += saturate(pow(1.0 - saturate(zd), OCC_POW) + zd);
// the colour-factor prevents leakage from near to far objects
float c = smoothstep(1, 0, saturate(zd));//zd > 0.75 ? 0 : 1;
light += TEX2DLOD(lightMap, nuv.xy).xyz * c;
numLightSamples += c;
Praetor wrote: In a normal scene it's really going to add a lot of realism.
_tommo_ wrote:Good to hear that
I have an X1950 pro, and considering the 50 fps on a 8800GTX... I don't have much hopes of it being playable
Will you release a demo of your "graphic framework"?
DanielSefton wrote:You're a genius, null!
What kind of overhead does it have? i.e. framerate with it on, and framerate with it off.
KungFooMasta wrote:Looks really sweet! I did notice in the first screenshots you posted, there are no shadows below the chairs. I don't know a lot about shadows, but thought I'd point that out, if it wasn't already obvious.
Users browsing this forum: No registered users and 2 guests