Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 14, 2012, 9:16:18 PM (11 years ago)
Author:
davidsa
Message:

Added Hardware Occlusion Query Capabilities for use in dynamic flare effects, this is still a pretty static implemenation, meaning it will fail with mutltiple HOQ objects on screen, also needs some tidying up and documentation at a later point

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/shaders/src/orxonox/graphics/LensFlare.h

    r9445 r9448  
    4040#include "OgreBillboardSet.h"
    4141
     42#include "core/GraphicsManager.h"
    4243#include "util/Math.h"
    4344#include "worldentities/StaticEntity.h"
     
    5455        David 'davidsa' Salvisberg
    5556    */
     57    //TODO: The Hardware Occlusion only works properly for a single Flare on the screen,
     58    // if we have multiple strong lights it'll become way more complicated to determine how much of every object is occluded individually
     59    // there's below a 100 render queue groups, so maybe we should take turns for each object to be tested, so we only have one of the objects rendered at a time
     60    // obviously we shouldn't use too much of these effects anyways, since they use a lot of performance, so not sure whether it's worth implementing a solution that works for multiple lens flares on screen
    5661    class _OrxonoxExport LensFlare : public StaticEntity, public Tickable
    5762    {
     
    5964            LensFlare(BaseObject* creator);
    6065            virtual ~LensFlare();
     66           
     67            inline void setScale(float scale)
     68                { this->scale_=scale; }
     69            inline float getScale()
     70                { return this->scale_; }
    6171
    6272            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     
    7282           
    7383            void updateBillboardPositions();
     84           
     85            Billboard* occlusionBillboard_;
     86            unsigned int cameraDistance_;
     87            float scale_;
    7488    };
    7589}
Note: See TracChangeset for help on using the changeset viewer.