mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
fix file line endings
This commit is contained in:
@@ -266,4 +266,4 @@ INST_NAME(texdisplay);
|
||||
#define MESH_TRIANGLE_STRIP 2
|
||||
#define MESH_TRIANGLE_FAN 3
|
||||
#define MESH_TRIANGLE_LIST_ADJ 4
|
||||
#define MESH_TRIANGLE_STRIP_ADJ 5
|
||||
#define MESH_TRIANGLE_STRIP_ADJ 5
|
||||
|
||||
@@ -161,4 +161,4 @@ cbuffer HistogramCBufferData REG(b0)
|
||||
#define MESH_TRIANGLE_LIST 1
|
||||
#define MESH_TRIANGLE_STRIP 2
|
||||
#define MESH_TRIANGLE_LIST_ADJ 3
|
||||
#define MESH_TRIANGLE_STRIP_ADJ 4
|
||||
#define MESH_TRIANGLE_STRIP_ADJ 4
|
||||
|
||||
@@ -68,38 +68,38 @@ wireframeV2F RENDERDOC_MeshVS(meshA2V IN, uint vid : SV_VertexID)
|
||||
[maxvertexcount(3)]
|
||||
void RENDERDOC_MeshGS(triangle wireframeV2F input[3], inout TriangleStream<wireframeV2F> TriStream)
|
||||
{
|
||||
wireframeV2F output;
|
||||
wireframeV2F output;
|
||||
|
||||
float4 faceEdgeA = mul(input[1].pos, InvProj) - mul(input[0].pos, InvProj);
|
||||
float4 faceEdgeB = mul(input[2].pos, InvProj) - mul(input[0].pos, InvProj);
|
||||
float3 faceNormal = normalize( cross(faceEdgeA.xyz, faceEdgeB.xyz) );
|
||||
float4 faceEdgeA = mul(input[1].pos, InvProj) - mul(input[0].pos, InvProj);
|
||||
float4 faceEdgeB = mul(input[2].pos, InvProj) - mul(input[0].pos, InvProj);
|
||||
float3 faceNormal = normalize( cross(faceEdgeA.xyz, faceEdgeB.xyz) );
|
||||
|
||||
for(int i=0; i<3; i++)
|
||||
{
|
||||
output.pos = input[i].pos;
|
||||
output.norm = faceNormal;
|
||||
output.secondary = input[i].secondary;
|
||||
TriStream.Append(output);
|
||||
}
|
||||
TriStream.RestartStrip();
|
||||
for(int i=0; i<3; i++)
|
||||
{
|
||||
output.pos = input[i].pos;
|
||||
output.norm = faceNormal;
|
||||
output.secondary = input[i].secondary;
|
||||
TriStream.Append(output);
|
||||
}
|
||||
TriStream.RestartStrip();
|
||||
}
|
||||
|
||||
float4 RENDERDOC_MeshPS(wireframeV2F IN) : SV_Target0
|
||||
{
|
||||
uint type = OutputDisplayFormat;
|
||||
uint type = OutputDisplayFormat;
|
||||
|
||||
if(type == MESHDISPLAY_SECONDARY)
|
||||
return float4(IN.secondary.xyz, 1);
|
||||
else if(type == MESHDISPLAY_SECONDARY_ALPHA)
|
||||
return float4(IN.secondary.www, 1);
|
||||
else if(type == MESHDISPLAY_FACELIT)
|
||||
{
|
||||
float3 lightDir = normalize(float3(0, -0.3f, -1));
|
||||
if(type == MESHDISPLAY_SECONDARY)
|
||||
return float4(IN.secondary.xyz, 1);
|
||||
else if(type == MESHDISPLAY_SECONDARY_ALPHA)
|
||||
return float4(IN.secondary.www, 1);
|
||||
else if(type == MESHDISPLAY_FACELIT)
|
||||
{
|
||||
float3 lightDir = normalize(float3(0, -0.3f, -1));
|
||||
|
||||
return float4(WireframeColour.xyz*abs(dot(lightDir, IN.norm)), 1);
|
||||
}
|
||||
else //if(type == MESHDISPLAY_SOLID)
|
||||
return float4(WireframeColour.xyz, 1);
|
||||
return float4(WireframeColour.xyz*abs(dot(lightDir, IN.norm)), 1);
|
||||
}
|
||||
else //if(type == MESHDISPLAY_SOLID)
|
||||
return float4(WireframeColour.xyz, 1);
|
||||
}
|
||||
|
||||
wireframeV2F RENDERDOC_WireframeVS(float3 pos : POSITION, uint vid : SV_VertexID)
|
||||
@@ -279,8 +279,8 @@ void defaultPath(uint threadID)
|
||||
|
||||
float4 wpos = mul(pos, PickMVP);
|
||||
|
||||
if (PickUnproject == 1)
|
||||
wpos.xyz /= wpos.www;
|
||||
if (PickUnproject == 1)
|
||||
wpos.xyz /= wpos.www;
|
||||
|
||||
wpos.xy *= float2(1.0f, -1.0f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user