public ShadowResources(VRPAsset asset) { helper_ = new GameObject(""); helper_.SetActive(false); helper_.hideFlags = HideFlags.DontSave | HideFlags.HideInHierarchy; helper = helper_.AddComponent <Camera>(); helper.orthographic = true; helper.nearClipPlane = 0f; helper.enabled = false; m_asset = asset; m_DirShadowArray = new VRenderTextureArray("dir_shadow_array", RenderTextureFormat.ARGB64, true, false, true); m_PointShadowArray = new VRenderTextureArray("point_shadow_array", RenderTextureFormat.RG32, true, false, true); m_shadowcascade_matrix_vp = new VComputeBuffer(Marshal.SizeOf(typeof(ShadowCascadeMatrix))); m_pointLightMatrix = new VComputeBuffer(Marshal.SizeOf(typeof(ShadowCascadeMatrix))); }
public LightResources() { lightBuffer = new VComputeBuffer(Marshal.SizeOf(typeof(LightStruct))); lightBuffer_GI = new VComputeBuffer(Marshal.SizeOf(typeof(LightStruct))); }