Jump to content

  • Log In with Google      Sign In   
  • Create Account

jajcek

Member Since 13 Aug 2010
Offline Last Active Jul 30 2014 09:16 AM

Posts I've Made

In Topic: Refractive water

29 May 2014 - 12:17 PM

I think I will go with the MRT solution, because I will probably need this when doing soft edges feature, so it will be good to study this topic a bit. Although I have a probably funny question before I start. Does MRT work with back buffer as well? I mean if it's possible to render simultaneously to back buffer and some other render target or you can render simultaneously only to 2 other render targets where none of them is the main back buffer?


In Topic: Spliting terrain vertex buffer into 2 buffers

02 March 2014 - 01:12 PM

I wonder how do you do the frustum culling with only 2 draws? In shader? It must be inefficient to cull by a vertex.


In Topic: Spliting terrain vertex buffer into 2 buffers

02 March 2014 - 08:47 AM

The terrain tiles are not instanced*, every tile has its own vertex buffer, so SV_InstanceID won't help me, but I will play with that and check different approaches.

 

*I don't even see the point of instancing it as every tile has another geometry, altough number of vertices is the same,


In Topic: Spliting terrain vertex buffer into 2 buffers

02 March 2014 - 12:42 AM

I really really appreciate wasting time to answer my question and giving the example smile.png. The SV_VertexID looks very promising.

 

I actually shouldn't put my data to a texture as I am generating an infinite terrain, so I think sending a texture to the shader will be heavier than sending an array of Y values (and additionaly I would need to sample the texture inside the shader).

 

I am pre-calculating index buffers and switching between them if it's neccessary when creating LOD effect (unfortunately it has popping effects).

 

But still I am wondering what the performance impact will be during translating the chunks (from my investigation translation will be called like 50-100 times). I think the best way will be to use constant buffer to put there some origin position and add it to the final vertex position in the shader, but I would need to update constant buffer 50-100 times during one frame or maybe put there 100x origins at once, but which origin use for which chunk... aww! I don't know now I will try to find the best way smile.png


In Topic: Binormal (probably) artifacts

17 September 2013 - 09:23 AM

Okay I have solved it, according to the http://mathworld.wolfram.com/BinormalVector.html , the binormal is cross(t, n), so I just changed the code to:

 

//x = cross( b, n );
b = cross( t, n );
b = normalize( b );
 
and it works.

PARTNERS