Merge pull request #70929 from clayjohn/RD-mobile

Use proper indices for lights, decals, and reflection probes in mobile scene shader
This commit is contained in:
Rémi Verschelde 2023-01-05 12:57:46 +01:00
commit a5e43daca1
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -866,7 +866,7 @@ void main() {
uint decal_indices = draw_call.decals.x; uint decal_indices = draw_call.decals.x;
for (uint i = 0; i < 8; i++) { for (uint i = 0; i < 8; i++) {
uint decal_index = decal_indices & 0xFF; uint decal_index = decal_indices & 0xFF;
if (i == 4) { if (i == 3) {
decal_indices = draw_call.decals.y; decal_indices = draw_call.decals.y;
} else { } else {
decal_indices = decal_indices >> 8; decal_indices = decal_indices >> 8;
@ -1148,7 +1148,7 @@ void main() {
for (uint i = 0; i < 8; i++) { for (uint i = 0; i < 8; i++) {
uint reflection_index = reflection_indices & 0xFF; uint reflection_index = reflection_indices & 0xFF;
if (i == 4) { if (i == 3) {
reflection_indices = draw_call.reflection_probes.y; reflection_indices = draw_call.reflection_probes.y;
} else { } else {
reflection_indices = reflection_indices >> 8; reflection_indices = reflection_indices >> 8;
@ -1551,7 +1551,7 @@ void main() {
uint light_indices = draw_call.omni_lights.x; uint light_indices = draw_call.omni_lights.x;
for (uint i = 0; i < 8; i++) { for (uint i = 0; i < 8; i++) {
uint light_index = light_indices & 0xFF; uint light_index = light_indices & 0xFF;
if (i == 4) { if (i == 3) {
light_indices = draw_call.omni_lights.y; light_indices = draw_call.omni_lights.y;
} else { } else {
light_indices = light_indices >> 8; light_indices = light_indices >> 8;
@ -1596,7 +1596,7 @@ void main() {
uint light_indices = draw_call.spot_lights.x; uint light_indices = draw_call.spot_lights.x;
for (uint i = 0; i < 8; i++) { for (uint i = 0; i < 8; i++) {
uint light_index = light_indices & 0xFF; uint light_index = light_indices & 0xFF;
if (i == 4) { if (i == 3) {
light_indices = draw_call.spot_lights.y; light_indices = draw_call.spot_lights.y;
} else { } else {
light_indices = light_indices >> 8; light_indices = light_indices >> 8;