Home Forums GAMES在线课程(现代计算机图形学入门)讨论区 作业三blinn phong shader的颜色差值不对

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #6736 Score: -1
      HiveYuan
      Participant
      -4 pt

      我在完成作业3的任务三的时候,发现t.color[2]的颜色取值很不正常,前两个很大,最后一个为负,导致我有些像素的interpolated_color也会为负数,代码如图2-1,t.color[2]的值如图2-2,结果图如2-3.
      然后我把t.color[0]直接传给shader,才能得到正常的图,代码如图1-1,结果如图1-2.
      但是我看论坛上大家都是直接传interpolated_color,想问一下各位大神我这个是怎么回事

      This post has received 1 vote up.
      Attachments:
      You must be logged in to view attached files.
    • #6741 Score: -3
      HiveYuan
      Participant
      -4 pt

      2-3图在这儿

      This post has received 1 vote down.
      Attachments:
      You must be logged in to view attached files.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.