mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Direct3D11 common shader changes.
This commit is contained in:
parent
1ff6f221fb
commit
3a9b50f702
283 changed files with 3547 additions and 1834 deletions
|
|
@ -20,18 +20,20 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "shaderModel.hlsl"
|
||||
|
||||
struct Vert
|
||||
{
|
||||
float3 position : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float3 T : TANGENT;
|
||||
float4 color : COLOR0;
|
||||
float2 texCoord : TEXCOORD0;
|
||||
float3 position : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float3 T : TANGENT;
|
||||
float4 color : COLOR0;
|
||||
float2 texCoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct Conn
|
||||
{
|
||||
float4 position : POSITION;
|
||||
float4 position : TORQUE_POSITION;
|
||||
float4 color : COLOR0;
|
||||
float2 texCoord : TEXCOORD0;
|
||||
float fade : TEXCOORD1;
|
||||
|
|
@ -46,12 +48,12 @@ Conn main( Vert In )
|
|||
Conn Out;
|
||||
|
||||
// Decals are in world space.
|
||||
Out.position = mul( modelview, float4( In.position.xyz, 1.0 ) );
|
||||
Out.position = mul( modelview, float4( In.position, 1.0 ) );
|
||||
|
||||
Out.color = In.color;
|
||||
Out.texCoord = In.texCoord;
|
||||
|
||||
float fromCasterDist = length( In.position.xyz - shadowCasterPosition ) - shadowLength;
|
||||
float fromCasterDist = length( In.position - shadowCasterPosition ) - shadowLength;
|
||||
Out.fade = 1.0 - saturate( fromCasterDist / shadowLength );
|
||||
|
||||
return Out;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue