Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 12 Apr 2010
Offline Last Active Today, 03:05 PM

#5219341 Direct3D 12 documentation is now public

Posted by nikitablack on Today, 09:32 AM

Hybrid notebook systems should not be currently supported

That's sad. I hope D3D_DRIVER_TYPE_REFERENCE is implemented.

#5216076 [solved] How to debug compute shader with visual studio?

Posted by nikitablack on 12 March 2015 - 09:42 AM



Debugging vertex/pixel shader works fine, but I have a problem with compute shader debug. After pressing Alt+F5 diagnostic starts, but pressing PrintScreen or CaptureFrame button does nothing.




Upd.: didn't notice this in the beginning:

Programmatic capture is especially useful for debugging compute shaders in programs that never call Present



#5214156 How to initialize Texture2DArray?

Posted by nikitablack on 03 March 2015 - 03:52 AM

Update. Everything is much more simple. It turned out that dds format supports several textures in one file. And CreateDDSTextureFromMemory() do all the job. All we need to do is just create dds with texassemble tool (https://directxtex.codeplex.com/wikipage?title=Texassemble) and supply to texture creation function.

#5209966 Clip (mask out) child by parent bounds.

Posted by nikitablack on 11 February 2015 - 03:48 AM

Nevertheless, you could implement this in a shader, just discard the pixels which are not inside the bounding rect of the parent element.


If you have only axis-aligned rectangles you can simply clip them when filling up your vertex buffer.



As I wrote in PS, I have rotating quads. Also quads can have round corners (and maybe holes) so it will be difficult to calculate it analytically. It was my mistake that I wrote about quads. I probably have to write arbitrary geometry. 


For non-rectangular regions, you could use a second texture as a mask and do manual blending (so to speak) in the pixel shader. This can of course be combined with the above approach.



This sounds interesting. Can you give more insights please?

#5209762 Does gpu guaranties order of execution?

Posted by nikitablack on 10 February 2015 - 02:39 AM

Thank you.

#5209056 int attribute interpolation from vertex shader to pixel shader.

Posted by nikitablack on 06 February 2015 - 08:19 AM

Oh, thank you. No, there's no errors/warnings even if I specify interpolation (linear) explicitly.

#5208656 How to read and write to texture in place in pixel shader?

Posted by nikitablack on 04 February 2015 - 10:48 AM

Oops, the problem was in this line:

context->OMSetRenderTargetsAndUnorderedAccessViews(D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL, NULL, NULL, 1, 1, uavStencilView.GetAddressOf(), 0);

And very confusiong documentation (https://msdn.microsoft.com/en-us/library/windows/desktop/ff476465%28v=vs.85%29.aspx):


RTVs, DSV, and UAVs cannot be set independently; they all need to be set at the same time.






In this situation, OMSetRenderTargetsAndUnorderedAccessViews binds only UAVs.



In my case using D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL doesn't work. Specifying render target and depth/stencil buffer do the job. It would be cool to hear why this works so.

#5194409 Creating a game launcher.

Posted by nikitablack on 24 November 2014 - 08:02 AM

Greetings dear community.


Although my question is not 100% game related, I didn't find the better place to put my topic.


I need to create a launcher for our game. This will be online game and I need a way to easily update it. Also launcher itself should be easily updateable. I mostly interested in high level architecture, i.e. how thing works at all. Our game will be cross platform, but for now I'm trying to do it for Windows (Win7). There's very little info in the web, so I don't know what is the "industry standard". I investigated how major launcher/programs work, and here's a quick description:


1. Launching Battle.net launches 2 exes - Battle.net.exe and Agent.exe. I suppose that Battle.net.exe is user interface exe and Agent.exe always runs in background. This Agent.exe can be found in C:\ProgramData\Battle.net\Agent\... folder. But what is this Agent.exe for? Why it's in ProgramData folder? Who starts who - agent starts launcher or other way? What I like about Blizzard's work - I don't have any system dialogs while run a program, like dialog asking to run as administrator.


2. Steam is seems only one process in task manager. When it's time to update, who updates exe? As far as I know the program can't update itself (at least on windows - you can't replace running exe).


Thank you.

#5190366 How back buffer fills a window?

Posted by nikitablack on 31 October 2014 - 08:05 AM

Thank you, Buckeye. Now it's clear.

#5186647 Antialiasing artifacts with render targets (or something else)

Posted by nikitablack on 13 October 2014 - 02:20 AM

Thank you everyone,

I didn't post my shader because I don't want to scare people - stage3d shaders are assembler like code. I double checked it and it seems correct - I even don't have divisions. And the main thing - without antialiasing I don't have artifacts. So MJP's answer is the explanation I searched for. Unfortunatelly, stage3d doesn't allow to setup sampling or anything like that.


@bwhiiting, for render target AA levels are 0, 1, 2, 3, 4.


@baldurk, I have wrong results in fragment shader. For example in vertex shader I have a varing (vi0) and I can see it's value, but in fragment shader I suddenly have vi1 (not vi0) value filled with zeroes only. So I can't step through the code and check intermediate results (and output color actually is wrong too, although on the screen it's ok). But as you say it can be problem with render target - flash internally draws to some texture and internally draws it to back buffer in the end. And I tried to turn on every option.


Upd.: I checked on different machine and I can't see this artifacts, so I assume that this is my hardware's fault.

#5117771 Are GPU constants really constants?

Posted by nikitablack on 18 December 2013 - 02:14 AM

Hello everyone! Recently I was told that some GPUs (mobile mostly) doesn't keep constants between render calls. They doesn't have constant's memory. So you can't set constants only once and use this all the time. Is that true? Never heard that before.

#4985728 Smooth interpolation between two matrices

Posted by nikitablack on 01 October 2012 - 06:16 AM

Yes, but it's a pointless exhaustion of system resources. In 2D interpolation is simple
startAng + (endAng - strtAng) * t
so you can't persuade me to use quaternions :).

BTW I solve a problem. Flash uses it's own skew matrix. I found an algorithm. Flawless victory.

#4964734 Use SAT to "unpenetrate" objects but limit direction of minimum trans...

Posted by nikitablack on 31 July 2012 - 12:36 AM

You can use swept SAT. It's exactly your case:

#4831671 SAT MTV

Posted by nikitablack on 06 July 2011 - 01:28 AM

What is MTV (tv chanel?? 0_o) - I know it's called MTD - Minimum Translational Distance.
Where are your axes look - inside object or from it? If inside - then first retur in GetOverlap is correct, but second should be proj1.Minimum - proj2.Maximum - i.e. negative, or you can negate axis and leave condition as is.