forked from mirror/openmw-tes3mp
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;
|
float depthPassthrough = objSpacePositionPassthrough.w;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
shOutputColour(0) = shSample(diffuseMap, UV.xy);
|
float4 diffuse = shSample(diffuseMap, UV.xy);
|
||||||
|
shOutputColour(0) = diffuse;
|
||||||
|
|
||||||
#if DETAIL_MAP
|
#if DETAIL_MAP
|
||||||
#if @shPropertyString(detailMapUVSet)
|
#if @shPropertyString(detailMapUVSet)
|
||||||
|
@ -483,7 +484,7 @@
|
||||||
float3 halfVec = normalize (light0Dir + eyeDir);
|
float3 halfVec = normalize (light0Dir + eyeDir);
|
||||||
|
|
||||||
float3 specular = pow(max(dot(normal, halfVec), 0), matShininess) * lightSpec0 * matSpec;
|
float3 specular = pow(max(dot(normal, halfVec), 0), matShininess) * lightSpec0 * matSpec;
|
||||||
shOutputColour(0).xyz += specular * shadow;
|
shOutputColour(0).xyz += specular * shadow * diffuse.a;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FOG
|
#if FOG
|
||||||
|
|
Loading…
Reference in a new issue