Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 May 2004
Offline Last Active Jul 10 2013 03:05 PM

Topics I've Started

Deferred SSDO

27 June 2013 - 03:00 PM

Hello! I've been reading this page recently,


The idea is quite straightforward and it's quite easy to replace existing ssao implementation. However, one thing really confused me was that the author said, 'the local occlusion function can be reconstructed by the dot product of occlusion coefficients and light vector'?

AFAIK, if calculating diffuse lighting, we also need to project incoming light to the shpere, then do a dot product between both coefficients.


Just wondering why a simple dot product between occlusion coefficient and light vector is sufficient in this case. Anyone can help explain the math behind it? Or is there any paper describing the detail/trick?


shadow map for transparent objects

14 October 2005 - 10:10 PM

i've got my shadow map working correctly. but when i started to render the shadow for my trees, i met another problem - how to handle with a transparent object, such as the leaves of a tree. so i wrote a simple demo just for a test. i render the depth map with the alpha info from the texture, and it works fine. but when i tried to add more leaves, the result was wrong, the alpha portion of an object culls the object below :( i'm using a FP texture as render target to do the first pass. i think with a GF3+ card, i can render the whole world in normal way, and get the DST quickly without such problem. but i'm using an ATI card...so any good idea? [Edited by - bybw on October 18, 2005 7:25:57 AM]

How to get the z buffer as a texture?

28 September 2005 - 06:29 PM

I want to get a z buffer texture with D3DFMT_A8R8G8B8. I've tried to use D3DXLoadSurfaceFromSurface(), but got a corrupt image. Any one knows how to do this? some samples would be better.

reflection (use GLSL)solved

29 December 2004 - 06:15 PM

hello, i've got the my reflection work in fixed pipeline, but i met some trouble when using shader. the reflection texture is already stored in ref_tex and set to texture0.
void main(void)
gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_Vertex;

uniform sampler2D tex;
void main (void)
gl_FragColor= texture2DProj(tex, gl_TexCoord[0]);


// here i got the texture matrix i've setup, right?

// get location and set uniform
shader.setUniform1i("tex", 0);

glBindTexture(GL_TEXTURE_2D, ref_tex);

// draw water plane
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0, 0);
glVertex3f(-size, 0, -size);
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 1, 0);
glVertex3f(-size, 0, size);
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 1, 1);
glVertex3f( size, 0, size);
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0, 1);
glVertex3f( size, 0, -size);


fixed pipeline(use automatically generated texcoord, the reflected image is right): use shader(the image was distorted): i dunno how this could happen. any help would be appreciated. [Edited by - bybw on December 31, 2004 9:13:34 AM]

3d file format using xfrog

11 October 2004 - 04:52 PM

Is there anyone using xfrog? www.inf.tu-dresden.de/ST2/cg/downloads/publicplants/ You can see the plants, they just like what in the real world! But I don't know how to import the model(.xfr file) into my project. Who can help me?? cheers, chaz