- Smooth vertex normals: area-weighted accumulation of face normals per indexed vertex before triangle expansion. Gives Gouraud-smooth shading without adding geometry. - Triplanar fix: PS uses geometric normal (ddx/ddy of worldPos) for texture projection weights, smooth normal for lighting only. Prevents texture stretching on smoothed surfaces. - Depth bias: custom rasterizer state (depth_bias=2, slope_scaled=1.0) on smooth PSO resolves z-fighting at smooth↔blocky overlap. - hasSmooth filter tightened: check face-adjacent voxels of each corner (1-voxel reach) instead of neighbor cells' corners (2-cell cascade). Prevents smooth mesh from extending into underground blocky territory. |
||
|---|---|---|
| .. | ||
| voxelCommon.hlsli | ||
| voxelCullCS.hlsl | ||
| voxelMeshCS.hlsl | ||
| voxelPS.hlsl | ||
| voxelSmoothPS.hlsl | ||
| voxelSmoothVS.hlsl | ||
| voxelTopingPS.hlsl | ||
| voxelTopingVS.hlsl | ||
| voxelVS.hlsl | ||