Explorar o código

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

clandrin %!s(int64=3) %!d(string=hai) anos
pai
achega
ab2ce16d2b
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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;
 	var tmpTex : h3d.mat.Texture;
 	override function createDefaultShadowMap() {
 	override function createDefaultShadowMap() {
 		if( tmpTex != null) return tmpTex;
 		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.name = "defaultCubeShadowMap";
 		tmpTex.realloc = function() clear(tmpTex);
 		tmpTex.realloc = function() clear(tmpTex);
 		clear(tmpTex);
 		clear(tmpTex);