Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetTextureFromGlobal

Binds a global texture to a RayTracingShader.
Read time 1 minuteLast updated 10 days ago

Definition

SetTextureFromGlobal(int, int)

Binds a global texture to a RayTracingShader.
public void SetTextureFromGlobal(int nameID, int globalTextureNameID)

Parameters

nameID

The ID of the texture as given by Shader.PropertyToID.

globalTextureNameID

The ID of the global resource as given by Shader.PropertyToID.

Remarks

The global texture must be previously set using Shader.SetGlobalTexture.

SetTextureFromGlobal(string, string)

Binds a global texture to a RayTracingShader.
public void SetTextureFromGlobal(string name, string globalTextureName)

Parameters

name

The name of the texture to bind.

globalTextureName

The name of the global resource to bind to the RayTracingShader.

Remarks

The global texture must be previously set using Shader.SetGlobalTexture.