Browse Source

easymesh: fix the specular highlight in the OpenGL shader.

legacy
Sam Hocevar sam 12 years ago
parent
commit
837e56435d
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      src/easymesh/shiny.lolfx
  2. +4
    -4
      tutorial/05_easymesh.cpp

+ 1
- 1
src/easymesh/shiny.lolfx View File

@@ -30,7 +30,7 @@ void main(void)
vec3 tnorm = normalize(in_NormalMat * in_Normal);
vec4 eye = in_ModelView * vec4(in_Vertex, 1.0);

vec3 s = in_LightDir; /* normalize(eye - lightpos); */
vec3 s = normalize(in_LightDir); /* normalize(eye - lightpos); */
vec3 v = normalize(-eye.xyz);
vec3 r = reflect(-s, tnorm);



+ 4
- 4
tutorial/05_easymesh.cpp View File

@@ -23,15 +23,15 @@ public:
EasyMeshTutorial()
{
m_angle = 0;
m_mesh.Compile("sc#e94 scb#964 [acap11 6 6 tx8]");
m_mesh.Compile("sc#94e scb#649 [acap3 6 6 tx-5 tz-6]");
m_mesh.Compile("sc#49e scb#469 [acap31 6 6 tx-5 tz6]");
m_mesh.Compile("sc#e94 scb#964 [asph11 7 7 7 tx10]");
m_mesh.Compile("sc#94e scb#649 [asph3 7 7 7 tx-6 tz-9]");
m_mesh.Compile("sc#49e scb#469 [asph31 7 7 7 tx-6 tz9]");

m_camera = new Camera(vec3(0.f, 600.f, 0.f),
vec3(0.f, 0.f, 0.f),
vec3(0, 1, 0));
m_camera->SetPerspective(70.f, 640.f, 480.f, .1f, 1000.f);
m_camera->SetTarget(vec3(0.f));
m_camera->SetTarget(vec3(0.f, -5.f, 0.f));
m_camera->SetPosition(vec3(-20.f, 20.f, 0.f));
Ticker::Ref(m_camera);



Loading…
Cancel
Save