Changeset 1263
- Timestamp:
- Apr 21, 2012, 9:45:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/orbital/mesh.h
r1262 r1263 19 19 { 20 20 m_vert_cursor = m_vert.Count(); 21 ComputeQuadNormals(m_quadidx_cursor, 22 m_quadidx.Count() - m_quadidx_cursor); 21 23 m_quadidx_cursor = m_quadidx.Count(); 24 ComputeTriNormals(m_triidx_cursor, 25 m_triidx.Count() - m_triidx_cursor); 22 26 m_triidx_cursor = m_triidx.Count(); 23 27 } … … 64 68 " out float4 out_Position : POSITION," 65 69 " out float4 pass_Color : COLOR) {" 66 " float4 x4 Light = float4x4(10.0, 1.0, 1.0, 1.0);"67 " float3 x3 Kd = float3x3(1.0, 0.8, 0.8);"68 " float3 x3 Ld = float3x3(1.0, 0.8, 0.8);"69 "" 70 " float3 x3tnorm = normalize(mul(in_NormalMat, in_Normal));"71 " float4 x4 Eye = mul(in_ModelView, float4x4(in_Vertex, 1.0));"72 " float3 x3s = normalize((Light - Eye).xyz);"73 "" 74 " pass_Color = float4 x4(Ld * Kd * max(dot(s, tnorm), 0.0), 1.0);"70 " float4 Light = float4(10.0, 1.0, 1.0, 1.0);" 71 " float3 Kd = float3(1.0, 0.8, 0.8);" 72 " float3 Ld = float3(1.0, 0.8, 0.8);" 73 "" 74 " float3 tnorm = normalize(mul(in_NormalMat, in_Normal));" 75 " float4 Eye = mul(in_ModelView, float4(in_Vertex, 1.0));" 76 " float3 s = normalize((Light - Eye).xyz);" 77 "" 78 " pass_Color = float4(Ld * Kd * max(dot(s, tnorm), 0.0), 1.0);" 75 79 " out_Position = mul(in_Proj, Eye);" 76 80 "}",
Note: See TracChangeset
for help on using the changeset viewer.