Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About Royma

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

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

  1. In traditional way, it needs 6 passes for a point light and many passes for cascaded shadow mapping to generate shadow maps. Recently I learnt a method that using a geometry shader to generate all the shadow maps in one pass.I specify a render target and a depth-stencil buffer which are both Texture2dArray in DirectX11.It looks much better than the traditional way I think.But after I implemented it, I found cascaded shadow mapping runs much slower than the traditional way.The fps slow down from 60 to 35.I don't know why.I guess may be I should do some culling or maybe the geometry shader is not efficient. I want to know the reason that I reduced the drawcalls from 8 to 1, but it runs slow down.Should I abandon this method or is there any way to optimize this method to run more efficiently than multi-pass rendering? Here is the gs code: [maxvertexcount(24)] void main( triangle DepthGsIn input[3] : SV_POSITION, inout TriangleStream< DepthPsIn > output ) { for (uint k = 0; k < 8; ++k) { DepthPsIn element; element.RTIndex = k; for (uint i = 0; i < 3; ++i) { float2 shadowSlopeBias = calculateShadowSlopeBias(input.normal, -g_cameras[k].world[1]); float shadowBias = shadowSlopeBias.y * g_cameras[k].shadowMapParameters.x + g_cameras[k].shadowMapParameters.y; element.position = input.position + shadowBias * g_cameras[k].world[1]; element.position = mul(element.position, g_cameras[k].viewProjection); element.depth = element.position.z / element.position.w; output.Append(element); } output.RestartStrip(); } }
  2. Now I'm tring to implement a PBR lighting shader.I've learnt that I should calculate the BRDF, then multiply it with light color and cos theta according to the rendering equation.Now I need to ensure all the diffuse and specular are less than 1.A simple method is to calculate the specular brdf first,then the income of diffuse are only 1 - specular.But when I use the cook torrence model I can only calculate one specular ray in current direction, but there are a lot of rays are reflected in other directions at the same time.If I use 1- current specular ray, I can only ensure all the diffuse and this specular light are less than 1,but how can I ensure all the reflected rays and the diffuse light are less than 1?
  3. I'm using a plugin called Coherent UI for UE4 to present html pages in game.There's a problem that same html page presented in web browser and in the game is different.In that page there's a svg line. <svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <line x1="0" y1="0" x2="200" y2="200" style="stroke:rgb(255,0,0);stroke-width:2"/> </svg> When I set the stroke-width at a larger value, 50,100... it's length also became larger. The first one, stroke-width=2. The second one, stroke-width=50. The third one, stroke-width=50 but in Chrome and Firefox. I need the edge align to the center of the circle.And I found that if I set the stroke-linecap at "square",the line in web browser is same as the second.So I tried to set stroke-linecap at "butt", then the line in browser became correct.But it doesn't take effect in the Coherent UI.Is it a bug in the plugin?How can I fix it? Thanks.
  4. @JoeJ Thank very much.What kind of BVH do you use?Is it good for me too?
  5. In Computer Graphics, there are two important data structures, The BSP Tree and the Octree.I want to use them to fast detect collisions.I mainly use it to get visible objects in a limited space from the whole scene,or to simulate physical motion,or to implement Ray-Traced renderer...Some people told me BSP is faster,and the other said Octree is faster.Who should I believe? Thanks
  6. I know that the BRDF can be used to calculate one ray casted from a specific incidence direction to a view direction. I also know that I can use the Monte Carlo method to integrate the BRDFs casted from all the incidence directions to one view direction in offline rendering. But as far as I know the Monte Carlo method is rather expensive in real time case, so I want to understand how the real time game engines such as unreal engine 4,unity 3d efficiently integrate the BRDFs?
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!