NightCreature83

Members
  • Content count

    1211
  • Joined

  • Last visited

Community Reputation

5006 Excellent

About NightCreature83

  • Rank
    Crossbones+

Personal Information

  • Interests
    Programming

Recent Profile Visitors

26684 profile views
  1. 3D Question about Font and Text in Direct3D

    You can just z test the stream of characters so turn depth test enabled on for text rendering
  2. NVIDIA Optimus enablement

    They actually have dedicated output paths to HDMI, so in the case of the hybrids they all run the external outputs over the iGPU which adds a frame delay to the frame being rendered. Also there is no 1060m NVidia did away with the mobile lineup and just sticks desktop grade chips in the laptops now (maxwel2 already paved the way for that its why a 970m is so powerful and is actually comparable to a 960 desktop chip). For video and display purpose this doesnt matter that much but for VR it does because the tracking needs to match the frame rendering. This is why its important that if you have a laptop and you want to buy a VR kit you check its VR Ready.
  3. NVIDIA Optimus enablement

    You can see here that the NV chip is not connected to any real outputs and as mentioned earlier the OS fakes all of this stuff for you. I did a dx diag on a desktop PC and the "Device Type" lines dont show up in that log, which to me means all devices in there are Full devices. Besides you dont really want to transport your framebuffer over PCI-E to display each time. If the GPU is used as GPGPU you dont need it to output anything that is true but its also most likely not doing rendering work at that moment in time. My NV 970M GTX says the same thing Render-Only Device, this means that most things work but stuff like VR is impossible. It can render everything but the latency of the VR kit itself is so bad you cant use it.
  4. NVIDIA Optimus enablement

    As Hodgman mentioned earlier in an Optimus setup there are no outputs bound to the dGPU they are all bound to the iGPU, this is also why VR doesnt work on these kinds of cards. And why we are now getting laptops like we had in the past that have direct connections again. Can you list what dxDiag says if it tells you the NV chip is render only it has no output things to enumerate.
  5. C++ Overloading Question

    If you pass primitive types by value to a function const is not needed on that parameter. The code outside wont see any changes you make to the parameter anyway.
  6. NVIDIA Optimus enablement

    In DX11 and upwards you dont need optimus or the amd equivalent to select the graphics device, you can actually detect if the device has dedicated memory assigned to it, if so its a dGPU. When you select your DXGI adapter pass this to the Device construction function and you will always select a dGPU. The following piece of code shows you how to achieve what that article is listing for D3D11, with the exception that it will accept a NVidia or AMD chip as the rendering adapter. IDXGIAdapter* adapter = nullptr; IDXGIFactory * pFactory; HRESULT hr = CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)(&pFactory)); if (hr == S_OK) { for (size_t counter = 0; hr == S_OK; ++counter) { adapter = nullptr; hr = pFactory->EnumAdapters((UINT)counter, &adapter); if (adapter != nullptr) { DXGI_ADAPTER_DESC adapterDesc; adapter->GetDesc(&adapterDesc); if (adapterDesc.VendorId != 0x8086) { break; } } } pFactory->Release(); } Within windows the DX11 adapter selection will respect your choice, the only thing the preferred GPU setting in NV control panel does is list the NV GPU first in the adapter list which works for applications that always choose adapter 0. BTW: VedorId 0x8086 is Intel you can find AMD (0x1002 this is actually ATI) and NV(0x10DE) on google easily
  7. C++ Naming convention on interfaces in C++

    Underscores are evil and should never be used in anything, camelCase for the win. That being said do what you like in your own projects and stick to your own conventions. When working in another project were you are collaborating with other people conform to the convention of that code base or agree on a common convention and stick to that. I have worked in a few code bases that use C and S for classes and structures in the naming but dont use this in the filenames and just use the logical name of the class. Personally I have the C, S I and other sort of Hungarian but not really prefixes, I much rather see sensible names for variables and classes so I can at a glance see what they are supposed to do, or at least give me a clear idea of what they should do. Making code readable and understandable is far more important than sticking to a particular way of casing or pre/post-fixing names or Hungarian coding. Besides a good IDE will actually show you what type something is when you hover over it when you need to know it.
  8. C++ / OpenGL Particle Generator help

    I have used D3D11 for a while now I still use these tools to figure out what goes wrong if something isnt showing up as I expect them to show up. Using tools only makes it easier to find the location where your problem is and thus much easier to solve your issue.
  9. C++ / OpenGL Particle Generator help

    You could try using CodeXL to see if your OpenGL commands are actually handles by the gpu. This should also show you the GPU state and such so that you can see what is actually wrong. Renderdoc is another tool for this but the openGL support for that is not optimal had it been d3d or vullkan you could have used that tool which is really good at debugging graphics and is used in the industry by AAA game companies.
  10. There are also free tools out there written by gamedevs like https://mtuner.net/
  11. Where to create bullets - in Player or in World?

    I would spawn a SpawnBullet/SpawnResource message and have whatever needs to deal with that message pick it up. This way you can stick the control handling in player or player input handling but not have the responsibility of creating a bullet inside the player. Also this message should carry all needed information to spawn that resource in the world.
  12. New job in games is killing my passion

    If you are in a bad situation job wise and its not you but the fit is just so off that stay will do more harm to you personally than going, my advice is leave. I have been in that situation and stuck around worst option ever, my last year at the job was hell to be honest (bad fit, reason I was on the project was kicked off the project all kinds of things that just killed my motivation to go to work), the only option in that case is leave. Verbally accepting an offer is not the same as actually signing the contract you can back out of these things, its not great to do this but you haven't signed anything yet so there is no real legal obligation yet. Also never ever accept an offer if anything feels off, even if its the littlest thing you (the reason why my last job was such a bad fit). The hardest thing to learn when entering the games industry I found is that it's a job at the end of the day. What this means is that you have to make sure for yourself that the job you accept fits with you, you are more important than the company when it gets down to the line for yourself.   In the first year on my first game(DiRT2) I learnt more about writing software and implementing things than I ever did on my own to be honest so keep that in mind too, as mentioned in previous messages
  13. I used pygments to do some parsing with, its fairly straight forward and will tell you what token each word in a script is. Pygments supports a lot of languages, I for example used it to figure out what the arguments and names of public function were in a actionscript 3 class. This took me about 3 hours to write most of that time was not spent on integrating pygments to the script. Pygments is mostly used for langauges highlighters in text editors, it allows you to define the grammar it matches the string against too. You might want to look at abstract syntaxes to understand the meaning of the concepts mentioned in parsing.
  14. HLSL Shader for multiple light source types

    IMHO Deferred shading solves this problem.   You can go much further with tiled deferred and forward+ and clustered forward or deferred shading, these techniques allow 1000s of lights in a scene whilst maintaining shading performance. These techniques create light lists that only shade the geometry that is in the view frustum subdivision the light affects. http://www.humus.name/Articles/PracticalClusteredShading.pdf The choice for forward or deferred matters more on the scenes you are making and whats in it than on how many lights you can have with the above techniques. If you have lots of transparent surfaces that are affected by light forward shading is much simpler to use.
  15. SOA and cache locality

    In your particular case however your access in that loop is not cache friendly because the arrays are stored after each other if declared and created at the same time. Had you looped over all x's then y's and then z's you would have had a cache friendly access. The trick is to layout your data in such a way that when you need to access that data you access all/most of it in the same loop.   Herb has done a talk about the benefit of looping in order through your data and has some slides that show what happens an why. ( https://channel9.msdn.com/Events/Build/2014/2-661 there is more in this talk than just that.) https://view.officeapps.live.com/op/view.aspx?src=http%3a%2f%2fvideo.ch9.ms%2fsessions%2fbuild%2f2014%2f2-661.pptx   Ps: on most PC hardware the cache line size is 64-bytes.