diff options
author | clayjohn <claynjohn@gmail.com> | 2020-01-15 17:41:46 -0800 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2020-01-15 17:41:46 -0800 |
commit | 910f8719a04fe354a0eccacdeca162b88a52e7db (patch) | |
tree | ba7f479a1f2d8a8664d8bd2f775c96907f6ca6a8 /drivers | |
parent | 40f0649e5b02037cb4745c336170e1e5422467ed (diff) |
Fix array constructor for lightmaps
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 63eee4eb87..ac7a8796a3 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -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); |