Camera & render

Source: Internet
Author: User

1. Void render ();

Description

Render the camera manually.

This will render the camera. It will useCamera's clear flags,Target textureAndAll other settings.

 

 

 

The camera will send onprecull, onprerender & onpostrender to any scripts attached, and render any eventual Image filters.

This is Used for taking precise control of render order. To make use of this feature, Create a camera and disable it. Then call render on it.

 

You are not able to call the render function from a camera that is currently rendering. If you want to do this create a copy of the camera, and make it match the original one using copyfrom.

2. Void copyfrom (CAMERA other );

Description

Makes this camera's settings match other camera.

This will copy all camera's variables (field of view, clear flags, culling mask,...) from otherCamera. it will also set this camera's transform to match the other camera, as well as this camera's layer to match the layer of the other camera. 3. Static camera main; Description

TheFirst enabled cameraTagged "maincamera" (read only ).

Returns nullIf there is no such camera in the scene. this can be useful if you want one camera to match the other camera's setup, when doing custom rendering effects. for example when usingrenderwithshader. 4. Void renderwithshader (shader, string replacementtag); Description

Render the camera with shader replacement.

This will render the camera. It will use the camera's clear flags, target texture and all other settings.

The camera willNotSend onprecull, onprerender or onpostrender to attached scripts. Image filters will not be rendered either.

This is used for special effects, e.g. rendering screenspace normal buffer of the whole scene, heat vision and so on. to make use of this feature, usually you create a camera and disable it. then call renderwithshader on it.

You are not able to call the render function from a camera that is currently rendering. if you wish to do this create a copy of the camera, and make it match the original one using copyfrom. 5. resetreplacementshader (): void; Description

Remove shader replacement from camera.

Call this to end the effect of setting setreplacementshader. 6. setreplacementshader (shader: shader, replacementtag: string): void; Description

Make the camera render with shader replacement.

After calling this function, camera will render its view with shader replacement. Call resetreplacementshader to reset it back to normal rendering.

Camera & render

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.