summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-05 12:57:46 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-05 12:57:46 +0100
commita5e43daca101a7f5eddbe8e9880763e48e812a9a (patch)
tree637db13ad3a2413cccd4d5f01e7851665969d84e /servers/rendering/renderer_rd
parent0668b64c3269dd7c5410e5b11798f38771add575 (diff)
parentaaa9d626f3afb32d9b75ff897ab10538e36abef8 (diff)
Merge pull request #70929 from clayjohn/RD-mobile
Use proper indices for lights, decals, and reflection probes in mobile scene shader
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r--servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl
index b45c68db5a..5e64d4e651 100644
--- a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl
+++ b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl
@@ -866,7 +866,7 @@ void main() {
uint decal_indices = draw_call.decals.x;
for (uint i = 0; i < 8; i++) {
uint decal_index = decal_indices & 0xFF;
- if (i == 4) {
+ if (i == 3) {
decal_indices = draw_call.decals.y;
} else {
decal_indices = decal_indices >> 8;
@@ -1148,7 +1148,7 @@ void main() {
for (uint i = 0; i < 8; i++) {
uint reflection_index = reflection_indices & 0xFF;
- if (i == 4) {
+ if (i == 3) {
reflection_indices = draw_call.reflection_probes.y;
} else {
reflection_indices = reflection_indices >> 8;
@@ -1551,7 +1551,7 @@ void main() {
uint light_indices = draw_call.omni_lights.x;
for (uint i = 0; i < 8; i++) {
uint light_index = light_indices & 0xFF;
- if (i == 4) {
+ if (i == 3) {
light_indices = draw_call.omni_lights.y;
} else {
light_indices = light_indices >> 8;
@@ -1596,7 +1596,7 @@ void main() {
uint light_indices = draw_call.spot_lights.x;
for (uint i = 0; i < 8; i++) {
uint light_index = light_indices & 0xFF;
- if (i == 4) {
+ if (i == 3) {
light_indices = draw_call.spot_lights.y;
} else {
light_indices = light_indices >> 8;