Raw tex2D(ShadowMap, ShadowTexCoord)
Blured version of tex2D(ShadowMap, ShadowTexCoord)
Shadow comparison
Avtor
Data
0
//
Soft shadow support
I have added PCSS support to my software.
You can see results on the image.
Performance is not bad neither.
3 Spotligths 16 samples blocker search, 16 samples PCF.
It took me a day to tweek everything, so that now it is more or less error prone (i hope).
Some links:
http://developer.download.nvidia.com/whitepapers/2008/PCSS_Integration.pdf
Avtor
Data
0
//
So whats new now






Avtor
Data
0
//
back to the 32bit roots ?
Profiler in VS2005 on 64-bit OS is not working !?
Nor is profiling in VS2008 working on wow64. Damn.
Avtor
Data
0
//
As always, shadows on my mind... poor man's VSM mapping
Pros: Quite fast with soft edge (non-realistic) shadows
4. A SSAO full resolution pass 
Final result: lightning with modulated shadowing from 2 spot lights and combined SSAO pass. Notice smooth shadows of the far wall.
Edge detect using shadow contribution pass and SSAO post process, could be used to do different blurs depending on depth change.
Avtor
Data
0
//
darkness is comming...
this SSAO thing, I kinda like it ;)
Post process passes: SSAO->DownSample->BlurH->BlurV->UpSample->Overlay
Depth Texture size: 256x256, Normal Texture size: 1024
Normal texture size should be bigger to avoid artifacts.
BUT... the more i look at it, the more creases bother me. So its acctualy "Ambient Occlusive Crease Shading". This paper is more interesting.
Avtor
Data
0
//
SSAO
Image space ambient occlusion or Screen space ambient occlusion, based on http://www.shalinor.com/code.html and http://rgba.scenesp.org/iq/computer/articles/ssao/ssao.htm
gpgpu forums
code for copy paste ... but more instructions...maybe change g_cKernelSize to 8 or 12...
//-----------------------------------------------------------------------------
// File: PP_SSAO.fx
//
// Desc: Effect file for image post-processing sample. This effect contains
// a single technique with a pixel shader that calculates simple SSAO
// uses full screen depth and normals
//-----------------------------------------------------------------------------
texture Albedo; // Here are normals
texture NormalMap; // Here is depth
//--------------------------------------------------------------------------------------
// Texture samplers
//--------------------------------------------------------------------------------------
sampler AlbedoSampler = sampler_state {
Texture = (Albedo);
MipFilter = LINEAR;
MinFilter = LINEAR;
MagFilter = LINEAR;
ADDRESSU = WRAP;
ADDRESSV = WRAP;
};
sampler NormalMapSampler = sampler_state {
Texture = (NormalMap);
MipFilter = NONE;
MinFilter = LINEAR;
MagFilter = LINEAR;
ADDRESSU = WRAP;
ADDRESSV = WRAP;
};
static const int g_cKernelSize = 24;
float2 PixelKernel[g_cKernelSize ] = {
{-0.326212f, -0.405805f},
{-0.840144f, -0.07358f},
{-0.695914f, 0.457137f},
{-0.203345f, 0.620716f},
{ 0.96234f, -0.194983f},
{ 0.473434f, -0.480026f},
{-0.519456f, 0.767022f},
{ 0.185461f, -0.893124f},
{ 0.507431f, 0.064425f},
{ 0.89642f, 0.412458f},
{-0.32194f, -0.932615f},
{-0.791559f, -0.597705f},
{ 0.326212f, -0.405805f},
{ 0.840144f, -0.07358f},
{ 0.695914f, 0.457137f},
{ 0.203345f, 0.620716f},
{-0.96234f, -0.194983f},
{-0.473434f, -0.480026f},
{ 0.519456f, 0.767022f},
{-0.185461f, -0.893124f},
{-0.507431f, 0.064425f},
{-0.89642f, 0.412458f},
{ 0.32194f, -0.932615f},
{ 0.791559f, -0.597705f}
};
float2 TexelKernel[g_cKernelSize]
< convertpixelstotexels512 = "PixelKernel">;
//float3 Settings (AOCreaseValues - Range, Bias, Averager, Unused)
float4 Settings = { 0.4196,-0.2510,4.8471,3.0627 };
float4 SettingsB = { 25.8824,1.0000,1.0000,1.0000 };
float4 PostProcessPS( float2 Tex : TEXCOORD0 ) : COLOR0
{
// Get center sample
float UVlr = 1/256;
float2 centeredUV = Tex;
float3 centerPos = tex2D(AlbedoSampler, centeredUV).xyz; // normals
float3 centerNormal = tex2D(NormalMapSampler, centeredUV).xyz; // depth
float4 totalGI = 1.0f;
float GI = 0.0f;
// Run through all taps
for (int i = 0; i < sampleuv =" centeredUV" samplepos =" tex2D(AlbedoSampler," tocenter =" samplePos" distance =" length(toCenter);" centercontrib =" saturate((dot(toCenter,centerNormal)" rangeattenuation =" 1-saturate(distance" totalgi =" float4(GI,GI,GI,1.0f);" vertexshader =" null;" pixelshader =" compile" zenable =" false;">
Avtor
Data
0
//









