Jump to content
  • Advertisement

Nikita Sidorenko

Member
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Nikita Sidorenko

  • Rank
    Newbie

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I have a loop through the decals like this: [loop] for (int i = 0; i < projectorCount; i++) { uint currentOffset = lightOffset + i + pointLightCount + spotLightCount; uint projectorIndex = lightIndicesBuffer[currentOffset]; float4 projectedTextureUV = mul(projectors[projectorIndex].projectionMatrix, float4(input.position_worldspace.xyz, 1)); projectedTextureUV /= projectedTextureUV.w; projectedTextureUV = (projectedTextureUV + 1.0) / 2.0; float2 spritesheetUV = projectedTextureUV.xy * projectors[projectorIndex].scale + projectors[projectorIndex].offset; float4 projectedTexture = projectorTexture.SampleGrad(projectorSampler, spritesheetUV, uvDDX, uvDDY); //..... } I need to get uvDDX and uvDDY somehow. I can't use ddx(projectedTextureUV.xy) inside the loop. So what is the common approach to get the decal's mip?
  2. Nikita Sidorenko

    Can't compile HLSL pixel shader with StructuredBuffer

    Oh, such a dumb mistake! Thanks for pointing this out!
  3. Hi, I'm porting my non-production tiled forward render from OpenGL to Direct3D11. I want to store the light tiles data in the structured buffer but pixel shader doesn't compile with the following error: Shader source: https://gist.github.com/Division/2e7b53775eceb88a3472981571009531 It's failing on the line 78 (may have other errors too, tile debug stuff is untested): StructuredBuffer<LightGrid> lightGridBuffer : register(t3); I tried to compile both ps_4_0 and ps_5_0 - no difference What can be wrong with it?
  4. Nikita Sidorenko

    Decals in tiled forward render (Forward+)

    MJP, looks like I got the decal pack from the link you provided)) Makes sense!
  5. Nikita Sidorenko

    Decals in tiled forward render (Forward+)

    Yeah, opacity for angle difference sounds good! I was thinking about discarding for the big angles but changing opacity is nicer! Thanks!
  6. Nikita Sidorenko

    Decals in tiled forward render (Forward+)

    I've got additional question. How to handle situations like this: For example bullet holes projected on the edge
  7. Nikita Sidorenko

    Decals in tiled forward render (Forward+)

    Thanks! Now slides from doom make sense for me You blog is pretty helpful - want to say thank you for it as well As I see OBB is just a bound for decal projection frustum (can be orthographic).
  8. I'm making render just for fun (c++, opengl)Want to add decals support. Here what I found A couple of slides from doom http://advances.realtimerendering.com/s2016/Siggraph2016_idTech6.pdf Decals but deferred http://martindevans.me/game-development/2015/02/27/Drawing-Stuff-… space-Decals/ No implementation details here https://turanszkij.wordpress.com/2017/10/12/forward-decal-rendering/ As I see there should be a list of decals for each tile same as for light sources. But what to do next? Let assume that all decals are packed into a spritesheet. Decal will substitute diffuse and normal. - What data should be stored for each decal on the GPU? - Articles above describe decals as OBB. Why OBB if decals seem to be flat? - How to actually render a decal during object render pass (since it's forward)? Is it projected somehow? Don't understand this part completely. Are there any papers for this topic?
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!