protected override void InitializeCore() { base.InitializeCore(); // TODO: Make this pluggable if (Context.GraphicsDevice.Features.RequestedProfile >= GraphicsProfile.Level_10_0) { // Note: this renderer supports both Point and Spot lights var clusteredLightRenderer = new LightClusteredPointGroupRenderer(); RegisterLightGroupRenderer(typeof(LightPoint), clusteredLightRenderer); RegisterLightGroupRenderer(typeof(LightSpot), new LightSpotGroupRenderer { NonShadowRenderer = clusteredLightRenderer.SpotRenderer }); } else { RegisterLightGroupRenderer(typeof(LightPoint), new LightPointGroupRenderer()); RegisterLightGroupRenderer(typeof(LightSpot), new LightSpotGroupRenderer()); } RegisterLightGroupRenderer(typeof(LightDirectional), new LightDirectionalGroupRenderer()); RegisterLightGroupRenderer(typeof(LightAmbient), new LightAmbientRenderer()); RegisterLightGroupRenderer(typeof(LightSkybox), new LightSkyboxRenderer()); renderEffectKey = ((RootEffectRenderFeature)RootRenderFeature).RenderEffectKey; viewLightingKey = ((RootEffectRenderFeature)RootRenderFeature).CreateViewLogicalGroup("Lighting"); drawLightingKey = ((RootEffectRenderFeature)RootRenderFeature).CreateDrawLogicalGroup("Lighting"); }
public LightClusteredSpotGroupRenderer(LightClusteredPointGroupRenderer pointGroupRenderer) { this.pointGroupRenderer = pointGroupRenderer; }
public PointLightShaderGroupData(RenderContext renderContext, LightClusteredPointGroupRenderer pointGroupRenderer) : base(renderContext, null) { this.pointGroupRenderer = pointGroupRenderer; ShaderSource = new ShaderClassSource("LightClusteredPointGroup", ClusterSize); }