|
| Tile (const HeightfieldModel *terrain, const Point2int32 &tileIndex, const CFrame &frame, const CFrame &previousFrame, const shared_ptr< Entity > &entity, const Surface::ExpressiveLightScatteringProperties &expressiveLightScatteringProperties) |
|
virtual bool | canBeFullyRepresentedInGBuffer (const GBuffer::Specification &specification) const override |
| Can this particular instance of this type of Surface be fully described in a G3D::GBuffer using the given specification? More...
|
|
virtual bool | canChange () const |
| Returns true if this surface should be included in static data structures because it is from an object that never changes. More...
|
|
virtual bool | canRenderIntoSVO () const |
|
const shared_ptr< Entity > & | entity () const |
| The Entity that created this surface. More...
|
|
virtual CoordinateFrame | frame (bool previous=false) const |
|
virtual void | getCoordinateFrame (CoordinateFrame &cframe, bool previous=false) const override |
|
virtual void | getObjectSpaceBoundingBox (AABox &box, bool previous=false) const override |
| May be infinite. More...
|
|
virtual void | getObjectSpaceBoundingSphere (Sphere &sphere, bool previous=false) const override |
| May be infinite. More...
|
|
virtual void | getObjectSpaceGeometry (Array< int > &index, Array< Point3 > &vertex, Array< Vector3 > &normal, Array< Vector4 > &packedTangent, Array< Point2 > &texCoord, bool previous=false) const |
| Clears the arrays and appends indexed triangle list information. More...
|
|
virtual void | getTrisHomogeneous (const Array< shared_ptr< Surface > > &surfaceArray, CPUVertexArray &cpuVertexArray, Array< Tri > &triArray, bool computePrevPosition=false) const |
| Creates and appends Tris and CPUVertexArray::Vertices onto the parameter arrays using the cpuGeom's of the surfaces in surfaceArray. More...
|
|
virtual bool | hasTransmission () const override |
| If true, this object transmits light, potentially refracting it and filtering the background with color or diffusion. More...
|
|
virtual bool | isSkybox () const |
|
virtual RealTime | lastChangeTime () const |
| Wall-clock time at which the source of this surface changed in some way, e.g., that might require recomputing a shadow map or spatial data structure. More...
|
|
const shared_ptr< Model > & | model () const |
| The Model that created this surface. More...
|
|
const HeightfieldModel * | modelPtr () const |
|
virtual String | name () const override |
| Name of the underlying model or part for debugging purposes. More...
|
|
bool | preferLowResolutionTransparency () const |
|
virtual void | render (RenderDevice *rd, const LightingEnvironment &environment, RenderPassType passType) const override |
| Forward-render all illumination terms for each element of surfaceArray, which must all be of the same most-derived type as this. More...
|
|
virtual void | renderDepthOnlyHomogeneous (RenderDevice *rd, const Array< shared_ptr< Surface > > &surfaceArray, const shared_ptr< Texture > &depthPeelTexture, const float depthPeelEpsilon, TransparencyTestMode transparencyTestMode, const Color3 &transmissionWeight) const override |
| Use the current RenderDevice::cullFace. More...
|
|
virtual void | renderHomogeneous (RenderDevice *rd, const Array< shared_ptr< Surface > > &surfaceArray, const LightingEnvironment &environment, RenderPassType passType) const override |
| Render a set of surfaces from the same most-derived class type. More...
|
|
virtual void | renderIntoGBufferHomogeneous (RenderDevice *rd, const Array< shared_ptr< Surface > > &surfaceArray, const shared_ptr< GBuffer > &gbuffer, const shared_ptr< Texture > &depthPeelTexture, const float minZSeparation, const LightingEnvironment &lightingEnvironment) const override |
|
Render all instances of surfaceArray to the currently-bound Framebuffer using the fields and mapping dictated by specification. More...
|
|
virtual void | renderIntoSVOHomogeneous (RenderDevice *rd, Array< shared_ptr< Surface > > &surfaceArray, const shared_ptr< SVO > &svo, const CFrame &previousCameraFrame) const |
|
RenderMask | renderMask () const |
|
virtual void | renderWireframeHomogeneous (RenderDevice *rd, const Array< shared_ptr< Surface > > &surfaceArray, const Color4 &color, bool previous) const override |
| Rendering a set of surfaces in wireframe, using the current blending mode. More...
|
|
uint64 | rigidBodyID () const |
| An identifier that, if nonzero, is unique for a combination of geometry and material. More...
|
|
virtual void | setStorage (ImageStorage newStorage) override |
|
virtual TransparencyType | transparencyType () const override |
| What type of transparency (= alpha and transmission) does this surface have? More...
|
|
|
static void | cull (const CoordinateFrame &cameraFrame, const class Projection &cameraProjection, const class Rect2D &viewport, const Array< shared_ptr< Surface > > &allSurfaces, Array< shared_ptr< Surface > > &outSurfaces, bool previous=false) |
| Computes the array of surfaces that can be seen by camera. More...
|
|
static void | cull (const CoordinateFrame &cameraFrame, const class Projection &cameraProjection, const class Rect2D &viewport, Array< shared_ptr< Surface > > &allSurfaces, bool previous=false) |
| Culls surfaces in place. More...
|
|
static void | getBoxBounds (const Array< shared_ptr< Surface >> &surfaceArray, AABox &bounds, bool previous=false, bool &anyInfinite=ignoreBool, bool onlyShadowCasters=false) |
| Computes the world-space bounding box of an array of Surfaces of any type. More...
|
|
static void | getSphereBounds (const Array< shared_ptr< Surface > > &surfaceArray, Sphere &bounds, bool previous=false, bool &anyInfinite=ignoreBool, bool onlyShadowCasters=false) |
| Computes the world-space bounding sphere of an array of Surfaces of any type. More...
|
|
static void | getTris (const Array< shared_ptr< Surface > > &surfaceArray, CPUVertexArray &cpuVertexArray, Array< Tri > &triArray, bool computePrevPosition=false) |
| Returns a CPUVertexArray and an Array<Tri> generated from the surfaces in surfaceArray, with everything transformed to world space First separates surfaceArray by derived type and then calls getTrisHomogenous. More...
|
|
static void | operator delete (void *p) |
|
static void * | operator new (size_t size) |
| Allocates with System::malloc to avoid the performance overhead of creating lots of small heap objects using ::malloc . More...
|
|
static void | renderDepthOnly (RenderDevice *rd, const Array< shared_ptr< Surface > > &surfaceArray, CullFace cull, const shared_ptr< Texture > &depthPeelTexture=nullptr, const float minZSeparation=0.0f, TransparencyTestMode transparencyTestMode=TransparencyTestMode::REJECT_TRANSPARENCY, const Color3 &transmissionWeight=Color3::white()/3.0f) |
| Render geometry only (no shading), and ignore color (but do perform alpha testing). More...
|
|
static void | renderIntoGBuffer (RenderDevice *rd, const Array< shared_ptr< Surface > > &sortedVisible, const shared_ptr< GBuffer > &gbuffer, const shared_ptr< Texture > &depthPeelTexture=shared_ptr< Texture >(), const float minZSeparation=0.0f, const LightingEnvironment &lightingEnvironment=LightingEnvironment()) |
| Renders front-to-back to a GBuffer using current stencil and depth operations. More...
|
|
static void | renderIntoSVO (RenderDevice *rd, Array< shared_ptr< Surface > > &visible, const shared_ptr< SVO > &svo, const CoordinateFrame &previousCameraFrame=CoordinateFrame()) |
|
static void | renderWireframe (RenderDevice *rd, const Array< shared_ptr< Surface > > &surfaceArray, const Color4 &color=Color3::black(), bool previous=false) |
| Utility function for rendering a set of surfaces in wireframe using the current blending mode. More...
|
|
static void | setStorage (const Array< shared_ptr< Surface >> &surfaceArray, ImageStorage newStorage) |
| Set the storage on all Materials in the array. More...
|
|
static void | sortBackToFront (Array< shared_ptr< Surface > > &surfaces, const Vector3 &wsLookVector) |
|
static void | sortFrontToBack (Array< shared_ptr< Surface > > &surfaces, const Vector3 &wsLookVector) |
| Divides the inModels into a front-to-back sorted array of opaque models and a back-to-front sorted array of potentially transparent models. More...
|
|
virtual bool G3D::HeightfieldModel::Tile::canBeFullyRepresentedInGBuffer |
( |
const GBuffer::Specification & |
specification | ) |
const |
|
inlineoverridevirtual |
Can this particular instance of this type of Surface be fully described in a G3D::GBuffer using the given specification?
Often set to false for Surfaces with fractional alpha values, transmission, special back-to-front rendering needs, that require more dynamic range in the emissive channel, or that simply lack a renderIntoGBufferHomogeneous implementation.
Surfaces that return false for canBeFullyRepresentedInGBuffer may still implement renderIntoGBufferHomogeneous for the parts of their surfaces that are representable, and doing so will improve the quality of AmbientOcclusion and post-processing techniques like MotionBlur and DepthOfField.
- See also
- anyUnblended, requiresBlending
Implements G3D::Surface.
virtual void G3D::HeightfieldModel::Tile::renderIntoGBufferHomogeneous |
( |
RenderDevice * |
rd, |
|
|
const Array< shared_ptr< Surface > > & |
surfaceArray, |
|
|
const shared_ptr< GBuffer > & |
gbuffer, |
|
|
const shared_ptr< Texture > & |
depthPeelTexture, |
|
|
const float |
minZSeparation, |
|
|
const LightingEnvironment & |
lighting |
|
) |
| const |
|
overridevirtual |
Render all instances of surfaceArray to the currently-bound Framebuffer using the fields and mapping dictated by specification.
This is also used for depth-only (e.g., z-prepass) rendering.
Invoking this with elements of surfaceArray that are not of the same most-derived type as this will result in an error.
If depthPeelTexture is not null, then use it and minZSeparation to perform a depth peel. This will result in the GBuffer representing the closest geometry at least minZSeparation behind the geometry in depthPeelTexture.
- Parameters
-
previousCameraFrame | Used for rendering GBuffer::CS_POSITION_CHANGE frames. |
- See also
- renderIntoGBuffer
Reimplemented from G3D::Surface.
virtual void G3D::HeightfieldModel::Tile::renderWireframeHomogeneous |
( |
RenderDevice * |
rd, |
|
|
const Array< shared_ptr< Surface > > & |
surfaceArray, |
|
|
const Color4 & |
color, |
|
|
bool |
previous |
|
) |
| const |
|
overridevirtual |
Rendering a set of surfaces in wireframe, using the current blending mode.
This is primarily used for debugging.
Invoking this with elements of surfaceArray that are not of the same most-derived type as this will result in an error.
If depthPeelTexture is not null, then use it and minZSeparation to perform a depth peel. This will result in the depth buffer representing the closest geometry at least minZSeparation behind the geometry in depthPeelTexture.
- Parameters
-
previous | If true, the caller should set the RenderDevice camera transformation to the previous one. This is provided for debugging previous frame data. |
- See also
- renderWireframe
Implements G3D::Surface.