|
36 | 36 | " vec4 color = texture2D(s_texture, v_texcoord.xy);\n"\ |
37 | 37 | " if(color.r + color.g + color.b + color.a == 0.0f) discard;\n"\ |
38 | 38 | " lighting = vec4(color.rgb * u_ambientColor.rgb * u_ambientColor.a, color.a);\n"\ |
39 | | - " lighting.rgb += u_lightColor.rgb * u_lightColor.a * color.rgb * saturate(1.0 - dot(v_normal, u_lightDir));\n"\ |
| 39 | + " lighting.rgb += u_lightColor.rgb * u_lightColor.a * color.rgb * max(1.0 - dot(v_normal, u_lightDir), 0);\n"\ |
40 | 40 | " fragColor = lighting;\n"\ |
41 | 41 | " }\n" |
42 | 42 |
|
@@ -168,8 +168,8 @@ struct WorldRenderProperties |
168 | 168 |
|
169 | 169 | void SetupLightingProperties(float ambientScale = 1.0f, float lightScale = 1.0f) |
170 | 170 | { |
171 | | - g_worldRenderProperties.ambientColor = ColorRGBA(0.95f, 0.9f, 1.0f, 0.45f) * ambientScale; |
172 | | - g_worldRenderProperties.lightColor = ColorRGBA(1.0f, 1.0f, 1.0f, 0.55f) * lightScale; |
| 171 | + g_worldRenderProperties.ambientColor = ColorRGBA(0.95f, 0.9f, 1.0f, 0.45f * ambientScale) ; |
| 172 | + g_worldRenderProperties.lightColor = ColorRGBA(1.0f, 1.0f, 1.0f, 0.4f * lightScale); |
173 | 173 | g_worldRenderProperties.lightDir = normalize(Vector3D(1, -0.5, 0)); |
174 | 174 | } |
175 | 175 |
|
@@ -299,7 +299,7 @@ void DrawLevelDriver2(const Vector3D& cameraPos) |
299 | 299 | CELL_ITERATOR ci; |
300 | 300 | PACKED_CELL_OBJECT* ppco; |
301 | 301 |
|
302 | | - int i = 441;// *32; |
| 302 | + int i = 441 * 16; |
303 | 303 | int vloop = 0; |
304 | 304 | int hloop = 0; |
305 | 305 | int dir = 0; |
@@ -362,7 +362,7 @@ void DrawLevelDriver2(const Vector3D& cameraPos) |
362 | 362 |
|
363 | 363 | if(model) |
364 | 364 | { |
365 | | - if(model->flags2 == MODEL_FLAG_TREE) |
| 365 | + if(model->shape_flags & SHAPE_FLAG_SMASH_SPRITE) |
366 | 366 | { |
367 | 367 | cellRotationRad = DEG2RAD(g_cameraAngles.y); |
368 | 368 | } |
@@ -511,7 +511,7 @@ void DrawLevelDriver1(const Vector3D& cameraPos) |
511 | 511 |
|
512 | 512 | if (model) |
513 | 513 | { |
514 | | - if (model->flags2 == MODEL_FLAG_TREE) |
| 514 | + if (model->shape_flags & SHAPE_FLAG_SMASH_SPRITE) |
515 | 515 | { |
516 | 516 | cellRotationRad = DEG2RAD(g_cameraAngles.y); |
517 | 517 | } |
|
0 commit comments