Global variables such as view_position, light0, etc..

Discussion in 'Rendering Technology and APIs' started by VFX_Veteran, Oct 14, 2003.

  1. VFX_Veteran

    Regular Newcomer

    Joined:
    Mar 9, 2002
    Messages:
    656
    Likes Received:
    176
    What space are these assumed to be in?

    I'm assuming object space.

    -M
     
  2. NeARAZ

    Newcomer

    Joined:
    Apr 24, 2003
    Messages:
    97
    Likes Received:
    1
    Location:
    Kaunas, LT
    Short answer: the ones that you need them to be :)
    Longer one: it's all programmable nowadays, so what are the spaces, what are the calculations etc. it's all up to you. Several common approaches are:
    1. lights in world space. Then you have to xfrom your normals into world space in a vertex shader for each vertex.
    2. lights in object space. Then you have to xfrom lights into object space before rendering each object.
    Each has pros and cons, as always :) Ditto with eye position and other things.
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...