cancel
Showing results for 
Search instead for 
Did you mean: 

Scene Depth

Dae_K
Honored Guest

Hello!

I want to make a shader that renders greyscale depth of a game object. Therefore, when a player watch a cube with that shader, the cube will change its color based on the distance between the player and the cube. Like a picture below but just one object with this texture.

Dae_K_0-1723960700571.png

 

I am not very good at HLSL. How should I do that?

0 REPLIES 0