Jump to content
  • Advertisement

Stimpy83

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

155 Neutral

About Stimpy83

  • Rank
    Newbie
  1. I have try to implement these steps, but i'm having two problems.  First @ point 1 i take just the projection? what about the view? My second Problem is that i don't have a pixel based coordinate system. I' using Stage3D - An Flash Based Engine. My Output Values in the Shader must between 0-1. But when i delete step 3 i'm between 0-1 , but the labels still positon wrong. When i take the final vertex and multiply it against the ortho projection i see nothing - something wrong, don't know what. shaderV = "mov vt0 va0\n" + // Label Vertex "mov vt1 va1\n" + // Label Position // 1) Take the point of the object and multiply it by the [edit: perspective] projection matrix. This gives you the point in clip space. "m44 vt2 vt1 vc0\n" + // 2) Take the point in clip space and normalize its W-component "div vt2.xyzw vt2.xyzw vt2.wwww \n" + "add vt2 vt2 vt0\n" + "mov op, vt2\n" +
  2. Thank you very much for this info - i will try it today with my code. One thing is not really clear for me - On point 1 i take the world coordinate and multiply it with which projection - with the ortho or the perspective projection matrix?    Thanks.
  3. I'm using the World Position from the Label/Object(The Positions are the same) and the ModelViewProjection Matrix. I'm render the object with the same Matrix, only the Projection is different from the object rendering. When i render the label with the perspective matrix in the MovelViewProjection it look right, but perspective.
  4. Hi,   i have a simple question, because i'm a little bit confused. My scene render in perspective projection well, now i will overlay some Labels and other stuff without perspective. So i create an ortho perspective and render the stuff with this new projection. But the positions on the screen dosn't match. The label is not over the object. Why? I don't understand it. projection.perspectiveFieldOfViewLH(fov * Math.PI / 180, width / height, zNear, zFar); projectionOrtho.orthoLH(width , height, zNear, zFar); I'm using an fov of 45 degree. Have somebody some idea why the positions dosn't match?   Thanks.
  5. Hi, i'm having a really big problem to understand the pointAt function from stage3d. I think that pointAt does the same like lookAt in OpenGL - But i don't get it right. Target: I need a simple Camera with a target, like a target camera in 3D Max or Blender... something like this: And my Code is - So i understand the function: [source lang="java"]view.identity(); target.x = position.x; target.y = position.y; target.z = 0; view.appendTranslation( -position.x, -position.y, -position.z); view.pointAt( target, at, up ); view.invert(); // at = 0,1,0 // up = 0,0,1 // Because Z is my UpVector[/source] So - When i move the camera i don't have a target camera - my map rotates and fly away I really don't understand the parameters for pointAt - Can somebody explain me how pointAt works? The Adobe Docu don't say many.... Big Thanks and sry for my bad english
  • 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!