Fixes grass with normal and specular textures.
Tested By: Langbart, marder, wowgetoffyourcellphone Differential Revision: https://code.wildfiregames.com/D4968 This was SVN commit r27575.
This commit is contained in:
1 parent
05c77b1819
commit
4fbe948be7
3 files changed
+4
-2
No files matched your search
@@ -10,4 +10,6 @@
|
||||
<required_texture name="specTex" define="USE_SPECULAR_MAP"/>
|
||||
<shader effect="model_transparent"/>
|
||||
<uniform name="windData" value="6.0 6.0"/>
|
||||
<!-- TODO: use a separate material for translucent models. -->
|
||||
<uniform name="effectSettings" value="0.0 50.0 0.0075"/>
|
||||
</material>
|
||||
@@ -104,7 +104,7 @@ void main()
|
||||
specCol = specularColor;
|
||||
specPow = specularPower;
|
||||
#endif
|
||||
specular.rgb = sunColor * specCol * pow(max(0.0, dot(normalize(normal), v_half)), specPow);
|
||||
specular.rgb = sunColor * specCol * pow(max(0.001, dot(normalize(normal), v_half)), specPow);
|
||||
#endif
|
||||
|
||||
#if (USE_INSTANCING || USE_GPU_SKINNING) && USE_AO
|
||||
|
||||
@@ -114,7 +114,7 @@ void main()
|
||||
specCol = s.rgb;
|
||||
specular.a = s.a;
|
||||
specPow = effectSettings.y;
|
||||
specular.rgb = sunColor * specCol * pow(max(0.0, dot(normalize(normal), v_half)), specPow);
|
||||
specular.rgb = sunColor * specCol * pow(max(0.001, dot(normalize(normal), v_half)), specPow);
|
||||
#endif
|
||||
|
||||
vec3 color = (texdiffuse * sundiffuse + specular.rgb) * getShadowOnLandscape() + texdiffuse * ambient;
|
||||
|
||||
Reference in new issue
Block a user