R26_dev8 - First public commit

This commit is contained in:
dexyfex
2017-09-21 20:33:05 +10:00
Unverified
commit a8243c3e0e
391 changed files with 157678 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#include "Common.hlsli"
cbuffer VSSceneVars : register(b0)
{
float4x4 ViewProj;
float4x4 ViewInv;
float SegmentCount;
float VertexCount;
float Pad1;
float Pad2;
}
cbuffer VSSphereVars : register(b1)
{
float3 Center;
float Radius;
}
float4 main(uint id : SV_VertexID) : SV_POSITION
{
static const float twopi = 6.283185307179586476925286766559;
uint seg = id;
float t = twopi*((float)seg)/SegmentCount;
float ct = cos(t);
float st = sin(t);
float r = Radius;
float3 o = float3(ct*r, st*r, 0);
float3 f = Center.xyz + mul(o, (float3x3)ViewInv);
float4 cpos = mul(float4(f,1), ViewProj);
cpos.z = DepthFunc(cpos.zw);
return cpos;
}