Giter Club home page Giter Club logo

Comments (9)

DarkStarSword avatar DarkStarSword commented on July 17, 2024

Instead of drawindexed = auto, try draw = from_caller. The former is really only intended to be used when you have injected a custom index buffer and want the entire index buffer to be used, while the later is intended to be used with whatever buffers, offsets and draw call variant the game is already using.

And yes, I think the approach you are using to differentiate between textures makes sense. You might also see if enabling track_texture_updates=1 in the d3dx.ini allows you to differentiate between those textures by hash, but there are some significant performance impacts associated with that option so if you have a method that works well without it I'd probably stick to that.

I don't think it's quite relevant to your case, but you also might be interested in how I differentiated between different icons in Far Cry 4 - in that case it was using a texture atlas so all icons were on the same texture, and I needed to use the texture coordinates to differentiate between them, but there were too many to hard code the coordinates - so I dumped a copy of the atlas and painted over the icons in different colours that the shader could use to determine what to do with them:
https://github.com/DarkStarSword/3d-fixes/blob/master/Far%20Cry%204/ShaderFixes/b5c2f686-icon-filter.png
https://github.com/DarkStarSword/3d-fixes/blob/master/Far%20Cry%204/ShaderFixes/82efdcb5-icon-filter.png
https://github.com/DarkStarSword/3d-fixes/blob/master/Far%20Cry%204/ShaderFixes/50344260ea3c9a9c-vs_replace.txt#L129
https://github.com/DarkStarSword/3d-fixes/blob/master/Far%20Cry%204/d3dx.ini#L796

from 3dmigoto.

Chimi-moryo avatar Chimi-moryo commented on July 17, 2024

Thanks @DarkStarSword. I see what you did with the "art paiting" job on the initial map texture ^^. I can't interpolate this to my subject but i see the connection.
The part with :

if (all(abs(colour - float4(0, 1, 0, 1)) <= 1/512)) return 1; if (all(abs(colour - float4(0, 0, 1, 1)) <= 1/512)) return 2; if (all(abs(colour - float4(1, 0, 1, 1)) <= 1/512)) return 5;

Could be usefull to add an epsilon to the calculation.

Just to be sure, can you confirm that the shader file "xxx.txt" must be placed in the ShaderFixes folder ?
I'm gonna try your suggestion and see what can i do to optimize this.

Regards,

from 3dmigoto.

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.