private DecalTechnique GetTechnique(bool isDeferred) { if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES2) { Debug.LogError("Decals are not supported with OpenGLES2."); return(DecalTechnique.Invalid); } DecalTechnique technique = DecalTechnique.Invalid; switch (m_Settings.technique) { case DecalTechniqueOption.Automatic: if (IsAutomaticDBuffer()) { technique = DecalTechnique.DBuffer; } else { technique = DecalTechnique.ScreenSpace; } break; case DecalTechniqueOption.ScreenSpace: if (m_Settings.screenSpaceSettings.useGBuffer && isDeferred) { technique = DecalTechnique.GBuffer; } else { technique = DecalTechnique.ScreenSpace; } break; case DecalTechniqueOption.DBuffer: technique = DecalTechnique.DBuffer; break; } bool mrt4 = SystemInfo.supportedRenderTargetCount >= 4; if (technique == DecalTechnique.DBuffer && !mrt4) { Debug.LogError("Decal DBuffer technique requires MRT4 support."); return(DecalTechnique.Invalid); } if (technique == DecalTechnique.GBuffer && !mrt4) { Debug.LogError("Decal useGBuffer option requires MRT4 support."); return(DecalTechnique.Invalid); } return(technique); }
public DecalDrawErrorSystem(DecalEntityManager entityManager, DecalTechnique technique) : base("DecalDrawErrorSystem.Execute", entityManager) { m_Technique = technique; }