Physically based shading implementation specfically designed for OpenGL ES 2.0 and other RenderSystems which do not support uniform buffers.
More...
|
| HlmsPbsMobile (Archive *dataFolder, ArchiveVec *libraryFolders) |
|
| ~HlmsPbsMobile () |
|
virtual void | _changeRenderSystem (RenderSystem *newRs) |
|
void | _clearShaderCache (void) |
|
virtual void | _collectSamplerblocks (set< const HlmsSamplerblock * >::type &outSamplerblocks, const HlmsDatablock *datablock) const |
|
void | _compileShaderFromPreprocessedSource (const RenderableCache &mergedCache, const String source[NumShaderTypes]) |
|
int32 | _getProperty (IdString key, int32 defaultVal=0) const |
|
virtual void | _loadJson (const rapidjson::Value &jsonValue, const HlmsJson::NamedBlocks &blocks, HlmsDatablock *datablock, HlmsJsonListener *listener, const String &additionalTextureExtension) const |
| Loads datablock values from a JSON value.
|
|
void | _notifyManager (HlmsManager *manager) |
|
void | _notifyShadowMappingBackFaceSetting (void) |
| Internal use.
|
|
virtual void | _saveJson (const HlmsDatablock *datablock, String &outString, HlmsJsonListener *listener, const String &additionalTextureExtension) const |
|
void | _setProperty (IdString key, int32 value) |
| For debugging stuff. I.e. the Command line uses it for testing manually set properties.
|
|
virtual void | calculateHashFor (Renderable *renderable, uint32 &outHash, uint32 &outCasterHash) |
| Called by the renderable when either it changes the material, or its properties change (e.g.
|
|
void | compileShaderCode (ShaderCodeCache &codeCache) |
| Compiles input properties and adds it to the shader code cache.
|
|
HlmsDatablock * | createDatablock (IdString name, const String &refName, const HlmsMacroblock ¯oblockRef, const HlmsBlendblock &blendblockRef, const HlmsParamVec ¶mVec, bool visibleToManager=true, const String &filename=BLANKSTRING, const String &resourceGroup=BLANKSTRING) |
| Creates a unique datablock that can be shared by multiple renderables.
|
|
void | destroyAllDatablocks (void) |
| Destroys all datablocks created with @createDatablock.
|
|
void | destroyDatablock (IdString name) |
| Destroys a datablocks given its name.
|
|
virtual uint32 | fillBuffersFor (const HlmsCache *cache, const QueuedRenderable &queuedRenderable, bool casterPass, uint32 lastCacheHash, CommandBuffer *commandBuffer) |
|
virtual uint32 | fillBuffersFor (const HlmsCache *cache, const QueuedRenderable &queuedRenderable, bool casterPass, uint32 lastCacheHash, uint32 lastTextureHash) |
| Fills the constant buffers.
|
|
virtual uint32 | fillBuffersForV1 (const HlmsCache *cache, const QueuedRenderable &queuedRenderable, bool casterPass, uint32 lastCacheHash, CommandBuffer *commandBuffer)=0 |
|
virtual uint32 | fillBuffersForV2 (const HlmsCache *cache, const QueuedRenderable &queuedRenderable, bool casterPass, uint32 lastCacheHash, CommandBuffer *commandBuffer)=0 |
|
virtual void | frameEnded (void) |
| Called when the frame has fully ended (ALL passes have been executed to all RTTs)
|
|
uint16 | getAreaLightsLimit (void) const |
|
uint8 | getAreaLightsRoundMultiple (void) const |
|
HlmsDatablock * | getDatablock (IdString name) const |
| Finds an existing datablock based on its name (.
|
|
const HlmsDatablockMap & | getDatablockMap (void) const |
| Returns all datablocks owned by this Hlms, including the default one.
|
|
Archive * | getDataFolder (void) |
|
HlmsDatablock * | getDefaultDatablock (void) const |
| Datablock to use when another datablock failed or none was specified.
|
|
void | getFilenameAndResourceGroup (IdString name, String const **outFilename, String const **outResourceGroup) const |
| Returns the filaname & resource group a datablock was created from, and is associated with its hashed name (this was passed as in @createDatablock).
|
|
bool | getHighQuality (void) const |
|
HlmsManager * | getHlmsManager (void) const |
|
HlmsListener * | getListener (void) const |
| Returns the current listener.
|
|
const HlmsCache * | getMaterial (HlmsCache const *lastReturnedValue, const HlmsCache &passCache, const QueuedRenderable &queuedRenderable, bool casterPass) |
| Retrieves an HlmsCache filled with the GPU programs to be used by the given renderable.
|
|
const String * | getNameStr (IdString name) const |
| Returns the string name associated with its hashed name (this was passed as refName in @createDatablock).
|
|
const LibraryVec & | getPiecesLibrary (void) const |
|
ArchiveVec | getPiecesLibraryAsArchiveVec (void) const |
|
RenderSystem * | getRenderSystem (void) const |
|
const ShaderCodeCacheVec & | getShaderCodeCache (void) const |
|
const String & | getShaderProfile (void) const |
|
void | getTemplateChecksum (uint64 outHash[2]) const |
|
HlmsTypes | getType (void) const |
|
IdString | getTypeName (void) const |
|
const String & | getTypeNameStr (void) const |
|
void | operator delete (void *ptr) |
|
void | operator delete (void *ptr, const char *, int, const char *) |
|
void | operator delete (void *ptr, void *) |
|
void | operator delete[] (void *ptr) |
|
void | operator delete[] (void *ptr, const char *, int, const char *) |
|
void * | operator new (size_t sz) |
|
void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info
|
|
void * | operator new (size_t sz, void *ptr) |
| placement operator new
|
|
void * | operator new[] (size_t sz) |
|
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info
|
|
virtual void | postCommandBufferExecution (CommandBuffer *commandBuffer) |
| This gets called after executing the command buffer.
|
|
virtual void | preCommandBufferExecution (CommandBuffer *commandBuffer) |
| This gets called right before executing the command buffer.
|
|
virtual HlmsCache | preparePassHash (const Ogre::CompositorShadowNode *shadowNode, bool casterPass, bool dualParaboloid, SceneManager *sceneManager) |
| Called every frame by the Render Queue to cache the properties needed by this pass.
|
|
virtual void | reloadFrom (Archive *newDataFolder, ArchiveVec *libraryFolders=0) |
| Destroys all the cached shaders and in the next opportunity will recreate them from the new location.
|
|
void | saveAllTexturesFromDatablocks (const String &folderPath, set< String >::type &savedTextures, bool saveOitd, bool saveOriginal, HlmsTextureExportListener *listener) |
|
void | setAreaLightForwardSettings (uint16 areaLightsLimit, uint8 areaLightsRoundMultiple) |
| Area lights use regular Forward.
|
|
void | setDebugOutputPath (bool enableDebugOutput, bool outputProperties, const String &path=BLANKSTRING) |
| Call to output the automatically generated shaders (which are usually made from templates) on the given folder for inspection, analyzing, debugging, etc.
|
|
void | setHighQuality (bool highQuality) |
| Sets the quality of the Hlms.
|
|
void | setListener (HlmsListener *listener) |
| Sets a listener to extend an existing Hlms implementation's with custom code, without having to rewrite it or modify the source code directly.
|
|
Physically based shading implementation specfically designed for OpenGL ES 2.0 and other RenderSystems which do not support uniform buffers.
void Ogre::Hlms::setAreaLightForwardSettings |
( |
uint16 |
areaLightsLimit, |
|
|
uint8 |
areaLightsRoundMultiple |
|
) |
| |
|
inherited |
Area lights use regular Forward.
- Parameters
-
areaLightsLimit | Maximum number of area lights that will be considered by the shader. Default value is 1. Use 0 to disable area lights. |
areaLightsRoundMultiple | To prevent frequent shader recompiles, you can round the number of area lights to the next multiple. |
For example when areaLightsRoundMultiple = 1, if there are two area lights in the frustum, shader 'A' will be used. If the camera moves and now only one are light is in the frustum, shader 'B' will be used.
This maximizes GPU performance, but if the number of area lights is constantly jumping, you may see a lot of recompiles until all variations are cached, which can be very slow.
By setting for example, areaLightsRoundMultiple = 2, we will always generate shader variations that use 2 area lights, even if there's only 1 area light in the camera (if there's none, we use a different variation). The unused slot will just output black. If there's 3 area lights, the shader variation will be compiled to use 4. This sacrifices some pixel shader GPU performance, but prevents permutation explosion.
By setting areaLightsLimit = areaLightsRoundMultiple, you will minimize the number of permutations and stabilize frame rates; but average framerate may be lower if there are less area lights.
Default value is 1. This value cannot be 0. This value must be <= areaLightsLimit, unless areaLightsLimit is 0.