Jump to content

  • Log In with Google      Sign In   
  • Create Account


orenk

Member Since 04 Aug 2007
Offline Last Active Dec 25 2013 06:00 AM

Posts I've Made

In Topic: Fair Price For Cross Platform Video Solution? VOTE To make a change...

08 August 2012 - 05:13 AM

you are right that commercial can afford expensive video player fees but still, lets says is a game running on 5 platforms, and pay lets say 40 K for all, i think they would be happy to know that they can pay only 15 K - though it won't hurt them to pay the 40 K.

you mentioned bink so open source solutions are out of the question as they are not close to what binks gives you in terms of speed and features.

think like if you had only NVIDIA or AMD/ATI, they could take every price and you would pay because you don't have any choice, but today, you have a choice, you can choose based on price and features and buy AMD/ATI or NVIDIA.

what i'm trying to do, is to give people a choice, and choose based on price and features.

In Topic: Fair Price For Cross Platform Video Solution? VOTE To make a change...

08 August 2012 - 04:31 AM

Hi Hodgman
Per platform, per game...
if you will need few platforms for the same game then you will talk with me and you'll get discount depends on platforms and future deals.
keep in mind that i want to get approx price for the standart per platform per game and not prices for all types of licenses (such multi platform, bundle, bulk/publisher deal etc...) that's why i only put 6 choices (3-indie, 3 -commercial) to make it simple.

In Topic: Fair Price For Cross Platform Video Solution? VOTE To make a change...

08 August 2012 - 03:53 AM

Thanks for your replay
most of the videos could be created via engine cut scene editor or video grabbers like fraps, some videos is third party related such as nvidia, intel, havok etc...

In Topic: SSAO seems strange, help needed...

19 July 2008 - 03:41 AM

ok, fixed the corner and also found the depth error
it seems that when i output: length(In.vPositionView.xyz) it creates the sphere shape and the depth info isn't correct.
so now my depth shader look like this:
// Vertex shader output structure
//-----------------------------------------------------------------------------
struct VS_OUTPUT_DEPTH
{
REAL4 vPosition : POSITION;
REAL3 vNormal : TEXCOORD0; // normal
REAL4 vPositionView : TEXCOORD1; // linear depth
REAL fDepth : TEXCOORD2; // linear depth
};

//-----------------------------------------------------------------------------
// Vertex shader
//-----------------------------------------------------------------------------
VS_OUTPUT_DEPTH RenderSceneDepthVS(VS_INPUT In)
{
VS_OUTPUT_DEPTH Output;

// Transform the position from object space to homogeneous projection space
REAL4 vertexWorld;
Output.vPosition = TransformVertex(In.vPosition, vertexWorld);

// output linear depth (view/camera space z)
REAL4x4 matWorldView = mul(g_matWorld, g_matView);
Output.vPositionView = mul(In.vPosition, matWorldView);
Output.fDepth = Output.vPositionView.z; //Output.vPositionView.z;
Output.vNormal = mul((In.dwNormal)*2-1, (REAL3x3)matWorldView);

return Output;
}

//-----------------------------------------------------------------------------
// Pixel shader
//-----------------------------------------------------------------------------
REAL4 RenderSceneDepthPS(VS_OUTPUT_DEPTH In) : COLOR
{
return REAL4(normalize(In.vNormal.xyz), In.fDepth);
// return REAL4(normalize(In.vNormal.xyz), length(In.vPositionView.xyz));
}
[/source]

ssao shader:

//-----------------------------------------------------------------------------
// Vertex shader
//-----------------------------------------------------------------------------
VS_OUTPUT_SSAO RenderSceneVS(VS_INPUT_SSAO In)
{
VS_OUTPUT_SSAO Output;

// Transform the position from object space to homogeneous projection space
In.vPosition.xy = sign( In.vPosition.xy);
Output.vPosition = REAL4( In.vPosition.xy, 0.0f, 1.0f);
Output.vTexCoords = In.vTexCoords;

//Output.vViewDirToFrustumCorner = REAL3(In.vPosition.xy,1)*g_vDirection.xyz; //REAL3(farX*Output.vPosition.x, -farY*Output.vPosition.y, g_fFarClipPlane);
Output.vViewDirToFrustumCorner = REAL3(-In.vCorner.x, -In.vCorner.y, In.vCorner.z);
return Output;
}

