Saturday, March 12, 2011

by the way...

Did I mention that I more or less solved the Z-Fighting problem?

            Dim ra As Single = 0.001
            Dim r As Single = rndz.Next(-100, 100) * ra
            Dim s As Single = rndz.Next(-100, 100) * ra
            Dim t As Single = rndz.Next(-100, 100) * ra
            value.x += r
            value.y += s
            value.z += t
  Works about 90% of the time!

4 comments:

  1. YES YE SYE Y SEYS EYEYS YSEYEYSYSYS YES

    ReplyDelete
  2. Have you tried using the last three digits of the block ID? After all, random numbers are occasionally the same; block IDs are guaranteed to be unique, and in a single cell the last three digits are probably all you need.

    Something like:

    dim offset as single = (block.id mod 1000)
    offset = offset * 0.001
    value.x += offset
    value.y += offset
    value.z += offset

    might work? You could probably make odd offsets negative, too, in order to not bias things towards +XYZ

    ReplyDelete
  3. that's a cool idea...
    not 100% sure I am going to keep this change... it also sometimes makes the odd crack you could jump through...

    I'm going to keep messing with it.

    ReplyDelete