User Tools

Site Tools

Version - 7.1.0

Release Notes

Version 7.1.0 is the immediate successor to version 7.0.1 and contains mostly bug fixes and efficiency improvements.

Important Note: If you are using the full SDK in your application, you will need to recompile your trees with the 7.1.0 Compiler. This is due to a change in shader hashing scheme. If you are not using the SDK to load shaders, recompilation should not be necessary.


Changes to the SDK

  • Shader Name Change: Overhaul of the shader naming convention. There were a few states that would cause a hash collision, but no longer. If your application uses the SDK to load shaders, you'll have to recompile your assets.
  • Distant Billboards Cullable: Support was adding for culling billboards after a certain distance, so they won't always draw all the way out to the far clipping plane. This can be set per base tree in the SDK. CInstancingMgrRI_t::CopyBillboardInstancesToGpu() updated to support.
  • Lingering Grass Cells Bug Fix: Bug fix for CInstancingMgrRI_t::UpdateGrassInstanceBuffers() where old grass cells weren't being properly cleared. This would result in grass cells continuing to render even if they were outside of the frustum.
  • Wind Period Changed: Due to a switch in the shader templates from an sine approximation to a call to the sin() intrinsic function which operates on a different period, changes were made in CWind::Advance() in Wind.cpp. Specifically, anywhere the constant c_fSineToApproxRatio = 6.67 is used represents a period adjustment.
  • RENDER_TARGET_TYPE_NULL Removed: Due to a change in the example G-buffer format used by the SpeedTree reference application, RENDER_TARGET_TYPE_NULL, defined in GraphicsApiAbstraction.h, was removed.
  • NULL Tree Pointer Bug Fix: Bug fix in CVisibleInstances::SetHeapReserves() that would cause the first base tree in the cull results to be NULL.
  • OpenGL VAO Restoration: In the OpenGL Renderer Library, CGeometryBufferOpenGL::CreateInstancingVAO() and CInstancingMgrOpenGL::Render() will now restore the currently bound VAO after execution.
  • OpenGL Core Profile Update: In the OpenGL Renderer, some changes were made in RenderTarget.cpp so that OpenGL errors are not generated under using the OpenGL Core Profile.
  • Xbox One and DX11 MSAA Quality Changed: Removed GetMSAAQuality() from RenderTarget.cpp for Durango and DX11; now always using MSAA quality index 0 for reference application. Clients will choose their own MSAA settings for their render targets.
  • New Data From Culling System: CVisibleInstances::FindCullTreeCells() and FineCullGrassCells() now return a bool to note whether any cells have changed (new or deleted).
  • Comments For Shader Constants: Every variable and structure has been commented in ShaderConstantBuffers.h (a file generated by an internal SpeedTree dev tool that can be made available upon request).
  • Removed all Intel GPA Reference: The Intel GPA code was used to make profiling easier with that system, but was unused.
  • Culling Bug Fix: Removed ill-conceived attempt at optimization from the beginning of CVisibleInstances::RoughCullCells().
  • CFileSystem::CompareFileTimes() Fixed For Linux: Incorrect macros where used for #ifdef, causing the Linux version to compile the PS3/PS4 implementation which is essentially a no-op. This broke GLSL shader caching under Linux.
  • Fizzle Noise Change: LoadNoise() changed for all platforms (defined in Texture.cpp for each render library). It now uploads the noise pattern in the red channel, not alpha. This also affects the shader lookup.
  • Render3dTrees() Parameters Change: CForestRI::Render3dTrees() no longer takes st_bool bRenderOpaqueMaterials.
  • SRenderState Updated: Added m_bBranchLevel1WindWeightsActive and m_bBranchLevel2WindWeightsActive to SRenderState for shader wind optimization. While it changes the SRT file format, older version of the 7.x SDK will still load 7.1.0 files correctly.
  • Depth Pass Query Added: Added CCore::IsCompiledForDepthPrepass() which will return true if the “Depth pre-pass” Shader Type option was selected in the Compiler during compilation. This is a good way to make sure incoming assets match the compilation mode expected by your application.
  • Updated Pixel Property Names: Changed “NormalInTangentSpace” to “LightDirInTangentSpace” and “FadeToBillboard” to “BillboardTo3dFade” in GetPixelPropertyDesc() in Core_inl.h.
  • CTimer Updated: Added Mark() and Recall() to CTimer, used to store up to 10 intermediate time values as the timer keeps running.


Changes to the Shader Templates and SRT Exporter

