Merge pull request #7491 from thedax/ge-environmentmap-ded9

Update GE_TEXMAP_ENVIRONMENT_MAP in Direct3D9 so it matches OpenGL's behaviour
This commit is contained in:
Henrik Rydgård 2015-02-17 09:35:47 +01:00
commit 1d7b0ae4a8

View File

@ -571,7 +571,7 @@ void GenerateVertexShaderDX9(int prim, char *buffer, bool useHWTransform) {
break;
case GE_TEXMAP_ENVIRONMENT_MAP: // Shade mapping - use dots from light sources.
WRITE(p, " Out.v_texcoord.xy = u_uvscaleoffset.xy * float2(1.0 + dot(normalize(u_lightpos%i), worldnormal), 1.0 - dot(normalize(u_lightpos%i), worldnormal)) * 0.5;\n", gstate.getUVLS0(), gstate.getUVLS1());
WRITE(p, " Out.v_texcoord.xy = u_uvscaleoffset.xy * float2(1.0 + dot(normalize(u_lightpos%i), worldnormal), 1.0 + dot(normalize(u_lightpos%i), worldnormal)) * 0.5;\n", gstate.getUVLS0(), gstate.getUVLS1());
break;
default: