Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


stefthedrummer

Member Since 19 Jun 2013
Offline Last Active May 04 2014 02:05 AM

Posts I've Made

In Topic: Image Image-LoadStore vs Shader-Storage-Buffer-Object

02 May 2014 - 12:15 PM

Oh interesting face:

I just played around with my SSBO.

 

and changd:

layout(shared) buffer Classification
{
	float	h[MAX_FACES];
};

to

layout(std430) buffer Classification
{
	float	h[MAX_FACES];
};

now the stride is sizeof(float).

But since my application is very performance critical (the algorithm will be running for hours) I still want to know what's up.

std430 now gives me a "good" alignmen, but "shared" offers a implementation specific optimized layout.

So my GPU (Radeon 6950) must have a reason to stride it the way it is?!?


In Topic: Image Image-LoadStore vs Shader-Storage-Buffer-Object

02 May 2014 - 10:32 AM

Thank you very much Ohforf sake. Very good post.

 

Now for the last open question:

 

* why is a float[]-array not tighly packed when declared in a SSBO. ??? There is always a stride of sizeof(vec4).

* ... why does this make sense ???

I read that GPU preferabley have 128bit registers.

so this could explain the odd allignment. I also remember quite briefly, that if it was tightly packed, the ALU would have to mask out single 32bit packets and store them in a register.


In Topic: 2D point light shadow - depth interpolation problem

13 April 2014 - 03:56 AM

I fixed the problem.

 

The thing is that you can't do:

gl_Position = vec4(
		vs.lightSpace.y / vs.lightSpace.x,
		0.0f,
		depthToHom(vs.lightSpace.x),
		1.0f);

because the

vs.lightSpace.y / vs.lightSpace.x

is a perspective divide - and you can't interpolate already divided values. 

 

The Fix:

gl_Position = vec4(
		vs.lightSpace.y,
		... ... ...,
		... ... ...,
		vs.lightSpace.x);

The divident and divisor of the perspective projection have to be interpolated independently in order to guarantee a perspective correct interpolation of depth values.

also the "... ... ..." have to be modified, but that's not essential to the point I'm trying to make.

 

- This cost me a hole day to figure out- dry.png


In Topic: 2D point light shadow - depth interpolation problem

11 April 2014 - 01:27 PM

I still want to known, where my math is wrong. Every context in my rendering is linear. So why do I see a curve?!

When I insert more points it gets better.

 

I dumped the content of my shadow-map to see whats wrong.

(The two color-transitions represent the content of the shadowMap - you can see - they are not the same - even though they should be)

 

0003.png


In Topic: 2D point light shadow - depth interpolation problem

11 April 2014 - 01:19 PM

...using screenspace raytracing.

What do you mean by "screenspace raytracing".

 

Do you mean:

for every light L - and every angle Alpha - you start at the origin of L and trace the direction given by Alpha until you hit a blocker in your fbo?


PARTNERS