Added GPU SoftBody constraint solvers for DirectX 11 (Direct Compute) and OpenCL, thanks to AMD.
See also http://code.google.com/p/bullet/issues/detail?id=390 Added Demos/DX11ClothDemo (an OpenCL cloth demo will follow soon)
This commit is contained in:
48
Demos/DX11ClothDemo/cloth_renderer_VS.hlsl
Normal file
48
Demos/DX11ClothDemo/cloth_renderer_VS.hlsl
Normal file
@@ -0,0 +1,48 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: BasicHLSL11_VS.hlsl
|
||||
//
|
||||
// The vertex shader file for the BasicHLSL11 sample.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Globals
|
||||
//--------------------------------------------------------------------------------------
|
||||
cbuffer cbPerObject : register( b0 )
|
||||
{
|
||||
matrix g_mWorldViewProjection : packoffset( c0 );
|
||||
matrix g_mWorld : packoffset( c4 );
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Input / Output structures
|
||||
//--------------------------------------------------------------------------------------
|
||||
struct VS_INPUT
|
||||
{
|
||||
float4 vPosition : POSITION;
|
||||
float3 vNormal : NORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUTPUT
|
||||
{
|
||||
float3 vNormal : NORMAL;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
float4 vPosition : SV_POSITION;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Vertex Shader
|
||||
//--------------------------------------------------------------------------------------
|
||||
VS_OUTPUT VSMain( VS_INPUT Input )
|
||||
{
|
||||
VS_OUTPUT Output;
|
||||
|
||||
Output.vPosition = mul( Input.vPosition, g_mWorldViewProjection );
|
||||
Output.vNormal = mul( Input.vNormal, (float3x3)g_mWorld );
|
||||
Output.vTexcoord = Input.vTexcoord;
|
||||
|
||||
return Output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user