Comments (3)
As I thought, simply removing the swizzle caused issues with True Crime New York City. However I forgot that you can use a rear modifier with a swizzle as long as the swizzle comes last. So it should look like this:
d3d8to9 output :
mov r0.xyz, c0 /* added line */
dp3 r0.xyz, r0_bx2.xyz /* changed c0 to r0.xyz */, t0_bx2
Try with this file and see if it works.
BTW: here is the check-in if you want to test with the source code instead.
from d3d8to9.
The issue is with this line and this line. I purposely kept the swizzle to try and preserve the original pixel shader functionality. Removing the swizzle has a possibility of changing the final register value, which could cause an issue.
It is pretty easy to remove the swizzle here, but I would need to test many games to ensure that it does not cause any issues. It might be better if I remove the swizzle only in the case where there is a rear modifier, like _bx2
or _bias
. However that would require duplicating those lines, which I really don't want to do.
Note: you cannot have both a rear modifier and a swizzle.
from d3d8to9.
This still fails to compile - I had to change the input shader to use an intermediate register to avoid the swizzle;
This problematic input :
dp3 r0.rgb, c0_bx2, t0_bx2
Gets converted to this, which doesn't work :
mov r0.xyz, c0 /* added line */ dp3 r0.xyz, r0_bx2.xyz /* changed c0 to r0.xyz */, t0_bx2
The error is still:
> Failed to reassemble shader : error X5027 : Invalid src swizzle for first source param.
But when I use this (manually altered) input :
mov r0.rgb, c0 dp3 r0.rgb, r0_bx2, t0_bx2
... d3d8to9 doesn't even need to replace anything for this, as, the result is :
mov r0.xyz, c0 dp3 r0.xyz, r0_bx2, t0_bx2
... which works as intended.
PS: The DirectX 8 doc states that source register modifiers shouldn't be used on constants (because it will cause undefined results), which can be interpreted as : "it may be done, but it's just not advised". So, it's just bad luck I've encountered such a shader here.
from d3d8to9.
Related Issues (20)
- How to use d3d8to9 with Gentool ? HOT 5
- Dear Crosire!Please help with Correcting/Remove night pixelshader effect of Operation Flashpoint 1.96 HOT 53
- Mafia The City Lost Heaven HOT 2
- [Crash] Pro Evolution Soccer 3 HOT 2
- Max Payne - WS Fix not working HOT 3
- .
- Consider collaborating with the d8vk project? HOT 1
- Consider recommending D3DX from NuGet instead of an old DirectX SDK HOT 3
- Ballistics (2001) - Junk polygons in menus
- C:\Microsoft\Cpp\Default\props not found HOT 1
- Rome Total War - Campaign Map Texture Issue HOT 6
- D3D8.1 Pixel and Vertex Shader Lifetimes Seem To Be Incorrect HOT 1
- Problems with character models. Pangya
- Latest update crashes Silent Hill 2 in SetVertexShader() HOT 4
- v1.11.1 - Max Payne - Loading Screen Errors / Missing Sounds
- Fellowship of the Ring black screen on startup/uncapped frame rate HOT 1
- uhh
- NVCP multi sampling anti-aliasing doesn't work. I tried everything. Metin2 is the game. HOT 1
- [Suggestion] The Bard's Tale (2005) - Solve the slowness of some parts... HOT 1
- Fixing 3dwinxp screensaver working experience
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3d8to9.