Changeset 1589
- Timestamp:
- Jul 8, 2012, 12:25:49 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/easymesh/shiny.lolfx
r1510 r1589 6 6 attribute vec3 in_Normal; 7 7 attribute vec4 in_Color; 8 8 9 uniform mat4 in_ModelView; 9 10 uniform mat4 in_Proj; 10 11 uniform mat3 in_NormalMat; 12 uniform vec3 in_LightDir = vec3(0.3, 0.3, 0.7); 11 13 uniform float in_Damage; 14 12 15 varying vec4 pass_Color; 13 16 … … 20 23 /* World properties */ 21 24 float ambient_mul = 0.5; 22 vec3 light_dir = normalize(vec3(0.3, 0.3, 0.7));23 25 vec3 ambient_color = vec3(0.25, 0.2, 0.35); 24 26 vec3 diffuse_color = vec3(1.0, 1.0, 0.6); … … 28 30 vec4 eye = in_ModelView * vec4(in_Vertex, 1.0); 29 31 30 vec3 s = light_dir; /* normalize(eye - lightpos); */32 vec3 s = in_LightDir; /* normalize(eye - lightpos); */ 31 33 vec3 v = normalize(-eye.xyz); 32 34 vec3 r = reflect(-s, tnorm); … … 65 67 uniform float4x4 in_Proj, 66 68 uniform float3x3 in_NormalMat, 69 uniform vec3 in_LightDir = normalize(float3(0.3, 0.3, 0.7)) 67 70 uniform float in_Damage, 68 71 out float4 out_Position : POSITION, … … 72 75 float specular_power = 60.0; 73 76 float ambient_mul = 0.5; 74 float3 light_dir = normalize(float3(0.3, 0.3, 0.7));75 77 float3 ambient_color = float3(0.25, 0.2, 0.35); 76 78 float3 diffuse_color = float3(1.0, 1.0, 0.6); … … 78 80 float3 tnorm = normalize(mul(in_NormalMat, in_Normal)); 79 81 float4 eye = mul(in_ModelView, float4(in_Vertex, 1.0)); 80 float3 s = light_dir;82 float3 s = in_LightDir; 81 83 float3 v = normalize(-eye.xyz); 82 84 float3 r = reflect(-s, tnorm);
Note: See TracChangeset
for help on using the changeset viewer.