//-----------------------------------------------------------------------------
// Pixel shader
//-----------------------------------------------------------------------------
REAL4 RenderScenePS(VS_OUTPUT_SSAO In) : COLOR
{
//reconstruct eye-space position from the depth buffer
REAL4 data = tex2D(DepthSampler, In.vTexCoords);
REAL3 se = data.w * normalize(In.vViewDirToFrustumCorner);

REAL3 randNormal = tex2D( RandNormalSampler, In.vTexCoords*20).rgb;
REAL3 normal = normalize(data.xyz);

// return se.xyzz;
// return In.vViewDirToFrustumCorner.xyzz;
// return depth*0.001;
REAL3 tangent = ddy(se);
REAL3 binormal = ddx(se);
normal = cross(normalize(tangent), normalize(binormal));
// return REAL4(normal.xyz,1);

const int num_samples = 16;
REAL finalColor = 0.0f;
for (int i = 0; i < num_samples; i++)
{
REAL3 ray = reflect(samples[i].xyz, randNormal);// * g_fSampleRadius;

// add view space normal and bias
ray += normal * g_fNormalBias;

// new (view-space) sample in a sphere of sampleRadius
REAL4 sample = REAL4(se + ray * g_fSampleRadius, 1.0f);

//determine clip-space locations of our current sample point
REAL4 ss = mul(sample, g_matProjection);

//determine the texture coordinate of our current sample point
REAL2 sampleTexCoord = 0.5f * (ss.xy/ss.w) + REAL2(0.5f, 0.5f);
sampleTexCoord.y = 1.0 - sampleTexCoord.y;

//read the depth of our sample point from the depth buffer
REAL sampleDepth = tex2D(DepthSampler, sampleTexCoord).w;

//compute our occulusion factor
REAL depth_diff = g_fDistanceScale * max(data.w - sampleDepth, 0.0f);
if (depth_diff > g_fOccludeDist)
{
finalColor++;
}
else
{
finalColor += 1.0 / (1.0f + (depth_diff*depth_diff));
}
}

REAL col = finalColor/num_samples;
return REAL4(col, col, col, 1.0f);
}



now the screenshots:
se:
Image Hosted by ImageShack.us<br/>By orenk2k at 2008-07-19

corner:
Image Hosted by ImageShack.us<br/>By orenk2k at 2008-07-19

normals: (calc on the fly within ps)
Image Hosted by ImageShack.us<br/>By orenk2k at 2008-07-19

ssao: without depth check
Image Hosted by ImageShack.us<br/>By orenk2k at 2008-07-19

ssao: with depth check
Image Hosted by ImageShack.us<br/>By orenk2k at 2008-07-19

as you can see, i'v fixed few things - no tris edges and no strange white edges poping while moving my camera but there is still one problem left:
the problem now is the halo effect around the objects, which i tried to remove by comparing depth diff against a threshold and if its bigger i continue without adding occlusion term else do the usual thing.
but there is some strange white pixels around and when i composite the final picture your can show some bright areas around the the objects (inside the halo), this is not so great :(
i'v checked your code agi and i played with your shader, i can't understand how your shader works and mine dont. i even tried to do exactly what you are doing and it still did work like yours. also i saw you output the length of eye space pos inside your fragment shader and its gives you good depth info (no sphere shape around you eye pos).
any ideas what could be the problems?
btw: what gfx api are you using, GL or DX?

In Topic: SSAO seems strange, help needed...

18 July 2008 - 06:55 AM

hi
i seems the corner was not the problem at the first place, the depth generation is the problem.
what i'v done is setup the corners in normal attribute like agi said, and use it, then i saw its the same like i had before, no gradient depth in 'se'
so i change my depth shader to output interpolated eye space position and at the pixel shader i take the length.
new depth shader:


struct VS_OUTPUT_DEPTH
{
REAL4 vPosition : POSITION;
REAL3 vNormal : TEXCOORD0; // normal
REAL4 vPositionView : TEXCOORD1; // linear depth
};

//-----------------------------------------------------------------------------
// Vertex shader
//-----------------------------------------------------------------------------
VS_OUTPUT_DEPTH RenderSceneDepthVS(VS_INPUT In)
{
VS_OUTPUT_DEPTH Output;

// Transform the position from object space to homogeneous projection space
REAL4 vertexWorld;
Output.vPosition = TransformVertex(In.vPosition, vertexWorld);

// output linear depth (view/camera space z)
Output.vPositionView = mul(In.vPosition, mul(g_matWorld, g_matView));
Output.vNormal = mul((In.dwNormal)*2-1, (REAL3x3)g_matWorldView);

return Output;
}

//-----------------------------------------------------------------------------
// Pixel shader
//-----------------------------------------------------------------------------
REAL4 RenderSceneDepthPS(VS_OUTPUT_DEPTH In) : COLOR
{
return REAL4(normalize(In.vNormal.xyz), length(In.vPositionView.xyz));
}



this gives the gradient effect and the ssao look fine now, but now i see some black sphere shape around my view pos (some depth issue), very strange:
see the screenshots maybe you have some comments:

Image Hosted by ImageShack.us<br/>By orenk2k at 2008-07-18
top view: (see the sphere shape around my view pos)
Image Hosted by ImageShack.us<br/>By orenk2k at 2008-07-18
another one:
Image Hosted by ImageShack.us<br/>By orenk2k at 2008-07-18

PARTNERS