1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Add specular intensity for PBR

This commit is contained in:
KillzXGaming 2019-05-16 16:45:39 -04:00
parent 304b00fe49
commit f78dc7e9de
4 changed files with 4 additions and 3 deletions

Binary file not shown.

View File

@ -158,7 +158,7 @@ void main()
normal = mat3(SingleBoneBindTransform) * vNormal.xyz * 1;
}
normal = normalize(mat3(mtxMdl) * normal.xyz);
normal = mat3(mtxMdl) * normal.xyz;
gl_Position =position;

View File

@ -265,7 +265,7 @@ void main()
lightMapIntensity = texture(BakeLightMap, f_texcoord1).a;
}
float specIntensity = 1;
float specIntensity = 0;
if (HasMRA == 1) //Kirby Star Allies PBR map
{
@ -324,7 +324,7 @@ void main()
vec2 envBRDF = texture(brdfLUT, vec2(max(dot(N, V), 0.0), roughness)).rg;
vec3 brdfTerm = (kS * envBRDF.x + envBRDF.y);
vec3 specularTerm = specularIblColor * (kS * brdfTerm.x + brdfTerm.y) * specIntensity;
vec3 specularTerm = specularIblColor * (kS * brdfTerm.x + brdfTerm.y) + specIntensity;
// Add render passes.

View File

@ -74,6 +74,7 @@ void main()
normal = mat3(bones[index.x]) * vNormal.xyz * 1;
}
normal = normalize(mat3(mtxMdl) * normal.xyz);
gl_Position = mtxCam * mtxMdl * vec4(objPos.xyz, 1.0);
mat3 normalMatrix = mat3(transpose(inverse(camMtx * mtxMdl)));