242 Commits over 334 Days - 0.03cph!
Fix negative displacements being clipped
Scale vector by radius after sample
Clamp to avoid any extremes
Falloff by distance from centre of mesh and scale of mesh
Displace only when vector does not cross centre of mesh
Scale foliage based on distance density falloff to reduce visible pop in
Increase grass distance max clamp
NRE fix for wiping islands without FoliageGrid initialized
Merge from foliage_instancing_islands
Clean up left over shader constants
Remove unused foliage terrain cbuffer update functions
Remove CPU height sampling option can't be supported with mesh terrains
Do not invalidate cells when pushing a mesh terrain (only invalidate when nearest is changed)
Update terrain cbuffer after switching terrain data
Fix terrainData list removing, clamp activeTerrainIndex to length, and move matrix setup into terrainData constructor
MeshTerrainRoot should now auto update terrain size field (needed for terrain map sampling), and update island prefabs with terrain size field.
Check for closest island in increments instead of every frame, also profiler sample fix.
FoliageGrid renders on closest island and resets when island changes. Handle cases of terrain being rotated when sampling terrain maps by extracting 2D worldToLocalMatrix.
Clamp displacement radius, fix seemingly bugged alpha blend mode, bring back displacement decay using DstColor multiply
Use additive blend and alpha max for heights should solve height blending issues
Replace all displacement textures with shapes, switch off blending for now, use vertex position to sample displacement instead of instance pos (except of grass case), squash foliage towards centre relative to displacement vector, use quantized vertex colours to attenuate, and rework directional height for better blending.
Replace circle displace textures with radius, change displacement map to halfs (for now) to avoid precision issues when encoding, fix grass displacement issues with directional system, adjust blendmodes and use color mask to avoid blending height.
Merge from foliage_instancing (indirect instancing fix)
Make foliage instancing compatible with indirect instancing
Add HeightOffset to foliage placements, and force refresh in editor now recreates buffers for foliage instancing to allow for realtime placement adjustments
Change displacement map to linear, implement directional displacement, change displacement shader blends to handle encoded directional data, pass in terrain height params as shader globals, and sample displacement vectors attenuated by foliage wind vertex colours
Less hacky shoreline wetness fix using 2D distance instead
Fix terrain shadows, add vertex normal map sampling, use terrain heightmap instead of height slope map, change LOD slider into min/max slider for more control, and add convar for terrain renderer toggling.
Ocean shoreline wetness fix
Split dispatches per LOD, enable camera culling per cell, improve use of groupshared memory, enable renderer in editor, and add LOD distribution slider.
Merge from foliage_displacement_improvements
Adjust circle displacement output to make displacement animation less linear
Instanced terrain cell renderer setup
Merge from foliage_instancing
Create separate materials for foliage placements/instancing
Merge from foliage_displacement_improvements
Improve time sliced render option (can prioritise area near player), only clear within viewport option, replace old shader constants, update shader constants only when needed, and update foliage prefabs with new clear material.
Snap displacement cam to map texel increments to avoid jittering issues
Use flags for SpecialPurposeCamera for multiple render on refresh options
Timesliced rendering option for multi viewport renders
Implement wrapping displacement map and multi viewport rendering in SpecialPurposeCamera
Fix wrong blendmode for new displacement clearing
Better snow blending with terrain, displacement effects colour, reworked displacement manager to allow for continuous displacement (trails instead of discrete steps), displacement rendering now wraps around the map through multiple viewports, and added snow footstep prefab.
Instanced snow tiles based on terrain maps with simple displacement
Extend SpecialPurposeCamera to optionally use material render pass instead of clear, and add new subtractive shader for displacement reduction over time instead of instantaneous