Viewer:
- added hacky support for pre-shader graphics cards. Seems to work, but I'll not know for sure until I acutally test it on such a crippled hardware. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@174 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -714,6 +714,7 @@ std::string g_szMaterialShader = std::string(
|
||||
|
||||
// and specular including emissive part
|
||||
"float4 specularColor = float4( 0.0f, 0.0f, 0.0f, 1.0f); \n"
|
||||
"#ifdef AV_SPECULAR_COMPONENT\n"
|
||||
"float3 viewDir = normalize( worldPos - vCameraPos); \n"
|
||||
"for( int a = 0; a < 5; a++) \n"
|
||||
"{ \n"
|
||||
@@ -721,6 +722,7 @@ std::string g_szMaterialShader = std::string(
|
||||
" float specIntensity = pow( dot( -reflDir, viewDir), SPECULAR_STRENGTH) * SPECULARITY; \n"
|
||||
" specularColor.rgb += afLightColor[a] * specIntensity; \n"
|
||||
"} \n"
|
||||
"#endif // AV_SPECULAR_COMPONENT\n"
|
||||
// factor in material properties and the emissive part
|
||||
"Out.SpecularColor = specularColor * SPECULAR_COLOR + EMISSIVE_COLOR; \n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user