2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 19:07:44 +00:00

Update hecl, implement CScriptPickup

This commit is contained in:
2017-10-14 22:44:07 -07:00
parent 651d0a27c2
commit 5941a61ae6
7 changed files with 102 additions and 20 deletions

View File

@@ -83,16 +83,16 @@ static const char* LightingShadowGLSL =
"{\n"
" vec4 ret = ambient;\n"
" \n"
" vec3 delta = mvPosIn.xyz - lights[i].pos.xyz;\n"
" vec3 delta = mvPosIn.xyz - lights[0].pos.xyz;\n"
" float dist = length(delta);\n"
" float angDot = clamp(dot(normalize(delta), lights[i].dir.xyz), 0.0, 1.0);\n"
" float att = 1.0 / (lights[i].linAtt[2] * dist * dist +\n"
" lights[i].linAtt[1] * dist +\n"
" lights[i].linAtt[0]);\n"
" float angAtt = lights[i].angAtt[2] * angDot * angDot +\n"
" lights[i].angAtt[1] * angDot +\n"
" lights[i].angAtt[0];\n"
" ret += lights[i].color * clamp(angAtt, 0.0, 1.0) * att * clamp(dot(normalize(-delta), mvNormIn.xyz), 0.0, 1.0) *\n"
" float angDot = clamp(dot(normalize(delta), lights[0].dir.xyz), 0.0, 1.0);\n"
" float att = 1.0 / (lights[0].linAtt[2] * dist * dist +\n"
" lights[0].linAtt[1] * dist +\n"
" lights[0].linAtt[0]);\n"
" float angAtt = lights[0].angAtt[2] * angDot * angDot +\n"
" lights[0].angAtt[1] * angDot +\n"
" lights[0].angAtt[0];\n"
" ret += lights[0].color * clamp(angAtt, 0.0, 1.0) * att * clamp(dot(normalize(-delta), mvNormIn.xyz), 0.0, 1.0) *\n"
" texture(extTex0, vtf.extTcgs[0]).r;\n"
" \n"
" for (int i=1 ; i<" _XSTR(URDE_MAX_LIGHTS) " ; ++i)\n"