Home Forums Games202-高质量实时渲染 [作业1] 地板边缘渐变灰色解决方法

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #8049 Score: 2
      Dan
      Participant
      2 pts

      在 shadowmap 中,没有被记录深度的纹素 unpack 之后得到的值是 0,因此在地板边缘处进行 shadowmap 的随机采样时,会采样到深度为 0 的纹素,这些会被当作遮挡来处理。为解决这个问题,只需手动将 unpack 出来深度为 0 的值设置成 1: if (abs(depth) < EPS) depth = 1.0; 即可。

      This post has received 2 votes up.
      Attachments:
      You must be logged in to view attached files.
    • #8121 Score: 1
      chang
      Participant
      2 pts

      还有一种解决办法,可以在画深度图之前将深度图clear成全1

      This post has received 1 vote up.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.