[3/5] WineD3D: Fix the reflection calculation in texm3x3(v)spec

H. Verbeet hverbeet at gmail.com
Wed Sep 12 15:25:36 CDT 2007


On 12/09/2007, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
>
...so what the patch *actually* does in a completely obfuscated way,
is getting rid of the assumption that the normal is normalized.

IOW,
-    shader_addline(buffer, "tmp0.xyz = reflect(-tmp1.xyz, tmp0.xyz);\n");
+    shader_addline(buffer, "tmp0.xyz = reflect(-tmp1.xyz,
normalize(tmp0.xyz));\n");
would be just as effective.

That also means that the change in the ARB implementation
-    /* Calculate reflection vector (Assume normal is normalized): RF
= 2*(N.E)*N -E */
+    /* Calculate reflection vector (Assume normal is normalized):
+     * See comment in the glsl implementation.
is misleading at best.



More information about the wine-devel mailing list