Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

Simple Maths , Screen coordinate

Started by nini Oct 6, 2004 at 2:29 AM 0 replies 600+ views
Original Post
nini
nini
hi , i'm implementing a lens flare effect , what i'm doing is simple, i translate Light position from World Space to Screen Space like this : LightPos * MatView * MatProj but the coordinate i found are false... how to project LightPos in Screen Coordinate ? Should i take care of ViewPort Transformation & Scaling ? Thanx for your answers ...
_DarkWIng_
_DarkWIng_
After that matrix multiplication you need to do perspective divide to get normalized device coordinats and then remap them to viewport. I sugest you take a look at redbook how opengl does this. DX probably has simmilar help resources.
You should never let your fears become the boundaries of your dreams.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.