Skip to content

Various stride utilities / projects (stride3d.net)

License

Notifications You must be signed in to change notification settings

Doprez/TR.Stride

 
 

Repository files navigation

TR.Stride

Various stride utilities / projects (stride3d.net)

Atmosphere and Ocean

TR.Stride.Atmosphere

Implementation of https://github.com/sebh/UnrealEngineSkyAtmosphere

Usage

  • Add TR.Stride.Atmosphere to your project
  • Add AtmosphereRenderFeature to graphics compositor
  • Add SimpleGroupToRenderStageSelector to the newly added render feature, set effect name to AtmosphereRenderSkyRayMarchingEffect
  • In MeshRenderFeature add a new sub render feature `AtmosphereTransparentRenderFeature
  • MeshRenderFeature render stage selector change effect name in Mesh Transaprent render stage selector from ForwardShadingEffect to AtmosphereForwardShadingEffect
  • Change LightDirectionalGroupRenderer to AtmosphereLightDirectionalGroupRenderer in MeshRenderFeature -> ForwardLightingRenderFeeature
  • Make sure "Bind Depth As Resource During Transparent Rendering" is checked on the Forward renderer node (this is the default setting)
  • Create game object, add light component with type = Sun, this is basically just a regular directional light.
  • Create game object, add atmosphere component, link with sun light
  • Done :)

Issues

  • Atmosphere can not be moved
  • Diretional light might be incorrect in editor after a hot reload, this is due to an issue in stride where component references are not correctly restored

TR.Stride.Ocean

Implementation of https://github.com/gasgiant/FFT-Ocean/

Usage

  • Add TR.Stride.Ocean to your project
  • Create an empty entity
  • Add OceanComponent to the entity

Customization

Custom materials and models can be generated by implementing the IOceanMesh and IOceanMaterial interfaces, default implementations of a basic lod material and corresponding clip mesh are provided. The material implementation can be set to return null in case custom render features are used instead of the regular material system.

Issues

  • Currently requires that you have at least one other model in your scene, it will crash due to a missing model processor otherwise.
  • No MipMaps atm, generation exists in the code base but it does not look very well. Uncomment code in WaveCascade.cs to enable, and modify OceanEmissive.sdsl to use TextureName.Sample(sampler, uv) instead of TextureName.SampleLevel(sampler, uv, 0) to enable usage in pixel shader.

About

Various stride utilities / projects (stride3d.net)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%