浏览代码

make the maxRasterImage size configurable

/main
xingwei.zhu 5 年前
当前提交
7acdbf83
共有 2 个文件被更改,包括 5 次插入2 次删除
  1. 2
      Runtime/editor/window_config.cs
  2. 5
      Runtime/ui/renderer/compositeCanvas/flow/raster_cache.cs

2
Runtime/editor/window_config.cs


public class WindowConfig {
public readonly bool disableRasterCache;
public static float MaxRasterImageSize = 4096;
static bool? _disableComputeBuffer = null;
public static bool disableComputeBuffer {

5
Runtime/ui/renderer/compositeCanvas/flow/raster_cache.cs


using System;
using System.Collections.Generic;
using Unity.UIWidgets.editor;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.ui;
using UnityEngine;

}
//https://forum.unity.com/threads/rendertexture-create-failed-rendertexture-too-big.58667/
if (picture.paintBounds.size.width > 4096 ||
picture.paintBounds.size.height > 4096) {
if (picture.paintBounds.size.width > WindowConfig.MaxRasterImageSize ||
picture.paintBounds.size.height > WindowConfig.MaxRasterImageSize) {
return false;
}

正在加载...
取消
保存