mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
hook up the right ConvexConnectP
This commit is contained in:
parent
26ee0d986f
commit
c6d4ea37b9
1 changed files with 5 additions and 13 deletions
|
|
@ -4,18 +4,10 @@
|
||||||
#include "../../lighting.hlsl"
|
#include "../../lighting.hlsl"
|
||||||
#include "../../torque.hlsl"
|
#include "../../torque.hlsl"
|
||||||
|
|
||||||
/*struct ConvexConnectP
|
|
||||||
{
|
|
||||||
float4 pos : TORQUE_POSITION;
|
|
||||||
float4 uv0 : TEXCOORD1;
|
|
||||||
float4 vsEyeDir : TEXCOORD2;
|
|
||||||
};*/
|
|
||||||
|
|
||||||
struct ConvexConnectP
|
struct ConvexConnectP
|
||||||
{
|
{
|
||||||
float4 pos : TORQUE_POSITION;
|
float4 pos : TORQUE_POSITION;
|
||||||
float4 wsEyeDir : TEXCOORD0;
|
float4 uv0 : TEXCOORD1;
|
||||||
float4 ssPos : TEXCOORD1;
|
|
||||||
float4 vsEyeDir : TEXCOORD2;
|
float4 vsEyeDir : TEXCOORD2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -106,19 +98,19 @@ float defineBoxSpaceInfluence(Surface surface, int id)
|
||||||
float4 main( ConvexConnectP IN ) : SV_TARGET
|
float4 main( ConvexConnectP IN ) : SV_TARGET
|
||||||
{
|
{
|
||||||
// Compute scene UV
|
// Compute scene UV
|
||||||
float3 ssPos = IN.ssPos.xyz / IN.ssPos.w;
|
//float3 ssPos = IN.ssPos.xyz / IN.ssPos.w;
|
||||||
float2 uvScene = getUVFromSSPos( ssPos, rtParams0 );
|
//float2 IN.uv0 = getUVFromSSPos( ssPos, rtParams0 );
|
||||||
|
|
||||||
//eye ray WS/LS
|
//eye ray WS/LS
|
||||||
float3 vsEyeRay = getDistanceVectorToPlane( -vsFarPlane.w, IN.vsEyeDir.xyz, vsFarPlane );
|
float3 vsEyeRay = getDistanceVectorToPlane( -vsFarPlane.w, IN.vsEyeDir.xyz, vsFarPlane );
|
||||||
float3 wsEyeRay = mul(cameraToWorld, float4(vsEyeRay, 0)).xyz;
|
float3 wsEyeRay = mul(cameraToWorld, float4(vsEyeRay, 0)).xyz;
|
||||||
|
|
||||||
//unpack normal and linear depth
|
//unpack normal and linear depth
|
||||||
float4 normDepth = TORQUE_DEFERRED_UNCONDITION(deferredBuffer, uvScene);
|
float4 normDepth = TORQUE_DEFERRED_UNCONDITION(deferredBuffer, IN.uv0.xy);
|
||||||
|
|
||||||
//create surface
|
//create surface
|
||||||
Surface surface = createSurface( normDepth, TORQUE_SAMPLER2D_MAKEARG(colorBuffer),TORQUE_SAMPLER2D_MAKEARG(matInfoBuffer),
|
Surface surface = createSurface( normDepth, TORQUE_SAMPLER2D_MAKEARG(colorBuffer),TORQUE_SAMPLER2D_MAKEARG(matInfoBuffer),
|
||||||
uvScene, eyePosWorld, wsEyeRay, cameraToWorld);
|
IN.uv0.xy, eyePosWorld, wsEyeRay, cameraToWorld);
|
||||||
//early out if emissive
|
//early out if emissive
|
||||||
if (getFlag(surface.matFlag, 0))
|
if (getFlag(surface.matFlag, 0))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue