DXGL r287 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r286‎ | r287 | r288 >
Date:02:20, 15 December 2012
Author:admin
Status:new
Tags:
Comment:
Add texture surface color key to shader texture stage ID.
Modified paths:
  • /ddraw/glDirect3DDevice.cpp (modified) (history)
  • /ddraw/shadergen.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirect3DDevice.cpp
@@ -524,7 +524,11 @@
525525 if(texstages[i].textransform & D3DTTFF_PROJECTED) texstages[i].shaderid |= 1i64 << 53;
526526 texstages[i].shaderid |= (__int64)(texstages[i].texcoordindex&7) << 54;
527527 texstages[i].shaderid |= (__int64)((texstages[i].texcoordindex>>16)&3) << 57;
528 - if(texstages[i].texture) texstages[i].shaderid |= 1i64 << 59;
 528+ if(texstages[i].texture)
 529+ {
 530+ texstages[i].shaderid |= 1i64 << 59;
 531+ if(texstages[i].texture->ddsd.dwFlags & DDSD_CKSRCBLT) texstages[i].shaderid |= 1i64 << 60;
 532+ }
529533 }
530534 return shader;
531535 }
Index: ddraw/shadergen.cpp
@@ -93,6 +93,7 @@
9494 00=passthru 01=cameraspacenormal
9595 10=cameraspaceposition 11=cameraspacereflectionvector
9696 Bit 59: Texture image enabled
 97+Bit 60: Texture has color key
9798 */
9899
99100 /**