I know how to rotate cube map with legacy surface shader
Shader Rotation Matrix:
uniform float4x4 _Rotation;
o.Emission = texCUBE (_Cube, mul(_Rotation, float4(IN.worldRefl,0))).rgb;
RotateCubeMap:
using UnityEngine;
public class RotateCubeMap : MonoBehaviour
{
public float speed = 20;
private MeshRenderer _meshRenderer;
private void Awake()
{
_meshRenderer = GetComponent<MeshRenderer>();
}
public void Update()
{
var rot = Quaternion.Euler (0, Time.time*speed, 0);
var m = new Matrix4x4 ();
m.SetTRS(Vector3.zero, rot,new Vector3(1,1,1) );
_meshRenderer.material.SetMatrix ("_Rotation", m);
}
}
I tried to recreate it by shadergraph
but it didn't work!
I need a result like this: