Unity custom skybox

1. Environmental Skybox

1. Import texture resources and modify properties

Texture Type:Default

Texture Shape:Cube

Wrap Mode: Clamp (select Clamp to avoid splicing lines)

 2. Create a new material ball and modify its properties.

Shader:Skybox/Cubemap

Tint Color:(255,255,255,128)

Exposure:0.6

3. Drag the image resource just now into the Cubemap (HDR) position

4. Open the sky box modification panel, Window->Rendering->Lighting

5. Select the Environment panel and drag the skybox material you just created into the Skybox Material position.

6.Effect

 

2. Camera Skybox

1. Add the SkyBox component to the camera and drag the sky box shader into the Custom SkyBox

 

3. Code to dynamically set up the skybox

 public Material skyBoxMaterial;

 void ChangeSkyBox(){
   RenderSettings.skybox = skyBoxMaterial;
}

 

Guess you like

Origin blog.csdn.net/qq_2633600317/article/details/131848062