Changeset 1693


Ignore:
Timestamp:
Aug 4, 2012, 2:54:11 PM (11 years ago)
Author:
sam
Message:

easymesh: fix the specular highlight in the OpenGL shader.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/easymesh/shiny.lolfx

    r1690 r1693  
    3131    vec4 eye = in_ModelView * vec4(in_Vertex, 1.0);
    3232
    33     vec3 s = in_LightDir; /* normalize(eye - lightpos); */
     33    vec3 s = normalize(in_LightDir); /* normalize(eye - lightpos); */
    3434    vec3 v = normalize(-eye.xyz);
    3535    vec3 r = reflect(-s, tnorm);
  • trunk/tutorial/05_easymesh.cpp

    r1692 r1693  
    2424    {
    2525        m_angle = 0;
    26         m_mesh.Compile("sc#e94 scb#964 [acap11 6 6 tx8]");
    27         m_mesh.Compile("sc#94e scb#649 [acap3 6 6 tx-5 tz-6]");
    28         m_mesh.Compile("sc#49e scb#469 [acap31 6 6 tx-5 tz6]");
     26        m_mesh.Compile("sc#e94 scb#964 [asph11 7 7 7 tx10]");
     27        m_mesh.Compile("sc#94e scb#649 [asph3 7 7 7 tx-6 tz-9]");
     28        m_mesh.Compile("sc#49e scb#469 [asph31 7 7 7 tx-6 tz9]");
    2929
    3030        m_camera = new Camera(vec3(0.f, 600.f, 0.f),
     
    3232                              vec3(0, 1, 0));
    3333        m_camera->SetPerspective(70.f, 640.f, 480.f, .1f, 1000.f);
    34         m_camera->SetTarget(vec3(0.f));
     34        m_camera->SetTarget(vec3(0.f, -5.f, 0.f));
    3535        m_camera->SetPosition(vec3(-20.f, 20.f, 0.f));
    3636        Ticker::Ref(m_camera);
Note: See TracChangeset for help on using the changeset viewer.