meta data for this page

Version 9.5.0

The latest release of our SDK is version 9.5.0, succeeding the previous version 9.4.0. This update brings several new features and improvements, enhancing the overall functionality and efficiency of the SDK.

Requirements

To use this SDK release effectively, ensure you have SpeedTree Modeler version 9.1.1 or newer installed. This is necessary for compiling .stsdk models compatible with this SDK.

Features

  • Local Wind Example Vertex Shader: We now provide a vertex shader that illustrates how to implement a local wind effect. This enhancement supports omni-directional point wind sources, enabling each tree instance to respond uniquely in its direction. Unlike traditional SpeedTree wind examples, where a single global direction is simulated, the local wind feature provides more flexibility and realism in wind effects. For detailed information on using the local wind example, refer to the documentation.
  • Consolidated Wind Source Files: To improve the SDK's organization and ease of use, we have consolidated multiple wind source files into a single header file: Include/SpeedTree/Core/SpeedTreeWind.h. This file can be compiled under C++ as well as in HLSL, GLSL, and PSGL vertex shaders. It defines the CWindStateMgr class and all four SpeedTree wind modes (Games SDK, VFX, Legacy, and Lumberyard). The replaced source files include:
    • WindTypes.h
    • WindShaders_All.h
    • WindShader_Legacy.h
    • WindShader_Vfx.h
    • WindShader_Sdk.h
    • WindShader_Lumberyard.h
    • WindStateMgr.h
    • WindStateMgr.cpp
    • Refactored header files include: UnifyHlslAndGlsl.h and SdkConstantBuffers.h
  • Multiple improvements to the Reference Application:
    • Vertex and Pixel Shader Specification per Population Block: Users can specify a specific vertex or pixel shader for each population block (e.g., speedforest_population) using new reserved tokens: vertex_shader and pixel_shader. By default, the Reference Application constructs the shader names based on the names of the vertex and texture packers stored in the .stsdk files. Detailed information can be found in MyRenderStateCallback() in MyPopulate.cpp.
    • Override Shader Examples: Two additional .sfc forest configuration files are included in this release to demonstrate shader overrides:
      • sample_override_shader.sfc: This file showcases how to override the pixel shader in two population blocks. It replaces the standard tree shader with a pixel shader that returns a constant red color, and a grass populator uses a pixel shader that returns a constant blue color.
      • sample_local_wind_effect.sfc: This file demonstrates the new local wind effect using two grids of tree instances. Additionally, it serves as an example of how to override a vertex_shader in a tree population block.
    • ImGui Console Upgrade: In the desktop builds, the ImGui console has been upgraded to render faster with better flexibility. The overall ImGui font has also been updated, contributing to improved readability and aesthetics.
    • New Parameter in .sfc Forest Configuration File: A new parameter, follow_terrain (bool), has been added to the navigation block in the .sfc forest configuration file syntax. The default value is true.
  • Xbox Series X/S Builds: Compiled and tested Xbox Series X/S builds against June 2023 GDK Update 1.
  • PlayStation 5 Builds: Compiled and tested PlayStation 5 builds against Prospero SDK 7.000 and devkit system software version 7.60.00.07.

Changes

In this version, several changes have been made to the reference shaders and the SDK header files located in Include/SpeedTree/Core/, used by the reference shaders.

  • Renaming Coordinate System Macros: The following macros used to define coordinate systems have been renamed for clarity and consistency:
    • ST_COORDSYS_Z_UP is now ST_Z_UP
    • ST_COORDSYS_Y_UP is now ST_Y_UP
    • ST_COORDSYS_RIGHT_HANDED is now ST_RIGHT_HANDED
    • ST_COORDSYS_LEFT_HANDED is now ST_LEFT_HANDED
  • Macro Definitions Moved: The macro definitions for ST_Z_UP, ST_Y_UP, ST_RIGHT_HANDED, and ST_LEFT_HANDED have been relocated from Include/SpeedTree/Core/UnifyHlslAndGlsl.h to SampleForest/Shaders/Include/global_config.h. This reorganization aims to improve the structure and modularity of the SDK.
  • Utility Shader Functions Modification: Previously, utility shader functions relied on global declarations like ST_Z_UP and ST_RIGHT_HANDED (formerly ST_COORDSYS_Z_UP and ST_COORDSYS_RIGHT_HANDED). With this update, these utility functions have been modified to take these values as extra parameters instead. This change enhances the flexibility and reusability of the utility shader functions.
  • Update to Utility_BoostMipOpacity() Function: The shader function Utility_BoostMipOpacity() has been updated to take a new parameter float fMipAlphaScalar, replacing the previous behavior of pulling this value from global u_sBaseTree.m_fMipAlphaScalar. This change allows for better control and customization of the mip opacity scalar.