-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtfx_ppll_build.vert.glsl
More file actions
31 lines (25 loc) · 942 Bytes
/
tfx_ppll_build.vert.glsl
File metadata and controls
31 lines (25 loc) · 942 Bytes
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
27
28
29
30
31
#version 450
precision highp float;
precision highp int;
#pragma include ../_config_ubo;
#pragma include ../_utils;
#pragma include ./_tfx_params_ubo;
#pragma include ./_tfx_vertex_resolve;
layout(location = 0) flat out int v_hairInstanceId;
layout(location = 1) out float v_vertexRootToTipFactor;
layout(location = 2) out vec3 v_position;
layout(location = 3) out vec3 v_normal;
layout(location = 4) out vec3 v_tangent;
layout(location = 5) out vec4 v_p0p1;
// TBH this shader is moslty same as 'tfx_forward.vert.glsl'
void main() {
TressFXParams tfxParams = createTfxParams();
TressFXVertex tressfxVert = getExpandedTressFXVert(tfxParams);
gl_Position = tressfxVert.position;
v_hairInstanceId = gl_InstanceIndex;
v_vertexRootToTipFactor = tressfxVert.vertexRootToTipFactor;
v_position = tressfxVert.positionWorldSpace.xyz;
v_normal = tressfxVert.normal;
v_tangent = tressfxVert.tangent;
v_p0p1 = tressfxVert.p0p1;
}