formZ SDK | 5.0 API Reference | Project | Modeling | Rendering | Shaders

# fz_shdr_get_view_eye

Description

Gets the eye point from where the current view ray originates. This point is not necessarily the same as the eye point of the current view. In a perspective view, the two are the same. In a projection view, this point is different for each pixel rendered. This is the inverse of the direction of the view ray, which is constant for projection views, but different for each pixel in a perspective view.
Note, that this function only has a meaningful use when called from a shader's pixel function. When called from any other place, the resulting xyz value is undefined.

Plugin Prototype

void fz_shdr_get_view_eye(

fz_xyz_td* | view_dir )

Parameters

view_dir [Result]

The current pixel's view origin (eye point)

Returns

none

Availability

5.0.0.0

Function Set

fz_shdr_fset

Defined in

fz_rzne_shdr_api.h