Version: Unity 6.1 Alpha (6000.1)
Language : English
Output a motion vector texture from a camera
Troubleshooting camera output

Sample output textures in a shader

Depth textures are available for sampling in shaders as global shaderA program that runs on the GPU. More info
See in Glossary
properties. By declaring a sampler called _CameraDepthTexture you will be able to sample the main depth texture for the cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
.

_CameraDepthTexture always refers to the camera’s primary depth texture. By contrast, you can use _LastCameraDepthTexture to refer to the last depth texture rendered by any camera. This could be useful for example if you render a half-resolution depth texture in script using a secondary camera and want to make it available to a post-process shader.

In the Built-In Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
, the motion vectors texture (when enabled) is available in Shaders as a global Shader property. By declaring a sampler called ‘_CameraMotionVectorsTexture’ you can sample the Texture for the currently rendering Camera. When sampling from this texture motion from the encoded pixelThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary
is returned in a range of –1..1. This will be the UV offset from the last frame to the current frame.

Additional resources

Output a motion vector texture from a camera
Troubleshooting camera output