Coder Social home page Coder Social logo

Comments (7)

CookiePLMonster avatar CookiePLMonster commented on May 28, 2024

Have you tried comparing pix frames from this wrapper and the one from Boris/ENBSeries? While those are useless for anyone but you (frames can't be viewed from a PC with a different driver/GPU model), maybe you'll spot something obvious in the render states (or texture sampler settings) for 47's draw call.

from d3d8to9.

elishacloud avatar elishacloud commented on May 28, 2024

Thanks for the suggestion! However I an new to DirectX programming (and C/C++ programming for that matter). I am not sure how to compare pix frames. I don't have the source code for the Boris/ENBSeries converter.

from d3d8to9.

CookiePLMonster avatar CookiePLMonster commented on May 28, 2024

You'd need to use it to capture frames from ingame and then most likely compare render states during the draw call - no need for the source.

from d3d8to9.

elishacloud avatar elishacloud commented on May 28, 2024

Ok, I started looking at this in PIX for Windows using this guide here. So far I have found three differences between d3d8to9 and the Boris/ENBSeries converter.

  1. In the SetVertexShader function it seems that the Boris/ENBSeries converter calls SetFVF and SetVertexDeclaration before it calls SetVertexShader. Whereas d3d8to9 calls them in reverse order.

  2. In the SetRenderTarget function the Boris/ENBSeries converter does not call Release and only calls AddRef once. Whereas d3d8to9 calls Release and calls AddRef more than once.

  3. In the frame I captured the Boris/ENBSeries converter called GetRenderTarget as the very first call and then GetDepthStencilSurface as the third call, whereas these calls were completely missing from d3d8to9.

The first two items were easy to change. However for the third item, it seems like d3d8to9 is missing a call to GetRenderTarget and GetDepthStencilSurface. But I am not sure how to add these calls.

I did take a quick look at the GetRenderTarget and GetDepthStencilSurface functions in d3d8to9 and I noticed that neither of these call out to their D3D9 equivalent. When I manually added the GetRenderTarget and GetDepthStencilSurface functions then the calls for d3d8to9 and Boris/ENBSeries converter were exactly the same. However this did not solve the issue. Probably because when I called GetRenderTarget and GetDepthStencilSurface I just threw away their return results.

Anyways I think the problem is in here somewhere, but I am not quite sure how to fix it. Is it possible that there are multiple render targets in this game and d3d8to9 can only handle one?

from d3d8to9.

CookiePLMonster avatar CookiePLMonster commented on May 28, 2024

This doesn't seem to be the case. GetRenderTarget and GetDepthStencilSurface don't call their d3d9 equivalents because the emulated device seems to cache those by itself.

Looks like d3d8 can't handle multiple render targets either (notice the absence of Index parameter in d3d8's GetRenderTarget). The issue is puzzling.

from d3d8to9.

elishacloud avatar elishacloud commented on May 28, 2024

This is the same issue as described in Indiana Jones And The Emporer's Tomb missing textures issue. The solution can be found in the comment here.

from d3d8to9.

elishacloud avatar elishacloud commented on May 28, 2024

Fixed with pull #27. Closing.

from d3d8to9.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.