Browse Source

fixed 4 files out of 2376:

- removed 7 CR characters
 - removed 5 trailing whitespaces
 - replaced 24 tabs with spaces
legacy
Lolbot lolbot 11 years ago
parent
commit
3661a929e6
3 changed files with 16 additions and 16 deletions
  1. +1
    -1
      src/easymesh/easymesh.cpp
  2. +14
    -14
      src/easymesh/shiny_SK.lolfx
  3. +1
    -1
      test/shinyfur.lolfx

+ 1
- 1
src/easymesh/easymesh.cpp View File

@@ -648,7 +648,7 @@ void EasyMesh::ComputeTexCoord(float uv_scale, int uv_offset)
#if VERTEX_USEAGE == VU_TEX_UV #if VERTEX_USEAGE == VU_TEX_UV
VertexDictionnary vert_dict; VertexDictionnary vert_dict;
Array<int> tri_list; Array<int> tri_list;
tri_list.Reserve(m_indices.Count() - m_cursors.Last().m2); tri_list.Reserve(m_indices.Count() - m_cursors.Last().m2);
for (int i = m_cursors.Last().m2; i < m_indices.Count(); i++) for (int i = m_cursors.Last().m2; i < m_indices.Count(); i++)
{ {


+ 14
- 14
src/easymesh/shiny_SK.lolfx View File

@@ -107,23 +107,23 @@ void main(void)
//Light calculation for cube light //Light calculation for cube light
//const float cos_45 = 0.70710678118; //const float cos_45 = 0.70710678118;
//const float inv_cos_45 = 0.29289321881; //const float inv_cos_45 = 0.29289321881;
vec3 local_vertex = (in_Inv_View * pass_Vertex).xyz - (in_Light3_Pos).xyz;
vec3 proj_vertex = clamp(local_vertex.xyz, -in_Light3_Size_Inner, in_Light3_Size_Inner);
vec3 proj_local_dir = local_vertex - proj_vertex;
vec3 local_vertex = (in_Inv_View * pass_Vertex).xyz - (in_Light3_Pos).xyz;
vec3 proj_vertex = clamp(local_vertex.xyz, -in_Light3_Size_Inner, in_Light3_Size_Inner);
vec3 proj_local_dir = local_vertex - proj_vertex;
vec3 inner_dir = proj_vertex / in_Light3_Size_Inner; vec3 inner_dir = proj_vertex / in_Light3_Size_Inner;
inner_dir.x = (inner_dir.x == 1.0)?(1.0):(0.0); inner_dir.x = (inner_dir.x == 1.0)?(1.0):(0.0);
inner_dir.y = (inner_dir.y == 1.0)?(1.0):(0.0); inner_dir.y = (inner_dir.y == 1.0)?(1.0):(0.0);
inner_dir.z = (inner_dir.z == 1.0)?(1.0):(0.0); inner_dir.z = (inner_dir.z == 1.0)?(1.0):(0.0);


//inside the cube //inside the cube
if (length(proj_local_dir) == 0.0)
if (length(proj_local_dir) == 0.0)
{ {
sdotn = 1.0;
sdotn = 1.0;
light_radius_mod = 1.0; light_radius_mod = 1.0;
} }
//spec calculation //spec calculation
else
{
else
{
//Distance calculation //Distance calculation
vec3 proj_local_light = proj_local_dir / in_Light3_Size_Outer; vec3 proj_local_light = proj_local_dir / in_Light3_Size_Outer;
light_radius_mod = max(0.0, 1.0 - length(proj_local_light)); light_radius_mod = max(0.0, 1.0 - length(proj_local_light));
@@ -138,14 +138,14 @@ void main(void)
// //vec3 proj_local_light = max(vec3(0.0,0.0,0.0), vec3(1.0,1.0,1.0) - abs(proj_local_dir / in_Light3_Size_Outer)); // //vec3 proj_local_light = max(vec3(0.0,0.0,0.0), vec3(1.0,1.0,1.0) - abs(proj_local_dir / in_Light3_Size_Outer));
//} //}
/* /*
proj_local_dir = normalize((in_View * vec4(proj_vertex + in_Light3_Pos.xyz,1.0)).xyz - pass_Vertex.xyz);
sdotn = max(dot(proj_local_dir, pass_TNormal), 0.0);
r = reflect(-proj_local_dir, pass_TNormal);
if (sdotn > 0.0 && light_radius_mod > 0.0)
specular += specular_color * min(specular_reflect, light_radius_mod)
* pow(max(dot(r, v), 0.0), specular_power);
proj_local_dir = normalize((in_View * vec4(proj_vertex + in_Light3_Pos.xyz,1.0)).xyz - pass_Vertex.xyz);
sdotn = max(dot(proj_local_dir, pass_TNormal), 0.0);
r = reflect(-proj_local_dir, pass_TNormal);
if (sdotn > 0.0 && light_radius_mod > 0.0)
specular += specular_color * min(specular_reflect, light_radius_mod)
* pow(max(dot(r, v), 0.0), specular_power);
*/ */
}
}
//diffuse calculation //diffuse calculation
diffuse += in_Light3_diffuse * sdotn; //min(sdotn, light_radius_mod); diffuse += in_Light3_diffuse * sdotn; //min(sdotn, light_radius_mod);
//---------- //----------


+ 1
- 1
test/shinyfur.lolfx View File

@@ -105,7 +105,7 @@ void main(void)
float mod = 2.0; float mod = 2.0;
float transp = dam_perc; float transp = dam_perc;
/* /*
abs(sin(world_vertex.x * mod) * dam_perc * 0.5 + 0.5) *
abs(sin(world_vertex.x * mod) * dam_perc * 0.5 + 0.5) *
abs(sin(world_vertex.y * mod) * dam_perc * 0.5 + 0.5) * abs(sin(world_vertex.y * mod) * dam_perc * 0.5 + 0.5) *
abs(sin(world_vertex.z * mod) * dam_perc * 0.5 + 0.5) abs(sin(world_vertex.z * mod) * dam_perc * 0.5 + 0.5)
*/ */


Loading…
Cancel
Save