projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
angle limit constraint
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
planeinf.h
diff --git
a/shaders/planeinf.h
b/shaders/planeinf.h
index d2a227a15d5f9801137ac19b511d721530e5167a..a0272a8d9c837c7121b18c0c2188ff554146e9ce 100644
(file)
--- a/
shaders/planeinf.h
+++ b/
shaders/planeinf.h
@@
-7,12
+7,14
@@
static struct vg_shader _shader_planeinf = {
.link = shader_planeinf_link,
.vs =
{
.link = shader_planeinf_link,
.vs =
{
-.orig_file = "../shaders/standard.vs",
+.orig_file = "../
../
shaders/standard.vs",
.static_src =
"layout (location=0) in vec3 a_co;\n"
"layout (location=1) in vec3 a_norm;\n"
.static_src =
"layout (location=0) in vec3 a_co;\n"
"layout (location=1) in vec3 a_norm;\n"
-"layout (location=2) in vec4 a_colour;\n"
-"layout (location=3) in vec2 a_uv;\n"
+"layout (location=2) in vec2 a_uv;\n"
+"layout (location=3) in vec4 a_colour;\n"
+"layout (location=4) in vec4 a_weights;\n"
+"layout (location=5) in ivec4 a_groups;\n"
"\n"
"#line 2 0 \n"
"\n"
"\n"
"#line 2 0 \n"
"\n"
@@
-23,19
+25,22
@@
static struct vg_shader _shader_planeinf = {
"out vec2 aUv;\n"
"out vec3 aNorm;\n"
"out vec3 aCo;\n"
"out vec2 aUv;\n"
"out vec3 aNorm;\n"
"out vec3 aCo;\n"
+"out vec3 aWorldCo;\n"
"\n"
"void main()\n"
"{\n"
"\n"
"void main()\n"
"{\n"
-" gl_Position = uPv * vec4( uMdl * vec4(a_co,1.0), 1.0 );\n"
+" vec3 world_pos = uMdl * vec4(a_co,1.0);\n"
+" gl_Position = uPv * vec4( world_pos, 1.0 );\n"
" aColour = a_colour;\n"
" aUv = a_uv;\n"
" aNorm = mat3(uMdl) * a_norm;\n"
" aCo = a_co;\n"
" aColour = a_colour;\n"
" aUv = a_uv;\n"
" aNorm = mat3(uMdl) * a_norm;\n"
" aCo = a_co;\n"
+" aWorldCo = world_pos;\n"
"}\n"
""},
.fs =
{
"}\n"
""},
.fs =
{
-.orig_file = "../shaders/planeinf.fs",
+.orig_file = "../
../
shaders/planeinf.fs",
.static_src =
"\n"
"#line 2 0 \n"
.static_src =
"\n"
"#line 2 0 \n"