# HG changeset patch # User Leonard Ritter # Date 1645268991 -3600 # Sat Feb 19 12:09:51 2022 +0100 # Node ID 918c1c3d6146ab0b9b3c453161b8f7d31aa4c7e3 # Parent ef01c3ccf70920891a986aa97025097af5fb0acf * fixed triangle normals diff --git a/testing/test_cascade_dmc_cc_vvf.sc b/testing/test_cascade_dmc_cc_vvf.sc --- a/testing/test_cascade_dmc_cc_vvf.sc +++ b/testing/test_cascade_dmc_cc_vvf.sc @@ -52,7 +52,7 @@ FOG := false USE_FLAT_SHADING := true BALANCE_QUADS := true -USE_COMPLEX_SURFACE := false +USE_COMPLEX_SURFACE := true HIGH_QUALITY_FEATURES := true SOFT_WORLD_SAMPLING := true USE_CATMULL_CLARK := false @@ -322,7 +322,7 @@ elseif 0 scale := 100.0 (nine-spheres (p / scale)) * scale - elseif 0 + elseif 1 #p := p * 0.2 let d = static-if USE_COMPLEX_SURFACE @@ -1144,8 +1144,8 @@ let ofs = (atomicAdd vertex-out.count 6) entries := vertex-out.entries static-if USE_FLAT_SHADING - n0 := (triangle-normal v00.pos v10.pos v11.pos) - n1 := (triangle-normal v11.pos v01.pos v00.pos) + n0 := (triangle-normal v00.pos v11.pos v10.pos) + n1 := (triangle-normal v11.pos v00.pos v01.pos) #n1 := (normal v00.pos v11.pos v01.pos) entries @ (ofs + 0) = (swapnormal v00 n0) @@ -1527,13 +1527,15 @@ normal.out = #(viridis (lod / MAX_WORLD_LOD)) * 2.0 - 1.0 do - static-if VISUALIZE_IDS ((vec3hash (vertex-index as f32)) * 2.0 - 1.0) + static-if VISUALIZE_IDS + ((vec3hash (vertex-index as f32)) * 2.0 - 1.0) + hue ((vertex-index as f32) / 100000) else n depthval.out = coord.z albedo.out = do static-if VISUALIZE_LOD - vec4 (hue (lod / MAX_WORLD_LOD)) 1 + vec4 (hue (clamp (lod / MAX_WORLD_LOD) 0.0 1.0)) 1 else vec4 1 matdata.out = @@ -1789,7 +1791,7 @@ ? (p.x >= c.x) 1:u32 0:u32 ? (p.y >= c.y) 2:u32 0:u32 ? (p.z >= c.z) 4:u32 0:u32 - mask := mask ^ 7 + #mask := mask ^ 7 for index in (range 8:u32) 'append sector-queue child-cell code (index ^ mask)