Add specular intensity for PBR
This commit is contained in:
parent
304b00fe49
commit
f78dc7e9de
Binary file not shown.
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user