Retrieving Mouse Coordinates
by Martin Banks · in Torque 3D Professional · 01/29/2010 (4:45 pm) · 1 replies
I want to retrieve mouse coordinates, convert them to screen coordinates, and pass them to a pixel shader every frame. How can I do this?
About the author
Torque Owner Ivan Mandzhukov
Liman3D
You will receive these coordinates in pixels and you will have to divide them with the screen area in order to have values in [0,1] range.
processedShaderMaterial.cpp is a good place to set shader constants.