Jump to content
  • Advertisement

turanszkij

Member
  • Content count

    197
  • Joined

  • Last visited

Community Reputation

456 Neutral

4 Followers

About turanszkij

  • Rank
    Member

Personal Information

Social

  • Twitter
    turanszkij
  • Github
    turanszkij

Recent Profile Visitors

6190 profile views
  1. I am not sure what you are asking. You can either skip threads in a compute shader by: Not calling Dispatch, or calling it with 0 for any dimension of the thread groups return; statement in the shader For computing only visible surfaces, that is not a general question that can be solved trivially. It is you, your logic what ensures what you compute. Also, indirect dispatch can be utilized when you want to remain entirely on the GPU, and when the CPU doesn't know how many thread groups need to be dispatched. It works by having a previous shader write a dispatch argument buffer, containing thread group count values (three uints) and providing that buffer to DispatchIndirect API call.
  2. Nice story, something that I can very much relate to. I started coding a 2D fighting game back in 2012 and at the same time learning DX11 and the C++ language. The 2D sprite based fighting game idea soon evolved to 3D fighting game, with custom scripting language, fancy rendering techniques and physics simulation that it didn't really need. Around 2015-ish I completely scrapped the fighting game, stripped away the engine, refactored and open sourced the thing. I am still developing it under the name "Wicked Engine" and it now has an editor and multiple graphics APIs and also lua scripting. I am mainly using it to prototype whatever rendering technique I am interested in at the moment. Also, my portfolio heavily depended on it as I had no university degree. But bottom line is that I feel it was definitely worth the effort and I could easily get a job in the gamedev industry thanks to this. So keep going and do it because you enjoy it, that's my advice!
  3. turanszkij

    What goes into a "Transform" structure in C/C++?

    The Transform class is usually responsible to track orientation of objects in the world and resolving parent-child spatial relationship between them. It can be implemented in a number of different ways. In my implementation I am storing: Array of children transform pointers parent transform pointer parent inverse "rest" matrix : used to resolve parent-child relationship. It contains parent's inverse world matrix, at the time it was attached to the parent "rest" translation, rotation, scale, worldmatrix : the original, unparented orientation current translation, rotation, scale, worldmatrix : the calculated orientation after resolving parent information previous translation, rotation, scale, worldmatrix : for generating velocity buffer (optional) My memory is a bit hazy about this, because it was so long I did this, it can probably be simplified, optimized. I suggest you put in the time to implement this so that you can use it for anything general, even 2D GUI system.
  4. I think you are confused, when to apply gamma correction. Usually it is done by: When rendering albedo, you perform Un-gamma operation so that you are rendering in linear color space When rendering the lights, you do nothing, which means you render them in linear color space. After your lighting is complete, perform post-process gamma resolve to come back to gamma color space again Output to screen
  5. turanszkij

    Decals in tiled forward render (Forward+)

    Hi, decals are OBB because they are NOT flat! Decals can affect curved surfaces, and an OBB can encompass an arbitrary surface. OBB is chosen for simplicity, but ideally, an arbitrary convex mesh could be used. Decals in Forward+ are very much like decals in deferred, so the decal OBB is drawn in screen space like light proxies in deferred. The difference is, that in Forward+ we do not do this as rendering geometry, but looking up the decals from the tile list, and do the projective texturing in the scene object rendering pixel shaders. So the data to store for each decal would be: texture (in texture atlas/texture array) projection matrix (inverse world space transform)
  6. turanszkij

    Papers for data structures in hlsl without CUDA

    HLSL is not a great fit for general purpose solutions for such containers. But if you are looking for a specific technique, then it has great tools to implement a custom fit solution. Lists can be efficiently created using atomics and wave intrinsics, and I also heard of octrees being implemented. Maybe ask if you have anything specific in mind and more people could help?
  7. turanszkij

    Relocating to start my career

    Aren't you doing it the other way around? I think you should relocate when you get the job. Then the company can even arrange/pay the relocation for you. If you don't have a job yet, a company can fly you over for an interview if they really consider you.
  8. turanszkij

    Input Layout question

    It is doable, but maybe not the best practice. You can use D3DReflect API to retrieve shader source information from the compiled blob. From it you can retrieve your vertex shader inputs and semantics. But you should watch out because vertex buffers will use type conversion to convert between memory layout and how the shaders will view them, and you can only deduce that from the input semantic string. So make sure that they are consistent and decide on the CPU side what kind of vertex packing you want for a given semantic by comparing strings. Also, as far as I know, you can't use the shader reflection or shader compilation APIs when you release on the Windows Store.
  9. turanszkij

    Shadow map problem?

    Nice this brings back some memories when I was trying the same thing some years ago. As joeblack already mentioned, the most common way is to solve it with cascaded shadow maps. This is perfectly doable in DirectX 9 or any graphics API that can do shadow maps. The only thing you must do here, is instead of rendering one shadow map, you will render multiple ones (for example 3). All 3 shadow maps can have the same resolution, but each shadow projection matrix will be placed farther away from the camera and set up to cover a bigger range. When implementing this, as with any technique it can be overwhelming at the first time. So I suggest break down the implementation in steps: Just create two shadow maps and test that both are rendered to You must sample from both in the shaders, but you can visualize which shadow map you will be sampling from by outputting red/green/etc.. colors from shaders instead of sampling shadow maps. This is useful to find bugs early on. Create the second shadow matrix with just bigger size, but place it to just follow the camera If it's working, you can already use it to have a great range covered by shadows, but the next step of improvement is placing the bigger shadow matrix not to the camera center, but somewhere farther away on the camera look direction vector. Also, you can calculate the size of the shadow matrix to cover the camera frustum, but not more, which will increase the effective resolution/world space unit. Make the whole thing so that you can adjust the number of shadow map cascades, adjust split distance... Good luck with your engine, is it open source by the way?
  10. turanszkij

    Writes from compute shader not visible

    For future reference: This was a weird one. The problem got magically fixed when I limited the constant buffer descriptors bound from 15 to 12, as my GPU (GTX 1050) max limit supported only 12. This was strange because: The earlier validation layer I was using didn't complain at all. I am not even using 12 constant buffers, just 2-3 usually. But the descriptor table was filled with "null" descriptors to conform to DX11 style API slot layout. The later validation layer version started to complain, GPU crashes started to occur in random places. So now my Vulkan layer uses 12 CBV slots, which is not a big deal... Relevant topic:
  11. turanszkij

    What do you prefer and why?

    Actually, the title said nothing But if you like isometric games, in the past that was very mainstream, just take any real time strategy game for example, like Age of Empires, Commandos, or even games like Diablo, Xcom, there are just too many. Nowadays it's less trendy because anything can just be done in 3D and with 3D comes the ability to rotate the camera which gives freedom to more game design opportunities.
  12. turanszkij

    Stretched Billboard Projected Particles

    Hi, for this effect you should first calculate the view space particle velocity from the world space velocity: float4x4 g_xCamera_View; // camera view matrix // ... float3 velocity = mul(particle.velocity, (float3x3)g_xCamera_View); Then after the quad is already expanded/created (and rotated), for each vertex of the quad do this (before the quad vertices are projected): float xParticleMotionBlurAmount; // particle system setting: how much motion blur affects the particles... // ... quadPos += dot(quadPos, velocity) * velocity * xParticleMotionBlurAmount; This means that vertices which are aligned with the view space motion vector get extruded by the motion vector. This solution doesn't rotate according to the velocity, but I found that only extruding already gives the results what I needed. And this way I can still add rotational animation from the particle system settings. Also, you most likely can avoid using the geometry shader and you should consider doing so. The quad expansion can be done entirely in the vertex shader. If you are interested, you can take a look at my particle quad vertex shader: https://github.com/turanszkij/WickedEngine/blob/master/WickedEngine/emittedparticleVS.hlsl Good luck!
  13. You could try adding gradients, for example, things should be darker on the bottom, and brighter on the top. I think it would be a simple way to get a bit more interesting results. Also, overall a bit darker colors.. Though I am not a professional artist, only a hobbist so I could be off.
  14. Some queries are not required to call a Begin function, like with a timestamp for example, you only call the End() to record a timestamp.
  15. turanszkij

    Limited number of Uniform Buffers?

    Apparently there can also be a limit on the number of descriptor sets bound at the same time. The minimally supported amount is 4 as opposed to there are 5 shader stages (graphics) and unfortunately this means that we can't rely on mapping shader stage to descriptor set id with lower end GPUs. For example the Intel 620 GPU is still quite common and has this limitation. There could be an other solution of merging multiple descriptor sets into one and multiple shader stages will have visibility on it. But that way you always have to keep versioning a very huge descriptor set which I don't wanna do...
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!