diff --git a/src/easymesh/shiny.lolfx b/src/easymesh/shiny.lolfx index 6180ef0b..ae100a35 100644 --- a/src/easymesh/shiny.lolfx +++ b/src/easymesh/shiny.lolfx @@ -86,14 +86,13 @@ void main(void) { /* Point light -- no attenuation yet */ s = normalize(p - pass_Vertex.xyz); - r = reflect(-s, TNormal); } else { /* Directional light */ s = normalize(-p); - r = reflect(s, TNormal); } + r = reflect(-s, TNormal); float sdotn = max(dot(s, TNormal), 0.0); diffuse += color.xyz * sdotn; diff --git a/src/easymesh/shinyflat.lolfx b/src/easymesh/shinyflat.lolfx index ff9a6185..d7f07c52 100644 --- a/src/easymesh/shinyflat.lolfx +++ b/src/easymesh/shinyflat.lolfx @@ -89,14 +89,13 @@ void main(void) { /* Point light -- no attenuation yet */ s = normalize(p - pass_Vertex.xyz); - r = reflect(-s, TNormal); } else { /* Directional light */ s = normalize(-p); - r = reflect(s, TNormal); } + r = reflect(-s, TNormal); float sdotn = max(dot(s, TNormal), 0.0); diffuse += color.xyz * sdotn; diff --git a/test/data/mesh-buffer.txt b/test/data/mesh-buffer.txt index d87376d4..25db1bb1 100644 --- a/test/data/mesh-buffer.txt +++ b/test/data/mesh-buffer.txt @@ -1,7 +1,9 @@ -addlight 0 position (1 -.5 1.5) color #bbb addlight 0 position (-1 -.5 -1.5) color #bbb addlight 1 position (0 1 0) color #444 +addlight 0 position (0 0 15) color #bbb +addlight 1 position (0 0 15) color #bbb +//addlight 1 position (3 10 0) color #444 clearcolor #ddd showgizmo true -showlight false +showlight true //SCENE SETUP END @@ -48,7 +50,17 @@ custom setmesh " //sc#0f0 ab 2 ty 1.5 ab 2 //sc#00f ab 2 ty 1.5 ab 2 -sc#00f tqw lp 5[tz 11 [lp 6 [tx 5 ty 5 ab 10 ]]] tz -22 +//sc#00f tqw lp 5[tz 11 [lp 6 [tx 5 ty 5 afcb 10 -1 ]]] tz -22 + +// tqw +sc#f00 ab 10 +//tz 5 +//vm +// splt 1 +// rj .2 +// splt 1 +// rj .2 +// smth 1 0 1 //[sc#66f afcb(10) .25tx0]csgs[sc#fff afcb(10).25t(2)][[sc#6f6 afcb(7).25]csgs[sc#fff afcb(7).25t(1.5)]][[sc#f44 asph4 12t(-2.5)]csga[sc#fff afcb(7).25t(1.4)]csgs[sc#fff afcb(7).25t(2.5)]][[sc#ff0 ato6 2.5 1.2rx90tz-1.25tx-.9][sc#ff0 ab.5 2.1 .5dup[rz90sx.5ty-.8tx-.28]ty.55tx.25tz-.4taz1 1sy.8sx.8ty-.55tx-.25tz.4tz-1.2tx1.2]tz1.25tx1.25dup[sx-1ry90]tz-1.25tx-1.25] diff --git a/test/meshviewer.cpp b/test/meshviewer.cpp index d6ed4517..346877e9 100644 --- a/test/meshviewer.cpp +++ b/test/meshviewer.cpp @@ -488,7 +488,7 @@ public: //Mesh mat calculation m_mat_prev = m_mat; - m_mat = mat4::translate(vec3(0.f));//mat4(quat::fromeuler_xyz(vec3(m_rot_mesh, .0f))); + m_mat = mat4::translate(vec3(0.f)); //Target List Setup TargetCamera tc;