Bläddra i källkod

shiny*.lolfx : light reflect FIX

undefined
Benjamin ‘Touky’ Huet Sam Hocevar <sam@hocevar.net> 11 år sedan
förälder
incheckning
87aa2dc3e9
4 ändrade filer med 18 tillägg och 8 borttagningar
  1. +1
    -2
      src/easymesh/shiny.lolfx
  2. +1
    -2
      src/easymesh/shinyflat.lolfx
  3. +15
    -3
      test/data/mesh-buffer.txt
  4. +1
    -1
      test/meshviewer.cpp

+ 1
- 2
src/easymesh/shiny.lolfx Visa fil

@@ -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;


+ 1
- 2
src/easymesh/shinyflat.lolfx Visa fil

@@ -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;


+ 15
- 3
test/data/mesh-buffer.txt Visa fil

@@ -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]


+ 1
- 1
test/meshviewer.cpp Visa fil

@@ -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;


Laddar…
Avbryt
Spara