Jump to content

  • Log In with Google      Sign In   
  • Create Account

kalle_h

Member Since 05 May 2012
Offline Last Active Today, 01:52 PM

#5248545 Is ray tracing hard or is it just me?

Posted by kalle_h on 24 August 2015 - 09:32 AM

Raytracing is dead simple. Efficient raytracing is not.




#5248294 Virtual Texture useful for this?

Posted by kalle_h on 22 August 2015 - 04:10 PM

Load couple low level of mips for all landmarks always. Then just stream higher levels for nearest(in locality or time) N landspaces.




#5248277 Starting With My Dream

Posted by kalle_h on 22 August 2015 - 02:20 PM

Libgdx would be good as 2d java crossplatform framework for you.




#5245430 Backface culling in geometry shader?

Posted by kalle_h on 10 August 2015 - 05:54 AM

You need to take perspective projection account.

https://en.wikipedia.org/wiki/Back-face_culling




#5245256 Cascaded shadow mapping, shadow frustum generation

Posted by kalle_h on 09 August 2015 - 11:06 AM

For our game Hardland I calculate smallest bounding box by just testing multiple different shadow camera rotations. This usually reduce triangle count a lot and increase effective resolution substantially.




#5231316 Get height at certain point in a triangle

Posted by kalle_h on 27 May 2015 - 01:04 PM

Why complicate simple bilinear filtering from heightmap with triangles. Even tought triangles are rendering representation it does not have to mean that physics use same representation.

 

Simple way that works for me.

http://pastebin.com/LcwGBbv8




#5230074 Circle embedded in line-- fastest vector to unembed

Posted by kalle_h on 20 May 2015 - 12:04 PM

Square root maps to hardware and its fast. There are tricks to calculate inverse of square root but those might ends up to be slower these days.

 

http://betterexplained.com/articles/understanding-quakes-fast-inverse-square-root/




#5220767 Modern cartoon shading that's not cel shading

Posted by kalle_h on 01 April 2015 - 12:25 PM

Just using physical based shading with exaggerated and interesting materials take you long way.




#5220012 How to implement skeletal animation in 2d game?

Posted by kalle_h on 29 March 2015 - 01:23 PM

Quick google tour hinted that there should be runtimes for Allegro too.(unofficials)

NIH virus is dangerous and you should try to cure it.




#5219452 What are your opinions on DX12/Vulkan/Mantle?

Posted by kalle_h on 26 March 2015 - 03:12 PM

We actually do not need more cores onto CPUs, we need bandwidth D:

But cores are cheap, bandwith is not.




#5218635 Efficient way to check which lights belong to which meshes?

Posted by kalle_h on 23 March 2015 - 04:26 PM

Quicky algorithm that I would try.

 

1. Frustum cull visible lights.

2. Sort lights by radius. 

3. Frustum cull objects but add biggest radius of visible lights for every object.

4. For each visible light loop over object list from pass 3 and do range check. For each face frustum cull objects that are inside the range.




#5218632 Efficient way to check which lights belong to which meshes?

Posted by kalle_h on 23 March 2015 - 04:19 PM

 

Twenty lights and a couple hundred objects? Brute force sphere-sphere testing should be nearly instant in this case. You're doing something wrong there.

I forgot to add, I am doing 6 frustum cullings per light since they are point lights that use shadow cube maps. This is only done for dynamic lights though.

 

But those 6frustum culling passes per light should be very fast bebecause they should only operate for subset of data. Assuming that you do range check before.




#5218304 *solved* Too slow for full resolution, want to improve this SSAO code

Posted by kalle_h on 22 March 2015 - 01:40 PM

Now we just need some screenshots.




#5218226 *solved* Too slow for full resolution, want to improve this SSAO code

Posted by kalle_h on 22 March 2015 - 05:43 AM

GLSL port of SAO is pretty inefficient but its memory bound so ALU ops does not mean much in most case. Sin/Cos are not problem(can be replaced with 2x2 rotation matrix if needed) but the integer math/ integer uv sampling.

 

There is cleaned version of Hardland ssao. http://pastebin.com/WZCsjkrj

 

I set sample count to 16 to match with your testing but I have noticed that you get better quality with something pairless number. Prime numbers are good. I use 17 for ultra and 13 for high.

 

Another SAO version can be found here. https://github.com/bartwronski/CSharpRenderer/blob/master/shaders/ssao.fx

 

ps. Its lot faster to port from hlsl to glsl than optimize the glsl version.




#5218148 *solved* Too slow for full resolution, want to improve this SSAO code

Posted by kalle_h on 21 March 2015 - 03:24 PM

Good results.

For kernel size issues read SAO paper.  http://graphics.cs.williams.edu/papers/SAOHPG12/

Basically the main idea is to use depthbuffer with mipmaps that are generated using rotated grid for subsampling. This make the algorithm performance almost totally independant of kernel radius.

 

You should try more aggressive temporal smoothing for ssao. This way you can get rid of your most expensive component(blurring) and use all computation time for additional samples.

 

If you remove blurring how many samples you need to get stable results? 32? 64?






PARTNERS