Jump to content

  • Log In with Google      Sign In   
  • Create Account

d0nuts

Member Since 21 Jan 2013
Offline Last Active Jun 02 2016 11:45 AM

Posts I've Made

In Topic: Finding normals using uniform b-spline derivative on a heightmap

03 April 2016 - 03:41 PM

Or can anyone help me understand the wording from this gpugems article:

 

To compute the gradient in higher dimensions, we obtain the corresponding filter kernels via the tensor product of a 1D derived cubic B-spline for the axis of derivation, and 1D (nonderived) cubic B-splines for the other axes.

 


In Topic: Framebuffer - render to texture trouble

28 January 2013 - 11:21 AM

So the problem was using all of the EXT functions and variables instead of the normal ones (ex. glBindFramebufferEXT() instead of glBindFramebuffer() ).


In Topic: Sampling depth texture

22 January 2013 - 09:27 PM

Awesome! Thank you!


In Topic: Sampling depth texture

22 January 2013 - 10:05 AM

Found it! Apparently there is something called cgEnableTextureParameter(). I don't understand why you would set a texture parameter but not have it enabled :/

But my question about the projection still stands!

In Topic: Sampling depth texture

22 January 2013 - 09:46 AM

Sorry for the confusion. Let me try rewording it. With the simplest shader just outputing a color, it fills the screen. But when I project the points by multiplying by the modelviewproj and check if they are within the bounds of the screen, only the top corner projects into this range. Am I misunderstanding something about projection?

 

And I tried this fragment shader with just pass-through texture coordinates and am still getting all black.

 

ShadowVisualDataPixelOutput ret;

float depth = tex2D(depthTex, pdi.texture).x;
if (depth == 0.0f) {
	ret.color = float4(0,0,0,0);
	return ret;
} else {
	ret.color = float4(depth, depth, depth, 1);
	return ret;
}

PARTNERS