blob: 6ab4b6cfe4be5bdc935acfa89bf86214ca58b3f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "shaderCommon.h"
cbuffer constBuf : register(b0)
{
PointShaderConst gParams;
};
PointVertexOut pointVS(PointVertexIn input, uint instance : SV_VertexID)
{
const float4 gl_Vertex = input.position;
const float4x4 gl_ModelViewMatrix = gParams.modelview;
float density = input.density;
int phase = input.phase;
// calculate window-space point size
float4 viewPos = mul(gl_ModelViewMatrix, float4(gl_Vertex.xyz, 1.0));
PointVertexOut output;
output.position = viewPos;
output.density = density;
output.phase = phase;
output.vertex = gl_Vertex;
return output;
}
|