From 236f03c0b9a4982328ed1201978f7f69d192d9b2 Mon Sep 17 00:00:00 2001 From: Anton Novoselov Date: Tue, 1 Aug 2017 12:53:38 +0300 Subject: Blast 1.1 release (windows / linux) see docs/release_notes.txt for details --- docs/api_docs/files/pageextshaders.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'docs/api_docs/files/pageextshaders.html') diff --git a/docs/api_docs/files/pageextshaders.html b/docs/api_docs/files/pageextshaders.html index f7b3099..836f4e5 100644 --- a/docs/api_docs/files/pageextshaders.html +++ b/docs/api_docs/files/pageextshaders.html @@ -1,6 +1,6 @@ - NVIDIA(R) Blast(R) SDK 1.0 API Reference: Damage Shaders (NvBlastExtShaders) + NVIDIA(R) Blast(R) SDK 1.1 API Reference: Damage Shaders (NvBlastExtShaders) @@ -20,23 +20,25 @@
-

Damage Shaders (NvBlastExtShaders)

Blast Extensions provide basic implementations of programs generating fracture commands, the first step in breaking a Blast™ Actor, see Damage and Fracturing. These programs come as two shader functions (callbacks) for Actors with a support graph and Actors with just one chunk respectively. The NvBlastDamageProgram containing both shaders can be used for low-level directly (NvBlastActorGenerateFracture) or for TkActor's damage and fracture functions.

+

Damage Shaders (NvBlastExtShaders)

The Blast™ damage shader extension provides basic implementations of programs generating fracture commands, the first step in breaking a Blast™ Actor, see Damage and Fracturing. These programs come as two shader functions (callbacks): one for Actors with a support graph, and one for Actors with just one chunk, respectively. The NvBlastDamageProgram containing both shaders can be used for low-level directly (NvBlastActorGenerateFracture) or for TkActor's damage and fracture functions.

+For example, one may construct a damage program using the "shear" damage shaders declared in NvBlastExtDamageShaders.h:

-The appropriate shader will be called for an Actor being processed, along with the necessary Actor's geometry and program parameters. The parameters (NvBlastProgramParams) are set to contain

+The appropriate shader ("graph" or "subgraph") will be called for an Actor being processed, along with the Actor's necessary geometry and program parameters. The parameters (NvBlastProgramParams) are set to contain

1. Material, something that describes an Actor properties (e.g. mass, stiffness, fragility) which are not expected to be changed often.

2. Damage description, something that describes a particular damage event (e.g. position, radius and force of explosion).

-

    NvBlastExtMaterial material = { singleChunkThreshold, graphChunkThreshold, bondTangentialThreshold, bondNormalThreshold, damageAttenuation };
+For example:

+

    NvBlastExtMaterial material = { health, minDamageThreshold, maxDamageThreshold };
     NvBlastExtRadialDamageDesc damageDesc = { compressive, posX, posY, posZ, minR, maxR };
 

When used with TkActor::damage() functions, TkActor will cache the necessary data for deferred processing through TkGroup. This includes accumulating damage requests for the same material and program parameter combination. A default material can be set for a TkFamily that all its Actors uses.

+A Tk layer example follows.

    tkGroup->addActor(*tkActor);
     tkActor->damage(damageProgram, damageDesc0, sizeof(NvBlastExtRadialDamageDesc), &material);
     tkActor->damage(damageProgram, damageDesc1, sizeof(NvBlastExtRadialDamageDesc), &material);
     tkGroup->process();
-    tkGroup->sync();
 

-In contrast, the user is responsible for providing all the damage descriptions persisting through the low-level NvBlastActorGenerateFracture call when not using the Tk layer.

+In contrast, the user is responsible for providing all the damage descriptions persisting through the low-level NvBlastActorGenerateFracture call when not using the Tk layer:

    NvBlastProgramParams programParams = { damageDescs, 2, &material };
     NvBlastActorGenerateFracture(commandBuffers, actor, damageProgram, &programParams, nullptr, nullptr);
 
-- cgit v1.2.3