Scene Depth
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. I am not very good at HLSL. How should I do that?346Views0likes0CommentsSingle camera position in UE4.26 material
As the title says, how can I get a single camera position within a material? The CameraPosition node returns the position of the left or right eye, and I can't find any custom HLSL that allows the calculation of the center point between the two eyes. Apparently this custom HLSL worked in 4.19 but not any more; (GetInstancedView().WorldCameraOrigin + GetPrimaryView().WorldCameraOrigin) * 0.5f GetInstancedView(0).WorldCameraOrigin or GetInstancedView(1).WorldCameraOrigin returns the same result.815Views0likes0CommentsSkinnedMeshRenderer material from OVRHand prefab is overwritten every frame
I want to change the main material from the Skinned Mesh Renderer component (OVRHand prefab). In Unity Editor this change remains but in build it only remains for 1 frame and it's replaced by the initial material on the next frame. Is it possible to change hand material in realtime? Is this a known issue?1.4KViews0likes1Comment