Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualTasaq

Posted 11 January 2013 - 12:03 PM

But apparently I’m not always getting to the pixel shader and it stops in the vertex for some reason. (I have modified the pixel shader to output always a red pixel, so I know when it goes through).
Are You sure about that? :)
It will only make red the object's you want to render (say, teapot for instance), everything else will be 'clear' color, since there's no object in that place, there's no need to 'pixel shader' it.

EDIT:
I also noticed You did this:

Matrix view = Matrix.CreateLookAt(modelTransform.Translation, new Vector3(0, 500, 75), Vector3.Up);

What happens now is that object is being culled (unless you set cull mode to none).
1st parameter is camera position, 2nd is LookAt, if you swap them(I believe You wanted to set the camera to look at your object) it might work :)

#3Tasaq

Posted 11 January 2013 - 12:02 PM

But apparently I’m not always getting to the pixel shader and it stops in the vertex for some reason. (I have modified the pixel shader to output always a red pixel, so I know when it goes through).
Are You sure about that? :)
It will only make red the object's you want to render (say, teapot for instance), everything else will be 'clear' color, since there's no object in that place, there's no need to 'pixel shader' it.

EDIT:
I also noticed You did this:

Matrix view = Matrix.CreateLookAt(modelTransform.Translation, new Vector3(0, 500, 75), Vector3.Up);

What happens now is that object is being culled (unless you set cull mode to none).
1st parameter is camera position, 2nd is LookAt, if you swap them(I believe You wanted to set the camera to look at your object) it might work :)

#2Tasaq

Posted 11 January 2013 - 12:01 PM

But apparently I’m not always getting to the pixel shader and it stops in the vertex for some reason. (I have modified the pixel shader to output always a red pixel, so I know when it goes through).
Are You sure about that? :)
It will only make red the object's you want to render (say, teapot for instance), everything else will be 'clear' color, since there's no object in that place, there's no need to 'pixel shader' it.

EDIT:
I also noticed You did this:

Matrix view = Matrix.CreateLookAt(modelTransform.Translation, new Vector3(0, 500, 75), Vector3.Up);

What happenes now is that object is being culled (unless you set cull mode to none).
1st parameter is camera position, 2nd is LookAt, if you swap them(I believe You wanted to set the camera to look at your object) it might work :)

#1Tasaq

Posted 11 January 2013 - 11:52 AM

But apparently I’m not always getting to the pixel shader and it stops in the vertex for some reason. (I have modified the pixel shader to output always a red pixel, so I know when it goes through).

Are You sure about that? :)

It will only make red the object's you want to render (say, teapot for instance), everything else will be 'clear' color, since there's no object in that place, there's no need to 'pixel shader' it.


PARTNERS