Jump to content

  • Log In with Google      Sign In   
  • Create Account


donguow

Member Since 10 Jan 2012
Offline Last Active Nov 11 2012 12:21 AM
-----

Topics I've Started

Disable pixel shader

24 June 2012 - 11:25 PM

Hi guys,

For some reasons, I want to disable the pixel shader (fragment shader). It means that the hardware will throw fragments away right after they come out of the rasterization stage so that the fragments can't be able to get into the next stage (pixel shader).

I know that we can disable rasterization stage by enabling RASTERIZER_DISCARD, is there any similarity with pixel? or any trick to do that?

Thank in advance,
-D

Processing time at vertex shader

07 June 2012 - 10:36 PM

Hi guys,

At the moment, I aim to estimate the time it takes to perform vertex processing. Say, I have a graphics rendering pipeline as follows:

-------------------- ------------------------ ------------------------
Vertices --->| Vertex Shader |-------> | Geometry shader | -------> .... --------> | Fragment shader | ------ Frame buffer -----> Display
-------------------- ------------------------ ------------------------

Now, I just want to estimate the average processing time at Vertex shader. Is there any possible way to do that?

Thanks in advance,
-D

Transform feedback problem

27 May 2012 - 11:48 PM

Hi all,

I got a problem with Transform Feedback and hope someone here can help me out. I want to capture vertex position and vertex normal while performing rendering and save the results into a frame buffer.

Here is a peace of code used to declare attributes that I want to record:
	 transform feedback const GLint loc[] = {
	 	 glGetVaryingLocationNV(program, "position"),
	 	 glGetVaryingLocationNV(program, "normal"),
	 };
	 glTransformFeedbackVaryingsNV(program, 2, loc, GL_SEPARATE_ATTRIBS_NV);

This peace of code goes after compiling the shaders and prior to linking them. But when I print out the results of loc, they all are -1.

Does this situation happen to anyone else? I would really appreciate if someone give me a help.

-D

Getting trouble with obtaining depth info

28 March 2012 - 07:54 PM

Hi guys,

I am trying to implement an app using Image Based Rendering (IBR) technique. At the very beginning stage, I try to get depth info from frame buffer. Here is a piece of code that I used to obtain depth info:
GLfloat* depth= new GLfloat[nWidth * nHeight];
glReadPixels(0, 0, nWidth, nHeight, GL_DEPTH_COMPONENT, GL_FLOAT, depth);
The result ends up looking pretty weird when I print it out.
for (int i = 0; i < nHeight * nWidth; i++)
cout << depth[i] << "   ";
depth[i] (i = 0, 1, 2,...) have the same value 1. Can someone give me an explaination?

Thanks in advance

problems with vcglib

22 March 2012 - 07:38 AM

Hi guys,

Has somebody here used vcglib? I got stuck in making it work with visual studio 2010. I will really appreaciate if someone gives me a hand.

Thanks,
Dongfung

PARTNERS