mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 20:39:42 +00:00
Add specular mapping (uses alpha channel of diffuse texture)
This commit is contained in:
parent
147bc447a5
commit
5f1878eb54
1 changed files with 3 additions and 2 deletions
|
@ -350,7 +350,8 @@
|
|||
float depthPassthrough = objSpacePositionPassthrough.w;
|
||||
#endif
|
||||
|
||||
shOutputColour(0) = shSample(diffuseMap, UV.xy);
|
||||
float4 diffuse = shSample(diffuseMap, UV.xy);
|
||||
shOutputColour(0) = diffuse;
|
||||
|
||||
#if DETAIL_MAP
|
||||
#if @shPropertyString(detailMapUVSet)
|
||||
|
@ -483,7 +484,7 @@
|
|||
float3 halfVec = normalize (light0Dir + eyeDir);
|
||||
|
||||
float3 specular = pow(max(dot(normal, halfVec), 0), matShininess) * lightSpec0 * matSpec;
|
||||
shOutputColour(0).xyz += specular * shadow;
|
||||
shOutputColour(0).xyz += specular * shadow * diffuse.a;
|
||||
#endif
|
||||
|
||||
#if FOG
|
||||
|
|
Loading…
Reference in a new issue