blob: ecd1e38fcbf57247e5ec0285f7aac1fc303f4de0 (
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
|
#include "shaderCommon.h"
cbuffer constBuf : register(b0)
{
PointShaderConst gParams;
};
PointVertexOut pointVS(PointVertexIn input, uint instance : SV_VertexID)
{
const float4 modelPosition = input.position;
const float4x4 modelViewMatrix = gParams.modelView;
float density = input.density;
int phase = input.phase;
// calculate window-space point size
float4 viewPos = mul(modelViewMatrix, float4(modelPosition.xyz, 1.0));
PointVertexOut output;
output.viewPosition = viewPos;
output.density = density;
output.phase = phase;
output.modelPosition = modelPosition;
return output;
}
|