瀏覽代碼

[FIX][SHADOWS][POINT LIGHT] Default shadow map with proper size if Mixed mode (so it can be merged properly).

clandrin 3 年之前
父節點
當前提交
ab2ce16d2b
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      h3d/pass/PointShadowMap.hx

+ 4 - 1
h3d/pass/PointShadowMap.hx

@@ -157,7 +157,10 @@ class PointShadowMap extends Shadows {
 	var tmpTex : h3d.mat.Texture;
 	override function createDefaultShadowMap() {
 		if( tmpTex != null) return tmpTex;
-		tmpTex = new h3d.mat.Texture(1,1, [Target,Cube], format);
+		if ( mode == Mixed )
+			tmpTex = new h3d.mat.Texture(size,size, [Target,Cube], format);
+		else
+			tmpTex = new h3d.mat.Texture(1,1, [Target,Cube], format);
 		tmpTex.name = "defaultCubeShadowMap";
 		tmpTex.realloc = function() clear(tmpTex);
 		clear(tmpTex);