[example] cel-shading and outline using inverted hull (#5615)
* added cel-shading and outline using inverted hull example * new screenshot * added glsl100+120 compat * updated view * unnecessary spacing
This commit is contained in:
parent
3e926d65a0
commit
54f630774d
1 changed files with 562 additions and 0 deletions
15
examples/shaders/resources/shaders/glsl330/outline_hull.vs
Normal file
15
examples/shaders/resources/shaders/glsl330/outline_hull.vs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#version 330
|
||||
|
||||
in vec3 vertexPosition;
|
||||
in vec3 vertexNormal;
|
||||
in vec2 vertexTexCoord;
|
||||
in vec4 vertexColor;
|
||||
|
||||
uniform mat4 mvp;
|
||||
uniform float outlineThickness;
|
||||
|
||||
void main() {
|
||||
// Extrude vertex along its normal to create the hull.
|
||||
vec3 extruded = vertexPosition + vertexNormal * outlineThickness;
|
||||
gl_Position = mvp * vec4(extruded, 1.0);
|
||||
}
|
||||
Loading…
Reference in a new issue