mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Avoid crash in Clyde if the GLSL compiler optimizes out uniforms.
This commit is contained in:
@@ -799,6 +799,13 @@ namespace Robust.Client.Graphics.Clyde
|
||||
// Assign shader parameters to uniform since they may be dirty.
|
||||
foreach (var (name, value) in instance.Parameters)
|
||||
{
|
||||
if (!program.HasUniform(name))
|
||||
{
|
||||
// Can happen if the GLSL compiler removes uniforms due to them being unused.
|
||||
// Safe to just ignore them then I'd say.
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (value)
|
||||
{
|
||||
case float f:
|
||||
|
||||
Reference in New Issue
Block a user