Note: The SRT Exporter is invoked by the Compiler application during SRT compilation. The Exporter is responsible and writing the SRT files and generating the needed bank of shaders based on the shader templates.
  • G-Buffer Change: For Durango and DX11, we've moved away from two render targets plus one null target to track the alpha values. Format is now just two render targets, with specular and transmission masks packed into one color. Both InlinePixel_DeferredOutput.fx and Include_Gbuffer.fx were updated (in addition to changes in the C++ SDK).
  • Wind Code Restructured: Substantial reorganization to the wind system code, though functionality remained the same as 7.0.1. The new code encapsulates the entire system into one function that does not depend directly on any uniform shader constants. All input is from a single structure parameter which is passed within the internal wind functions. The call to this function is abstracted by inline include files InlineVertex_Wind3d.fx and InlineVertex_Billboard.fx. This new approach makes the wind system much more modular.
  • Wind Bug Fixes: Some directional values were incorrect for arbitrary orientations. Several issues with wind on leaf cards also fixed.
  • Ambient Image Lookup Bug: The wrong vector was being used for the ambient image lookup, causing a blue-ish tint to the vegetation.
  • Can't Create Output Folder Bug: The SRT Exporter (via the Compiler application) would sometimes warn that the output folder couldn't be created if it was the first time compiling to that location. This was fixed.
  • Wind Period Changed: Sine wave approximation replaced with calls to sin() intrinsic in Include_Utility.fx. Period adjustment needed in Wind.cpp of the SDK as well.
  • Distant Billboards Cullable: FadeBillboard() now has option to fade far billboards out after a certain distance before they've culled by the SDK.
  • Comments For Shader Constants: Every variable and structure has been commented in Include_Uniforms.fx (a file generated by an internal SpeedTree dev tool that can be made available upon request).
  • Fizzle Noise Change: AlphaTestNoise_3dTree() and AlphaTestNoise_Billboard() now lookup noise texture from NoiseMap's red channel, not alpha.
  • New Packing Functions: PackTwoIntoOne() and UnpackTwoFromOne() added for converting two 8-bit values into two 4-bit values and storing in an 8-bit location.
  • ST_DEFERRED_A2C_ENABLED Unused: ST_DEFERRED_A2C_ENABLED no longer used, but still generated for backwards compatibility. It was removed in conjunction with G-buffer change.
  • Shader Optimization: ApproxAcos() also added, used in place of acos() call in two locations.
  • Shader Variable Name Changes: v2p_vNormalInTangentSpace renamed to v2p_vLightDirInTangentSpace and v2p_fFadeToBillboard renamed to v2p_fBillboardTo3dFade.
  • SRT Exporter Verbose Mode: Some of the output generated by the SRT Exporter (via the Compiler application) was updated.


Changes to the Reference Application

Note: Nearly all of these have nothing to do with the SDK, but affect the sample application that demonstrates use of the SDK for each supported platform.
  • Navigation Internals Overhaul: While 90% of the functionality remains, there was a considerable restructuring of the navigation base class as well as the gamepad, mouse, and keyboard classes.
    • Base Class Changes: Navigation base class now houses the demo mode system and reading and writing the saved_cameras.txt file. All of the keyboard, mouse, or gamepad specific code was removed and placed in their respective derived classes.
    • Gamepad Class: New class abstracts platform-specific details for PS3, PS4, Xbox 360, and Xbox One.
    • Mouse and Keyboard Class: This class now handles all keyboard and mouse specifics, removing a good deal of code from the CMyApplication class.
    • Mouse Navigation Change: Earlier versions required the user to hold and press the left or middle mouse button to engage freelook mode. It is on by default now. Users can press the left mouse button once to stop freelook and free the mouse to leave the window and click again in the window to resume freelook.
  • SFC File Changes: SFC files are those displayed by the reference application launcher that define a given forest:
    • Billboard Culling: To support culling billboards before the far clip distance, the parameter “billboard_cull_distance <value>” was added to the “speedforest_population” and “random_tree_population” groups.
    • Navigation Changes: Under navigation block, removed “speed_scalar”, “start_pos”, and “start_dir” (it just picks the first camera pos from the saved cameras file). Added “translate_scalar” and “rotate_scalar” to govern global navigation speed.
    • Mouse Navigation Fixes: During WASD/freelook navigation under Windows 8 and 10, the screen would sometimes jitter. There was also inconsistent control over the mouse placement.
  • Linked DirectX Libraries: There was a general clean-up of which libraries were linked in the DirectX 11 projects.
  • OpenGL Core Profile: Added a new global VAO for smoother integration with OpenGL core profile (it would sometimes generate OpenGL errors).
  • OpenGL MSAA Support: OpenGL now supports MSAA when render targets are used (deferred rendering and forward with bloom).
  • Depth Prepass Sanity Test: If the reference application and SRT/shaders were configured differently (e.g. the app was expecting depth prepass mode and the SRT files weren't compiled for this mode), bad things could happen. This test ensures that the application won't attempt to render if there are incompatible modes.
  • New Render Function: Added ForwardRenderWithDepthPrepassAndBloom() example render function.
  • RENDER_TARGET_TYPE_NULL Removed: Updated CMyDeferredRenderTargets to remove NULL render target approach; no longer need MY_DEFERRED_RENDER_TARGET_COUNT_NO_A2C and MY_DEFERRED_RENDER_TARGET_COUNT_WITH_A2C.
  • Durango MSAA: Durango now defaults to 2x MSAA.
  • CMyTerrain Restructured: Separated CMyTerrain::Init() into Init() and InitGfx().
  • Culling Optimization: CMyPopulate::StreamTrees() adds check for changed cells.
  • Path Bug Fix: CMyConfigFile::AssetFullPath() bug fix for empty filenames.
  • Removed Third-Party Code: CommandLineToArgvA() was reimplemented for the DirectX 9 and DirectX 11 reference applications.