Jump to content

  • Log In with Google      Sign In   
  • Create Account

kalle_h

Member Since 05 May 2012
Offline Last Active Today, 09:58 AM

Posts I've Made

In Topic: Tangent Space computation for dummies?...

23 July 2016 - 03:13 AM

 

Technically I can misuse any data-structure. A vertex is a point with edges to other points. I was just reacting to the comprehension part. Premature optimization. I remember engines which could only do flat shaded polygons. I do not know why current API do make the hack of vertex normals easier to use then the mathematical sound way of using the normal of the polygon. And I do not think that this is the case.

The GPU's concept of a vertex is "a tuple of attributes", such as position/normal/texture-coordinate -- the mathematical definition doesn't really apply :(

A GPU vertex doesn't even need to include position! When drawing curved shapes, "GPU vertices" are actually "control points" and not vertices at all.

 

There's also no native way to supply per-primitive data to the GPU -- such as supplying positions per-vertex and normals per-face. Implementing per-face attributes is actually harder (and requires more computation time) than supplying attributes per vertex, because the native "input assembler" only has the concept of per-vertex and per-instance attributes.

 

You could treat vertex as triangle and expand it at geometry shader. It just bit cumbersome and performance would be awful.


In Topic: Computing Matrices on the GPU

09 June 2016 - 01:47 PM

Just calculate it at vertex shader for start and then profile to see what is your bottleneck. If it seems that vertex shader calculations are problem then you start to think how to optimize it.


In Topic: Avoiding huge far clip

01 June 2016 - 12:17 PM

Quake used a farclip of 4096 - it's not as bad a problem as you seem to think it is.

It's also use 4 for near plane. This is ratio of 1 / 1024.

Absolute value of far plane isn't important the near/far ratio is.


In Topic: Hybrid Frustum Traced Shadows

25 May 2016 - 01:23 AM

Good idea. Without conservative rasterization i expect artefacts by shadowing pixels that would need exact tests.

 

Why you expect any artifacts? Prepass would only allow fully covered pixels to occlude.


In Topic: Hybrid Frustum Traced Shadows

24 May 2016 - 01:52 PM

 

Edit:

Draw the occluders twice - first time to determinate fully covered texels and remove all list entries on their back.

Conservative rasterization would help here too if it's possible to draw only fully covered pixels.

 

I think normal depth only pre pass without conservative rasterization would fix most of the overdraw problems. Second pass would use lequal test. Then additional optimization could be possible to skip all point in frustum test for Equal depth test pixels but I don't see that test as bottleneck.


PARTNERS