Optimization of specular calculation in fragment shader
--HG-- extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4027
This commit is contained in:
@@ -109,9 +109,9 @@ void main()
|
||||
#if ENABLE_PER_PIXEL == 1
|
||||
mediump float lamberFactor = max(0.0,dot(lightVec, normal));
|
||||
mediump float specularFactor = 0.0;
|
||||
if(material_shininess > 0.0) {
|
||||
specularFactor = max(0.0,pow(dot(halfVec,normal), material_shininess));
|
||||
}
|
||||
//if(material_shininess > 0.0) {
|
||||
specularFactor = max(0.0,pow(max(dot(halfVec,normal), 0.0), material_shininess));
|
||||
//}
|
||||
#endif
|
||||
|
||||
#if HAS_DIFFUSE_MAP == 1
|
||||
|
||||
Reference in New Issue
Block a user