Changeset 2144
- Timestamp:
- Dec 18, 2012, 3:29:18 PM (10 years ago)
- Location:
- trunk/src/easymesh
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/easymesh/easymesh.cpp
r2143 r2144 119 119 m_gpu.shader->Bind(); 120 120 m_gpu.shader->SetUniform(m_gpu.modelview, modelview); 121 m_gpu.shader->SetUniform(m_gpu.model, model);121 m_gpu.shader->SetUniform(m_gpu.model, Scene::GetDefault()->GetViewMatrix()); 122 122 m_gpu.shader->SetUniform(m_gpu.proj, Scene::GetDefault()->GetProjMatrix()); 123 123 m_gpu.shader->SetUniform(m_gpu.normalmat, normalmat); -
trunk/src/easymesh/shiny.lolfx
r2143 r2144 38 38 39 39 uniform float in_Damage; 40 uniform mat4 in_Model; 40 41 41 42 varying vec4 pass_Eye; … … 46 47 // FIXME: the light direction should be passed in the code 47 48 vec3 in_LightDir = vec3(0.3, 0.3, 0.7); 48 vec 3 in_Light2_Pos = vec3(0.0, 100.0, 0.0);49 vec4 in_Light2_Pos = in_Model * vec4(0.0, 0.0, 0.0, 1.0); 49 50 50 51 void main(void) … … 82 83 83 84 //Light calculation for point light 84 s = normalize(pass_ TPos.xyz - in_Light2_Pos);85 s = normalize(pass_Eye.xyz - in_Light2_Pos.xyz); //(pass_TPos.xyz - in_Light2_Pos); 85 86 v = normalize(-pass_Eye.xyz); 86 87 r = reflect(-s, pass_TNormal);
Note: See TracChangeset
for help on using the changeset viewer.