Merge pull request #35178 from clayjohn/GLES2-fix-lightmap

Fix array constructor for lightmaps
This commit is contained in:
Rémi Verschelde 2020-01-16 07:47:49 +01:00 committed by GitHub
commit 318445c548
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1666,19 +1666,19 @@ FRAGMENT_SHADER_CODE
#ifdef USE_LIGHTMAP_CAPTURE
{
vec3 cone_dirs[12] = vec3[](
vec3(0.0, 0.0, 1.0),
vec3(0.866025, 0.0, 0.5),
vec3(0.267617, 0.823639, 0.5),
vec3(-0.700629, 0.509037, 0.5),
vec3(-0.700629, -0.509037, 0.5),
vec3(0.267617, -0.823639, 0.5),
vec3(0.0, 0.0, -1.0),
vec3(0.866025, 0.0, -0.5),
vec3(0.267617, 0.823639, -0.5),
vec3(-0.700629, 0.509037, -0.5),
vec3(-0.700629, -0.509037, -0.5),
vec3(0.267617, -0.823639, -0.5));
vec3 cone_dirs[12];
cone_dirs[0] = vec3(0.0, 0.0, 1.0);
cone_dirs[1] = vec3(0.866025, 0.0, 0.5);
cone_dirs[2] = vec3(0.267617, 0.823639, 0.5);
cone_dirs[3] = vec3(-0.700629, 0.509037, 0.5);
cone_dirs[4] = vec3(-0.700629, -0.509037, 0.5);
cone_dirs[5] = vec3(0.267617, -0.823639, 0.5);
cone_dirs[6] = vec3(0.0, 0.0, -1.0);
cone_dirs[7] = vec3(0.866025, 0.0, -0.5);
cone_dirs[8] = vec3(0.267617, 0.823639, -0.5);
cone_dirs[9] = vec3(-0.700629, 0.509037, -0.5);
cone_dirs[10] = vec3(-0.700629, -0.509037, -0.5);
cone_dirs[11] = vec3(0.267617, -0.823639, -0.5);
vec3 local_normal = normalize(camera_matrix * vec4(normal, 0.0)).xyz;
vec4 captured = vec4(0.0);