Skip to content

Commit

Permalink
Make pointLightData work with lights with cast_shadow=false
Browse files Browse the repository at this point in the history
  • Loading branch information
N8n5h committed Mar 15, 2021
1 parent 7463de6 commit c721154
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/armory/renderpath/Inc.hx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ class Inc {
break;
if (LightObject.discardLightCulled(light)) continue;
if (light.data.raw.type == "point") {
for(k in 0...light.tileOffsetX.length) {
if (!light.data.raw.cast_shadow) {
j += 4 * 6;
continue;
}
for(k in 0...6) {
LightObject.pointLightsData[j ] = light.tileOffsetX[k]; // posx
LightObject.pointLightsData[j + 1] = light.tileOffsetY[k]; // posy
LightObject.pointLightsData[j + 2] = light.tileScale[k]; // tile scale factor relative to atlas
Expand Down

0 comments on commit c721154

Please sign in to comment.