Renderer.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. //
  2. // Copyright (c) 2008-2014 the Urho3D project.
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. #pragma once
  23. #include "Batch.h"
  24. #include "Color.h"
  25. #include "Drawable.h"
  26. #include "HashSet.h"
  27. #include "Mutex.h"
  28. #include "Viewport.h"
  29. namespace Urho3D
  30. {
  31. class Geometry;
  32. class Drawable;
  33. class Light;
  34. class Material;
  35. class Pass;
  36. class Technique;
  37. class Octree;
  38. class Graphics;
  39. class RenderPath;
  40. class RenderSurface;
  41. class ResourceCache;
  42. class Shader;
  43. class Skeleton;
  44. class OcclusionBuffer;
  45. class Texture2D;
  46. class TextureCube;
  47. class View;
  48. class Zone;
  49. static const int SHADOW_MIN_PIXELS = 64;
  50. static const int INSTANCING_BUFFER_DEFAULT_SIZE = 1024;
  51. /// Light vertex shader variations.
  52. enum LightVSVariation
  53. {
  54. LVS_DIR = 0,
  55. LVS_SPOT,
  56. LVS_POINT,
  57. LVS_SPEC,
  58. LVS_SPOTSPEC,
  59. LVS_POINTSPEC,
  60. LVS_SHADOW,
  61. LVS_SPOTSHADOW,
  62. LVS_POINTSHADOW,
  63. LVS_DIRSPECSHADOW,
  64. LVS_SPOTSPECSHADOW,
  65. LVS_POINTSPECSHADOW,
  66. MAX_LIGHT_VS_VARIATIONS
  67. };
  68. /// Per-vertex light vertex shader variations.
  69. enum VertexLightVSVariation
  70. {
  71. VLVS_NOLIGHTS = 0,
  72. VLVS_1LIGHT,
  73. VLVS_2LIGHTS,
  74. VLVS_3LIGHTS,
  75. VLVS_4LIGHTS,
  76. MAX_VERTEXLIGHT_VS_VARIATIONS
  77. };
  78. /// Light pixel shader variations.
  79. enum LightPSVariation
  80. {
  81. LPS_NONE = 0,
  82. LPS_SPOT,
  83. LPS_POINT,
  84. LPS_POINTMASK,
  85. LPS_SPEC,
  86. LPS_SPOTSPEC,
  87. LPS_POINTSPEC,
  88. LPS_POINTMASKSPEC,
  89. LPS_SHADOW,
  90. LPS_SPOTSHADOW,
  91. LPS_POINTSHADOW,
  92. LPS_POINTMASKSHADOW,
  93. LPS_SHADOWSPEC,
  94. LPS_SPOTSHADOWSPEC,
  95. LPS_POINTSHADOWSPEC,
  96. LPS_POINTMASKSHADOWSPEC,
  97. MAX_LIGHT_PS_VARIATIONS
  98. };
  99. /// Deferred light volume vertex shader variations.
  100. enum DeferredLightVSVariation
  101. {
  102. DLVS_NONE = 0,
  103. DLVS_DIR,
  104. DLVS_ORTHO,
  105. DLVS_ORTHODIR,
  106. MAX_DEFERRED_LIGHT_VS_VARIATIONS
  107. };
  108. /// Deferred light volume pixels shader variations.
  109. enum DeferredLightPSVariation
  110. {
  111. DLPS_NONE = 0,
  112. DLPS_SPOT,
  113. DLPS_POINT,
  114. DLPS_POINTMASK,
  115. DLPS_SPEC,
  116. DLPS_SPOTSPEC,
  117. DLPS_POINTSPEC,
  118. DLPS_POINTMASKSPEC,
  119. DLPS_SHADOW,
  120. DLPS_SPOTSHADOW,
  121. DLPS_POINTSHADOW,
  122. DLPS_POINTMASKSHADOW,
  123. DLPS_SHADOWSPEC,
  124. DLPS_SPOTSHADOWSPEC,
  125. DLPS_POINTSHADOWSPEC,
  126. DLPS_POINTMASKSHADOWSPEC,
  127. DLPS_ORTHO,
  128. DLPS_ORTHOSPOT,
  129. DLPS_ORTHOPOINT,
  130. DLPS_ORTHOPOINTMASK,
  131. DLPS_ORTHOSPEC,
  132. DLPS_ORTHOSPOTSPEC,
  133. DLPS_ORTHOPOINTSPEC,
  134. DLPS_ORTHOPOINTMASKSPEC,
  135. DLPS_ORTHOSHADOW,
  136. DLPS_ORTHOSPOTSHADOW,
  137. DLPS_ORTHOPOINTSHADOW,
  138. DLPS_ORTHOPOINTMASKSHADOW,
  139. DLPS_ORTHOSHADOWSPEC,
  140. DLPS_ORTHOSPOTSHADOWSPEC,
  141. DLPS_ORTHOPOINTSHADOWSPEC,
  142. DLPS_ORTHOPOINTMASKSHADOWSPEC,
  143. MAX_DEFERRED_LIGHT_PS_VARIATIONS
  144. };
  145. /// High-level rendering subsystem. Manages drawing of 3D views.
  146. class URHO3D_API Renderer : public Object
  147. {
  148. OBJECT(Renderer);
  149. public:
  150. /// Construct.
  151. Renderer(Context* context);
  152. /// Destruct.
  153. virtual ~Renderer();
  154. /// Set number of backbuffer viewports to render.
  155. void SetNumViewports(unsigned num);
  156. /// Set a backbuffer viewport.
  157. void SetViewport(unsigned index, Viewport* viewport);
  158. /// Set default renderpath.
  159. void SetDefaultRenderPath(RenderPath* renderPath);
  160. /// Set default renderpath from an XML file.
  161. void SetDefaultRenderPath(XMLFile* file);
  162. /// Set HDR rendering on/off.
  163. void SetHDRRendering(bool enable);
  164. /// Set specular lighting on/off.
  165. void SetSpecularLighting(bool enable);
  166. /// Set texture anisotropy.
  167. void SetTextureAnisotropy(int level);
  168. /// Set texture filtering.
  169. void SetTextureFilterMode(TextureFilterMode mode);
  170. /// Set texture quality level.
  171. void SetTextureQuality(int quality);
  172. /// Set material quality level.
  173. void SetMaterialQuality(int quality);
  174. /// Set shadows on/off.
  175. void SetDrawShadows(bool enable);
  176. /// Set shadow map resolution.
  177. void SetShadowMapSize(int size);
  178. /// Set shadow quality (amount of samples and bit depth.)
  179. void SetShadowQuality(int quality);
  180. /// Set reuse of shadow maps. Default is true. If disabled, also transparent geometry can be shadowed.
  181. void SetReuseShadowMaps(bool enable);
  182. /// Set maximum number of shadow maps created for one resolution. Only has effect if reuse of shadow maps is disabled.
  183. void SetMaxShadowMaps(int shadowMaps);
  184. /// Set maximum number of directional light shadow map cascades. Affects the size of directional light shadow maps.
  185. void SetMaxShadowCascades(int cascades);
  186. /// Set dynamic instancing on/off.
  187. void SetDynamicInstancing(bool enable);
  188. /// Set minimum number of instances required in a batch group to render as instanced.
  189. void SetMinInstances(int instances);
  190. /// Set maximum number of triangles per object for instancing.
  191. void SetMaxInstanceTriangles(int triangles);
  192. /// Set maximum number of sorted instances per batch group. If exceeded, instances are rendered unsorted.
  193. void SetMaxSortedInstances(int instances);
  194. /// Set maximum number of occluder trianges.
  195. void SetMaxOccluderTriangles(int triangles);
  196. /// Set occluder buffer width.
  197. void SetOcclusionBufferSize(int size);
  198. /// Set required screen size (1.0 = full screen) for occluders.
  199. void SetOccluderSizeThreshold(float screenSize);
  200. /// Force reload of shaders.
  201. void ReloadShaders();
  202. /// Return number of backbuffer viewports.
  203. unsigned GetNumViewports() const { return viewports_.Size(); }
  204. /// Return backbuffer viewport by index.
  205. Viewport* GetViewport(unsigned index) const;
  206. /// Return default renderpath.
  207. RenderPath* GetDefaultRenderPath() const;
  208. /// Return whether HDR rendering is enabled.
  209. bool GetHDRRendering() const { return hdrRendering_; }
  210. /// Return whether specular lighting is enabled.
  211. bool GetSpecularLighting() const { return specularLighting_; }
  212. /// Return whether drawing shadows is enabled.
  213. bool GetDrawShadows() const { return drawShadows_; }
  214. /// Return texture anisotropy.
  215. int GetTextureAnisotropy() const { return textureAnisotropy_; }
  216. /// Return texture filtering.
  217. TextureFilterMode GetTextureFilterMode() const { return textureFilterMode_; }
  218. /// Return texture quality level.
  219. int GetTextureQuality() const { return textureQuality_; }
  220. /// Return material quality level.
  221. int GetMaterialQuality() const { return materialQuality_; }
  222. /// Return shadow map resolution.
  223. int GetShadowMapSize() const { return shadowMapSize_; }
  224. /// Return shadow quality.
  225. int GetShadowQuality() const { return shadowQuality_; }
  226. /// Return whether shadow maps are reused.
  227. bool GetReuseShadowMaps() const { return reuseShadowMaps_; }
  228. /// Return maximum number of shadow maps per resolution.
  229. int GetMaxShadowMaps() const { return maxShadowMaps_; }
  230. /// Return maximum number of directional light shadow map cascades.
  231. int GetMaxShadowCascades() const { return maxShadowCascades_; }
  232. /// Return whether dynamic instancing is in use.
  233. bool GetDynamicInstancing() const { return dynamicInstancing_; }
  234. /// Return minimum number of instances required in a batch group to render as instanced.
  235. int GetMinInstances() const { return minInstances_; }
  236. /// Return maximum number of triangles per object for instancing.
  237. int GetMaxInstanceTriangles() const { return maxInstanceTriangles_; }
  238. /// Return maximum number of sorted instances per batch group.
  239. int GetMaxSortedInstances() const { return maxSortedInstances_; }
  240. /// Return maximum number of occluder triangles.
  241. int GetMaxOccluderTriangles() const { return maxOccluderTriangles_; }
  242. /// Return occlusion buffer width.
  243. int GetOcclusionBufferSize() const { return occlusionBufferSize_; }
  244. /// Return occluder screen size threshold.
  245. float GetOccluderSizeThreshold() const { return occluderSizeThreshold_; }
  246. /// Return number of views rendered.
  247. unsigned GetNumViews() const { return numViews_; }
  248. /// Return number of primitives rendered.
  249. unsigned GetNumPrimitives() const { return numPrimitives_; }
  250. /// Return number of batches rendered.
  251. unsigned GetNumBatches() const { return numBatches_; }
  252. /// Return number of geometries rendered.
  253. unsigned GetNumGeometries(bool allViews = false) const;
  254. /// Return number of lights rendered.
  255. unsigned GetNumLights(bool allViews = false) const;
  256. /// Return number of shadow maps rendered.
  257. unsigned GetNumShadowMaps(bool allViews = false) const;
  258. /// Return number of occluders rendered.
  259. unsigned GetNumOccluders(bool allViews = false) const;
  260. /// Return the default zone.
  261. Zone* GetDefaultZone() const { return defaultZone_; }
  262. /// Return the directional light for fullscreen quad rendering.
  263. Light* GetQuadDirLight() const { return quadDirLight_; }
  264. /// Return the default material.
  265. Material* GetDefaultMaterial() const { return defaultMaterial_; }
  266. /// Return the default range attenuation texture.
  267. Texture2D* GetDefaultLightRamp() const { return defaultLightRamp_; }
  268. /// Return the default spotlight attenuation texture.
  269. Texture2D* GetDefaultLightSpot() const { return defaultLightSpot_; }
  270. /// Return the shadowed pointlight face selection cube map.
  271. TextureCube* GetFaceSelectCubeMap() const { return faceSelectCubeMap_; }
  272. /// Return the shadowed pointlight indirection cube map.
  273. TextureCube* GetIndirectionCubeMap() const { return indirectionCubeMap_; }
  274. /// Return the instancing vertex buffer
  275. VertexBuffer* GetInstancingBuffer() const { return dynamicInstancing_ ? instancingBuffer_ : (VertexBuffer*)0; }
  276. /// Return a shader variation by name and defines.
  277. ShaderVariation* GetShader(ShaderType type, const String& name, const String& defines = String::EMPTY) const;
  278. /// Return a shader variation by name and defines.
  279. ShaderVariation* GetShader(ShaderType type, const char* name, const char* defines) const;
  280. /// Return the frame update parameters.
  281. const FrameInfo& GetFrameInfo() const { return frame_; }
  282. /// Update for rendering. Called by HandleRenderUpdate().
  283. void Update(float timeStep);
  284. /// Render. Called by Engine.
  285. void Render();
  286. /// Add debug geometry to the debug renderer.
  287. void DrawDebugGeometry(bool depthTest);
  288. /// Queue a render surface's viewports for rendering. Called by the surface, or by View.
  289. void QueueRenderSurface(RenderSurface* renderTarget);
  290. /// Queue a viewport for rendering. Null surface means backbuffer.
  291. void QueueViewport(RenderSurface* renderTarget, Viewport* viewport);
  292. /// Return volume geometry for a light.
  293. Geometry* GetLightGeometry(Light* light);
  294. /// Allocate a shadow map. If shadow map reuse is disabled, a different map is returned each time.
  295. Texture2D* GetShadowMap(Light* light, Camera* camera, unsigned viewWidth, unsigned viewHeight);
  296. /// Allocate a rendertarget or depth-stencil texture for deferred rendering or postprocessing. Should only be called during actual rendering, not before.
  297. Texture2D* GetScreenBuffer(int width, int height, unsigned format, bool filtered, bool srgb, unsigned persistentKey = 0);
  298. /// Allocate a depth-stencil surface that does not need to be readable. Should only be called during actual rendering, not before.
  299. RenderSurface* GetDepthStencil(int width, int height);
  300. /// Allocate an occlusion buffer.
  301. OcclusionBuffer* GetOcclusionBuffer(Camera* camera);
  302. /// Allocate a temporary shadow camera and a scene node for it. Is thread-safe.
  303. Camera* GetShadowCamera();
  304. /// Choose shaders for a forward rendering batch.
  305. void SetBatchShaders(Batch& batch, Technique* tech, bool allowShadows = true);
  306. /// Choose shaders for a deferred light volume batch.
  307. void SetLightVolumeBatchShaders(Batch& batch, const String& vsName, const String& psName);
  308. /// Set cull mode while taking possible projection flipping into account.
  309. void SetCullMode(CullMode mode, Camera* camera);
  310. /// Ensure sufficient size of the instancing vertex buffer. Return true if successful.
  311. bool ResizeInstancingBuffer(unsigned numInstances);
  312. /// Save the screen buffer allocation status. Called by View.
  313. void SaveScreenBufferAllocations();
  314. /// Restore the screen buffer allocation status. Called by View.
  315. void RestoreScreenBufferAllocations();
  316. /// Optimize a light by scissor rectangle.
  317. void OptimizeLightByScissor(Light* light, Camera* camera);
  318. /// Optimize a light by marking it to the stencil buffer and setting a stencil test.
  319. void OptimizeLightByStencil(Light* light, Camera* camera);
  320. /// Return a scissor rectangle for a light.
  321. const Rect& GetLightScissor(Light* light, Camera* camera);
  322. private:
  323. /// Initialize when screen mode initially set.
  324. void Initialize();
  325. /// Clear views from previous frame.
  326. void ResetViews();
  327. /// Reload shaders.
  328. void LoadShaders();
  329. /// Reload shaders for a material pass.
  330. void LoadPassShaders(Technique* tech, StringHash passType);
  331. /// Release shaders used in materials.
  332. void ReleaseMaterialShaders();
  333. /// Reload textures.
  334. void ReloadTextures();
  335. /// Create light volume geometries.
  336. void CreateGeometries();
  337. /// Create instancing vertex buffer.
  338. void CreateInstancingBuffer();
  339. /// Create point light shadow indirection texture data.
  340. void SetIndirectionTextureData();
  341. /// Prepare for rendering of a new view.
  342. void PrepareViewRender();
  343. /// Remove unused occlusion and screen buffers.
  344. void RemoveUnusedBuffers();
  345. /// Reset shadow map allocation counts.
  346. void ResetShadowMapAllocations();
  347. /// Reset screem buffer allocation counts.
  348. void ResetScreenBufferAllocations();
  349. /// Remove all shadow maps. Called when global shadow map resolution or format is changed.
  350. void ResetShadowMaps();
  351. /// Remove all occlusion and screen buffers.
  352. void ResetBuffers();
  353. /// Handle screen mode event.
  354. void HandleScreenMode(StringHash eventType, VariantMap& eventData);
  355. /// Handle graphics features (re)check event. Event only sent by D3D9Graphics class.
  356. void HandleGraphicsFeatures(StringHash eventType, VariantMap& eventData);
  357. /// Handle render update event.
  358. void HandleRenderUpdate(StringHash eventType, VariantMap& eventData);
  359. /// Graphics subsystem.
  360. WeakPtr<Graphics> graphics_;
  361. /// Default renderpath.
  362. SharedPtr<RenderPath> defaultRenderPath_;
  363. /// Default zone.
  364. SharedPtr<Zone> defaultZone_;
  365. /// Directional light for drawing fullscreen quads.
  366. SharedPtr<Light> quadDirLight_;
  367. /// Directional light quad geometry.
  368. SharedPtr<Geometry> dirLightGeometry_;
  369. /// Spot light volume geometry.
  370. SharedPtr<Geometry> spotLightGeometry_;
  371. /// Point light volume geometry.
  372. SharedPtr<Geometry> pointLightGeometry_;
  373. /// Instance stream vertex buffer.
  374. SharedPtr<VertexBuffer> instancingBuffer_;
  375. /// Default material.
  376. SharedPtr<Material> defaultMaterial_;
  377. /// Default range attenuation texture.
  378. SharedPtr<Texture2D> defaultLightRamp_;
  379. /// Default spotlight attenuation texture.
  380. SharedPtr<Texture2D> defaultLightSpot_;
  381. /// Face selection cube map for shadowed pointlights.
  382. SharedPtr<TextureCube> faceSelectCubeMap_;
  383. /// Indirection cube map for shadowed pointlights.
  384. SharedPtr<TextureCube> indirectionCubeMap_;
  385. /// Reusable scene nodes with shadow camera components.
  386. Vector<SharedPtr<Node> > shadowCameraNodes_;
  387. /// Reusable occlusion buffers.
  388. Vector<SharedPtr<OcclusionBuffer> > occlusionBuffers_;
  389. /// Shadow maps by resolution.
  390. HashMap<int, Vector<SharedPtr<Texture2D> > > shadowMaps_;
  391. /// Shadow map dummy color buffers by resolution.
  392. HashMap<int, SharedPtr<Texture2D> > colorShadowMaps_;
  393. /// Shadow map allocations by resolution.
  394. HashMap<int, PODVector<Light*> > shadowMapAllocations_;
  395. /// Screen buffers by resolution and format.
  396. HashMap<long long, Vector<SharedPtr<Texture2D> > > screenBuffers_;
  397. /// Current screen buffer allocations by resolution and format.
  398. HashMap<long long, unsigned> screenBufferAllocations_;
  399. /// Saved status of screen buffer allocations for restoring.
  400. HashMap<long long, unsigned> savedScreenBufferAllocations_;
  401. /// Cache for light scissor queries.
  402. HashMap<Pair<Light*, Camera*>, Rect> lightScissorCache_;
  403. /// Viewports.
  404. Vector<SharedPtr<Viewport> > viewports_;
  405. /// Queued views.
  406. Vector<Pair<WeakPtr<RenderSurface>, WeakPtr<Viewport> > > queuedViews_;
  407. /// Views.
  408. Vector<SharedPtr<View> > views_;
  409. /// Octrees that have been updated during the frame.
  410. HashSet<Octree*> updatedOctrees_;
  411. /// Techniques for which missing shader error has been displayed.
  412. HashSet<Technique*> shaderErrorDisplayed_;
  413. /// Mutex for shadow camera allocation.
  414. Mutex rendererMutex_;
  415. /// Base directory for shaders.
  416. String shaderPath_;
  417. /// File extension for shaders.
  418. String shaderExtension_;
  419. /// Current variation names for deferred light volume shaders.
  420. Vector<String> deferredLightPSVariations_;
  421. /// Last used shader in shader variation query.
  422. mutable WeakPtr<Shader> lastShader_;
  423. /// Last used shader name in shader variation query.
  424. mutable String lastShaderName_;
  425. /// Frame info for rendering.
  426. FrameInfo frame_;
  427. /// Texture anisotropy level.
  428. int textureAnisotropy_;
  429. /// Texture filtering mode.
  430. TextureFilterMode textureFilterMode_;
  431. /// Texture quality level.
  432. int textureQuality_;
  433. /// Material quality level.
  434. int materialQuality_;
  435. /// Shadow map resolution.
  436. int shadowMapSize_;
  437. /// Shadow quality.
  438. int shadowQuality_;
  439. /// Maximum number of shadow maps per resolution.
  440. int maxShadowMaps_;
  441. /// Maximum number of directional light shadow cascades.
  442. int maxShadowCascades_;
  443. /// Minimum number of instances required in a batch group to render as instanced.
  444. int minInstances_;
  445. /// Maximum triangles per object for instancing.
  446. int maxInstanceTriangles_;
  447. /// Maximum sorted instances per batch group.
  448. int maxSortedInstances_;
  449. /// Maximum occluder triangles.
  450. int maxOccluderTriangles_;
  451. /// Occlusion buffer width.
  452. int occlusionBufferSize_;
  453. /// Occluder screen size threshold.
  454. float occluderSizeThreshold_;
  455. /// Number of views.
  456. unsigned numViews_;
  457. /// Number of occlusion buffers in use.
  458. unsigned numOcclusionBuffers_;
  459. /// Number of temporary shadow cameras in use.
  460. unsigned numShadowCameras_;
  461. /// Number of primitives (3D geometry only.)
  462. unsigned numPrimitives_;
  463. /// Number of batches (3D geometry only.)
  464. unsigned numBatches_;
  465. /// Frame number on which shaders last changed.
  466. unsigned shadersChangedFrameNumber_;
  467. /// Current stencil value for light optimization.
  468. unsigned char lightStencilValue_;
  469. /// HDR rendering flag.
  470. bool hdrRendering_;
  471. /// Specular lighting flag.
  472. bool specularLighting_;
  473. /// Draw shadows flag.
  474. bool drawShadows_;
  475. /// Shadow map reuse flag.
  476. bool reuseShadowMaps_;
  477. /// Dynamic instancing flag.
  478. bool dynamicInstancing_;
  479. /// Shaders need reloading flag.
  480. bool shadersDirty_;
  481. /// Initialized flag.
  482. bool initialized_;
  483. };
  484. }