Jump to content
  • Advertisement

dark216

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

105 Neutral

About dark216

  • Rank
    Newbie
  1. I mean I built my house on the quicksand   thanks again
  2. thanks to you all.   "Don't build your house on the quicksand!" that means me, I'm gonna get this clear!
  3. guys, frankly, I thank you all for reply, but I still don't get it.   Why is this divide called perspective divide? and it's a  (x or y / depth) => tan( fov / 2) right?    I'm gonna go through some basic knowledge again, I must be missing sth, seriously!
  4. I read this pdf just been seeing your reply, this the same with yours from wiki   http://web.cs.ucdavis.edu/~amenta/s12/perspectiveCorrect.pdf   so you mean: the implementation of tex2D actually divides w from vertex automatically? like: notTex2D(_DispMap, i.uv.xy / i.vertex.w);   and    notTex2DProj(_DispMap, i.uv.xy / i.vertex.w / i.uv.w);   right?
  5. oh my poor English. Please, bear with me.   I'm trying to figure out the math in texture projection. and such shader code comes to me: half4 col = tex2Dproj( _GrabTexture, i.uvgrab); //half4 col = tex2D( _GrabTexture, i.uvgrab);   I found  the difference between tex2Dproj and tex2D is    half4 col = tex2Dproj( _GrabTexture, i.uvgrab); equals to half4 col = tex2D( _GrabTexture, i.uvgrab / i.uvgrab.w); what I don't get is the reason for this.   the concept of texture projection is finding the texcoord of each vertex in projector's draw call, and convert screen coords([-1,1],  [-1, 1], [ -1,1]) to clamped texture coords ([0,1],  [0, 1], [ -1,1]) . and then the modified screen coords can be used to sample frame buffer(rt) and draw those vertices again. But it seems to me at this point it's sufficed. I don't see the reason to divide the depth field.    can anyone give me a clue.    
  • 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!