Color gradient ramp for glowing parts of the mesh
This commit is contained in:
parent
cb5bd093ec
commit
e74e37cc16
11 changed files with 64 additions and 24 deletions
|
|
@ -11,12 +11,14 @@ layout (binding = 0) uniform UBO
|
|||
{
|
||||
mat4 projection;
|
||||
mat4 model;
|
||||
float gradientPos;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) out vec3 outNormal;
|
||||
layout (location = 1) out vec3 outColor;
|
||||
layout (location = 2) out vec3 outEyePos;
|
||||
layout (location = 3) out vec3 outLightVec;
|
||||
layout (location = 4) out vec2 outUV;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
|
|
@ -27,6 +29,7 @@ void main()
|
|||
{
|
||||
outNormal = inNormal;
|
||||
outColor = inColor;
|
||||
outUV = vec2(ubo.gradientPos, 0.0);
|
||||
gl_Position = ubo.projection * ubo.model * pos;
|
||||
outEyePos = vec3(ubo.model * pos);
|
||||
vec4 lightPos = vec4(0.0, 0.0, -5.0, 1.0);// * ubo.model;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue