class Surface

The FidelityFX Cauldron Framework surface representation.

File location: framework/cauldron/framework/inc/render/mesh.h

Construction

Return type

Description

Construction.
Surface (uint32_t surfaceID)
Constructor, sets the surfaceID [0,surfaces in the mesh].

Methods

Return type

Description

Vec4 &

Returns the geometric center of all surface geometry.

Vec4

Center () const

Vec4 &

Returns the geometric radius of all surface geometry.

Vec4

Radius () const

const IndexBufferInformation &

Returns the index buffer information for the surface geometry.

IndexBufferInformation &

GetIndexBuffer ()

const VertexBufferInformation &

GetVertexBuffer (VertexAttributeType Type) const
Returns the vertex buffer information for a specific vertex attribute of the surface geometry.

VertexBufferInformation &

GetVertexBuffer (VertexAttributeType type)

uint32_t

GetAttributeStride (VertexAttributeType type) const
Returns the vertex buffer stream stride for a specific vertex attribute.

void

SetMaterial (const Material * pMaterial)
Sets the surface’s material for rendering.

const Material *

GetMaterial () const
Gets the surface’s material for rendering.

bool

Returns true if the material has translucent texture or geometric information.

uint32_t

Returns an ORed bitmask representing all vertex attributes in a surface’s geometry.

const uint32_t

GetSurfaceID () const
Returns the ID of the surface in the Mesh.

static void

GetVertexAttributeDefines (uint32_t attributes, DefineList & defines)
Returns the shader defines necessary to build all surface vertex attribute fetchers in a shader.

Detailed description

The FidelityFX Cauldron Framework surface representation. A surface has a Material and is one of a number of surfaces that make up a Mesh.

Construction

Surface

Copied!

Surface ()

Construction.


Surface

Copied!

Surface (uint32_t surfaceID)

Constructor, sets the surfaceID [0,surfaces in the mesh].


Methods

Center

Copied!

Vec4 & Center ()

Returns the geometric center of all surface geometry.


Radius

Copied!

Vec4 & Radius ()

Returns the geometric radius of all surface geometry.


GetIndexBuffer

Copied!

const IndexBufferInformation & GetIndexBuffer () const

Returns the index buffer information for the surface geometry.


GetVertexBuffer

Copied!

const VertexBufferInformation & GetVertexBuffer (VertexAttributeType  Type) const

Returns the vertex buffer information for a specific vertex attribute of the surface geometry.


GetAttributeStride

Copied!

uint32_t GetAttributeStride (VertexAttributeType  type) const

Returns the vertex buffer stream stride for a specific vertex attribute.


SetMaterial

Copied!

void SetMaterial (const Material * pMaterial)

Sets the surface’s material for rendering.


GetMaterial

Copied!

const Material * GetMaterial () const

Gets the surface’s material for rendering.


HasTranslucency

Copied!

bool HasTranslucency () const

Returns true if the material has translucent texture or geometric information.


GetVertexAttributes

Copied!

uint32_t GetVertexAttributes () const

Returns an ORed bitmask representing all vertex attributes in a surface’s geometry.


GetSurfaceID

Copied!

const uint32_t GetSurfaceID () const

Returns the ID of the surface in the Mesh.


GetVertexAttributeDefines

Copied!

static void GetVertexAttributeDefines (
    uint32_t attributes,
    DefineList & defines
)

Returns the shader defines necessary to build all surface vertex attribute fetchers in a shader.


Related pages

  • Visit the FidelityFX SDK product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNAâ„¢ 2 GPUs, AMD Ryzenâ„¢ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!