We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 670f3f0 commit 2073132Copy full SHA for 2073132
crates/bevy_pbr/src/render/light.rs
@@ -216,7 +216,14 @@ pub struct GpuLights {
216
217
// NOTE: this must be kept in sync with the same constants in pbr.frag
218
pub const MAX_UNIFORM_BUFFER_POINT_LIGHTS: usize = 256;
219
+
220
+//NOTE: When running bevy on Adreno GPU chipsets in WebGL, any value above 1 will result in a crash
221
+// when loading the wgsl "pbr_functions.wgsl" in the function apply_fog.
222
+#[cfg(feature = "webgl")]
223
+pub const MAX_DIRECTIONAL_LIGHTS: usize = 1;
224
+#[cfg(not(feature = "webgl"))]
225
pub const MAX_DIRECTIONAL_LIGHTS: usize = 10;
226
227
#[cfg(not(feature = "webgl"))]
228
pub const MAX_CASCADES_PER_LIGHT: usize = 4;
229
#[cfg(feature = "webgl")]
0 commit comments