Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About brucile

  • Rank
  1. it is possible to update different part of texture of FBO in different passes? for example, the texture is 100 x 100. we first draw a quad convering 10 x100, then another 90 x 100. when updating 10 x 100 region, value in other part will be changed ? Thanks.
  2. I setup a renderbuffer with FBO. first pass set the value between [0 1] for depth buffer in pixel shader. second pass, disable the depth buffer write and perform z-cull. it seems to be working, because when I use differernt z value, the occlusion query gives different results. but the problem is, when use z value 0, and depth function GL_LESS, there are alot of pixel that don't pass. by my observation, the depth value stored seems to be in [-1 1]. how can this happen. in addtion, when I set GL_LESS, it works like GL_GREATER, since I increase the z - value , more pixels gets passing. weird.
  3. I am running a iterative algorithm which involves a series of float calculation on Nvidia Quadro FX1400, it seems program suffers from precision problem, first there is small error on gpu, and step by step, this samll errors is magnified, until the cpu and gpu produce different results, any hints for me ? ? Thanks !!!
  4. I am using FBO + depth buffer, depth buffer is the renderbuffer attached to FBO. when I call glClearDepth(), it doesn't setup the depth value for me ? any hints for me ? Thanks!!!
  5. brucile

    About using FBO + z-cull

    actually, I have called : glEnable( GL_DEPTH_TEST ); glDepthMask(GL_TRUE); but I don't know why, glClearDepth(0) doesn't work, the depth buffer's value cannot be changed? any hints for me ??
  6. brucile

    About using FBO + z-cull

    In fact, the depth value is computed by my pixel shader. I am using Nvidia Quadro FX1400, NV41. it should support writting depth with pixel shader.
  7. I am using z-cull with FBO. in first pass, pixel shader setup the depth value into the depth buffer. in second pass, z-cull takes effect. but it seems my pixel shader doesn't write the depth value into the depth buffer. Since all the depth value are 1. any idea for me ? I am using Nvidia QuadroFX1400(NV41) Thanks.
  8. With FBO + PBO + VBO, I first render into FBO, then, using data of FBO as vertex, I draw many points. the problem is, most of the point(i.e. the data in FBO) are the same, can OpenGL or GPU optimize it by drawing only one point when there are many same points. Or, just draw points one by one ?
  9. as the title says. I am using FBO now, and wish to use output of pixel shader as vertex data, is there any example code ? Thanks.
  10. Can commands below be included into the display list ? glGLBindProgram(_pDraw); glDrawBuffer (GL_COLOR_ATTACHMENT3_EXT); glActiveTexture(GL_TEXTURE0); glBindTexture(TEXT2D,_texTex); cgGLSetTextureParameter(_clauseDBParamII, _clauseDBTex); cgGLEnableTextureParameter(_clauseDBParamII); by the way, all the parameters and variable don't change for every pass of drawing.
  11. in a 3 pass rendering program, the first pass draw a quad, having 10K-100K pixels, each pixel shader computes a value. only 400 pixels with highest value goes to second pass. considering the speed, I don't want to read data back to CPU, how can I do it ? thanks!!!
  12. when using FBO, I can attach a stencil buffer and depth buffer to the FBO object, and then use these two buffers as texture in next pass?
  13. In Cg, when I write for ( i = 0 ; i < 1000; ++i), it does not work, it seems the value of i must be less than 256, is there anything we can do , apart from using nesting loops ?
  14. Sorry, I have got the answer, my definition of texture is right, but when I download data to texture, wrong data format is used. the correct one is GL_LUMINANCE!
  15. My Cg program uses both 4-channel and 1-channel float point textures, but the way 1-channel texture is sampled seems to be the same as the one of 4-channel. e.g. when sampling 1-channel texture tex0 by : texRECT(tex0,float2(1,0)), it actually read value of position(4,0) in tex0. blew is the definination of my 1-channel texture: glBindTexture(GL_TEXTURE_RECTANGLE_ARB,texID); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_WRAP_T, GL_CLAMP); glTexImage2D(GL_TEXTURE_RECTANGLE_ARB,0,GL_FLOAT_R32_NV,aWidth,aHeight,0,GL_LUMINANCE,GL_FLOAT,0); any idea for me ? :(
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!