Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 01 Sep 2012
Offline Last Active Dec 04 2015 04:39 AM

Posts I've Made

In Topic: Flickering when using Occlusion culling

05 December 2014 - 01:47 AM

If you use system such as this it will be a lot slower than not using it at all


Your first problem is that you read data from gpu IN THAT SAME frame that you submited queres - this way your cpu and gpu work in full sync with is realy bad

I fixed that problem and actually I got 40-50%, and more improved performance.

I will think about what you've said and try to implement something.

In Topic: How to shade hair (line segments) in OpenGL

05 July 2014 - 04:11 AM

OK, I'll try that and see how it works.

In Topic: How to shade hair (line segments) in OpenGL

03 July 2014 - 07:42 AM

The thing is I am not sure how to pass that additional vertex. How can the shader know when its time to use it ?

If I just add a vertex to my buffer, the result will be the same I think?


EDIT: I managed to get better results with precalculating the segment directions, fill them in an array and pass them to opengl. But the shading is not smooth and you can see the different line segments, not sure how to interpolate it.

In Topic: How to shade hair (line segments) in OpenGL

03 July 2014 - 06:33 AM

I use the same vertex buffer for "vert" and "vertNext", just with different offsets. I guess that when "vert" points to the last element of the buffer, "vertNext" is some undefined garbage and weird things happen.


Any suggestion how can I get the line segment direction ? Do I need to calculate it outside of the shader and later pass it ?

In Topic: AI is harder than I thought

12 April 2014 - 01:13 PM

If you want you can have a look at this code: click

Specifically line 146 - computerMove() function.

I have written this version in my early years when I was learning C++ and some parts of the code look horrible :D

but the algorithm for the AI should work just fine.