Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

interpolation

Name: Anonymous 2008-11-12 17:52

Hey guys
I'm writing some shaders (HLSL), and to do per-pixel lighting I need to calculate the cosine of the angle between the surface normal and the light direction. I would have to normalize the interpolated normal for every pixel, and calculating the lenght of a vector for every pixel is going to be quite expensive.
So there's my question, is there a way to lerp the dot product/the normal vectors so that the result will be accurate?

Name: Anonymous 2008-11-12 18:58

shaders (HLSL), and to do per-pixel lighting
There's no such thing.

Name: Anonymous 2008-11-13 2:24

There's no such thing.
what
elaborate

Name: Anonymous 2008-11-13 22:29

Use a normal map instead?

Name: Anonymous 2010-12-27 17:53

Name: Anonymous 2011-02-04 12:11

Name: Anonymous 2011-02-04 14:06

Name: Anonymous 2013-08-11 15:30

.   /             ヽ     //  /    / ',  i マミ:、     /
   /   思  私  こ  i   //| /!  ! !厶-|| |i |ニ,ハ┐ /
 . /    っ  が   ん   |  .| | | f‐|  |_リ,r==ミ.ル|i | 《_リ\/
  i     て  悦  な  |  :| | r==、 ‐┘´f⌒i ′|| | fハハ |  も   こ  な
  |     る  ぶ  も  |  :| ト、| f_} 、     ̄  jハ| jノj ! |
  |     の  と  の   |  :L|_l{     _     / ,ノイ´| ||  の   の  あ
 .!    ?     で  >     ヽ   └ '     /  | | ||
   '.             /       {`ト . _  / ,/イlハ.! ノィ|  は  粗  に
    \         /       '.l| | l/   /´/l从ーリ;‐:、|
     ` ー―‐一 ´         ∧|7    /: /  〃: : :|  ?  末  ?
                         ,イ | | \___,/ : :! 〃 : : : |
                      i |/ :|,r「|/-‐'': :| |iィニ: : '.     な
         . ―― 、        |:f : //| |: : : : : :,:| ||∧: : 、:∧
       /       \       〈ノ : L!_l┘: : : : :/| || |゙ー〈ム  、
     /          \-、    {`ヽ: :|: \:\X: :| |l |  | ヽ__\
 .   /       _     〈 \   j : : : ハ : : ヽ : : ∧ 'V   !/   `7ー-----
     ′    /-、      { ー`トく: : : :、_ : : : : f⌒\ |  /     /
   .′     /  ヽ    ヽ._ 廴 ヽ: : \: : : : f二  ヽ´  ,.  ´
   .′     . ′    '.      〉__廴  ': : :

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List