mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
More tweaks to the specular lighting model.
git-svn-id: https://svn.eduke32.com/eduke32@1381 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
396256b6e0
commit
854c72263c
1 changed files with 3 additions and 3 deletions
|
@ -255,7 +255,7 @@ _prprogrambit prprogrambits[PR_BIT_COUNT] = {
|
||||||
"\n",
|
"\n",
|
||||||
// frag_prog
|
// frag_prog
|
||||||
" diffuseTexel = texture2D(diffuseMap, commonTexCoord.st);\n"
|
" diffuseTexel = texture2D(diffuseMap, commonTexCoord.st);\n"
|
||||||
" specTexel = diffuseTexel;\n"
|
" specTexel.rgb = diffuseTexel.rgb * diffuseTexel.a;\n"
|
||||||
" if (isLightingPass == 0)\n"
|
" if (isLightingPass == 0)\n"
|
||||||
" result *= diffuseTexel;\n"
|
" result *= diffuseTexel;\n"
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -487,9 +487,9 @@ _prprogrambit prprogrambits[PR_BIT_COUNT] = {
|
||||||
"\n"
|
"\n"
|
||||||
" R = reflect(-L, N);\n"
|
" R = reflect(-L, N);\n"
|
||||||
"\n"
|
"\n"
|
||||||
" lightDiffuse = diffuseTexel.a * gl_Color.a * shadowResult * lightTexel *\n"
|
" lightDiffuse = gl_Color.a * shadowResult * lightTexel *\n"
|
||||||
" gl_LightSource[0].diffuse.rgb * lightAttenuation * spotAttenuation;\n"
|
" gl_LightSource[0].diffuse.rgb * lightAttenuation * spotAttenuation;\n"
|
||||||
" result += vec4(lightDiffuse * diffuseTexel.rgb * NdotL, 0.0);\n"
|
" result += vec4(lightDiffuse * diffuseTexel.a * diffuseTexel.rgb * NdotL, 0.0);\n"
|
||||||
"\n"
|
"\n"
|
||||||
" lightSpecular = pow( max(dot(R, E), 0.0), specularMaterial.x * specTexel.a) * specularMaterial.y;\n"
|
" lightSpecular = pow( max(dot(R, E), 0.0), specularMaterial.x * specTexel.a) * specularMaterial.y;\n"
|
||||||
" result += vec4(lightDiffuse * specTexel.rgb * lightSpecular, 0.0);\n"
|
" result += vec4(lightDiffuse * specTexel.rgb * lightSpecular, 0.0);\n"
|
||||||
|
|
Loading…
Reference in a new issue