Download

Source 2 Viewer v21.2

The viewer can now install itself, Pulse logic graphs and model configs can be decompiled, and CS2 maps show snow with sparkling glints.

Install App

The viewer can now install itself for the current user, without admin rights. The new Install app button adds a Start menu shortcut, makes the viewer open .vpk files and vpk: links, and lists it in Installed apps so it can be uninstalled.

The welcome screen is redesigned with Install app front and center. Source 2 Viewer will also be published to winget soon.

Pulse Graph Decompiling

Compiled Pulse graphs, the visual scripting behind map and game logic, now decompile to .vpulse files that can be compiled again.

  • Covers entry points, branches, loops, switches, expressions, method calls, variables, arrays, blackboard variables and outputs
  • Works for the graphs shipped with CS2, Deadlock and Dota 2
  • The graph viewer now shows the same nodes as the decompiled file

CS2 Snow

CS2 maps now show snow on world surfaces, blended terrain and decals, with sparkling glints and sunlight scattering.

Model Configs

Model configs, the variants a model can spawn with, can now be previewed in the model viewer and are written into decompiled models.

  • Choose a config, pick an option in each of its slots and re-randomize random ones
  • Decompiled models keep their configs, attached models, colors, material groups and bodygroups

Material Decompiling

Decompiled materials now keep the layout and compile settings of their textures.

  • Images are named after their compiled textures
  • Cubemaps are written as one image with all six faces in a strip, as .exr when HDR
  • Texture arrays and volume textures are written as numbered slices
  • A settings file next to each image keeps clamping, mips and compression

Dota 2 Shaders

Dota 2 heroes, water, crystals and terrain now render with updated shaders.

  • Water with refraction and depth fog
  • Crystals with a visible interior
  • Improved heroes, terrain blending and cosmetic sticker effects

Full Changelog

GUI

  • Added an Install app button, replacing Register .vpk file association
  • Added --install and --uninstall command line arguments
  • Added model config preview to the model viewer
  • Added bookmarks for files inside VPKs
  • Added an "All words" option to file search, matching words in any order
  • Added a Walk toolbar button to the map viewer
  • Added "View package metadata" to the VPK context menu
  • Redesigned the welcome screen
  • The Play button in the map viewer no longer enters walk mode
  • Flex controller and pose parameter sliders now show their values
  • Fixed the map viewer freezing when opening a clicked object's file in a new tab
  • Fixed thumbnails breaking the file list when OpenGL fails to start

Renderer

  • Added CS2 snow with glints and sun scattering
  • Added the sky showing through sky occluder surfaces
  • Added foil stickers (CS2)
  • Added morphs to Deadlock and Dota 2 models and CS2 effect models
  • Added SetRenderAttribute and ClearRenderAttribute entity inputs
  • Added point_render_attr_curve, texture_based_animatable and logic_choreographed_scene entities
  • Improved Dota 2 water, crystals, heroes, terrain blending and stickers
  • Improved bloom in Aperture Desk Job
  • npc_zombie entities now show their model (Half-Life: Alyx)
  • Volumetric fog now flickers less
  • Material color correction, tint and texture transforms now animate over time
  • Fixed gradient fog color being too bright
  • Fixed additive overlays (Half-Life: Alyx)
  • Fixed a stutter on the first bullet impact in first-person mode
  • Fixed shaders failing to load after another shader failed to parse
  • Fixed objects disappearing while entities are stopped
  • Fixed objects at the screen edge disappearing
  • Fixed some omni lights being culled while still lighting the view
  • Fixed shadows of animated objects outside the view not updating
  • Fixed non-looping default animations not holding their last frame
  • Fixed looping pose parameters not wrapping around
  • Fixed multiple issues in entity inputs and outputs

CLI

  • Added words to --vpk_search_options, matching words in any order
  • The CLI now exits with code 1 when no file matches the filters
  • Fixed exported files landing outside the output folder

Library

  • Added Pulse graph decompiling with PulseGraphExtract
  • Added model config decompiling
  • Added CS2 clutter, physics spheres and capsules, and custom cubemaps to decompiled maps
  • Added break commands, sticker and keychain markup, and hull and view bounds to decompiled models
  • Added support for the PCRC block (Dota 2)
  • Added shader expression evaluation with VfxEvalRuntime and VfxEvalCompiler
  • Improved decompiled model physics (boneless bodies, exact hulls, one mesh per surface)
  • Decompiled materials now write cubemap images as a strip and texture arrays as numbered slices
  • Decompiled materials now include a settings file with the compile settings of each image
  • Texture decompiling no longer writes a .vtex file
  • z3 compressed KV3 and mesh buffers now throw NotSupportedException
  • Half-float HDR textures now export as 16-bit .exr
  • Decompiled material images are now named after their compiled textures
  • Decompiled maps now keep the casing of entity keys
  • Decompiled output no longer depends on which files were loaded before
  • Library warnings now go to an optional ILogger instead of the console
  • Fixed resource blocks holding text KV3 failing to load
  • Fixed panorama files failing to load with a mismatched CRC
  • Fixed map decompiling missing Hammer meshes in some world nodes
  • Fixed meshes from separate .vmesh_c files missing in decompiled maps
  • Fixed glTF export of materials with HDR textures
  • Fixed glTF export dropping animation graph clips of map entities
  • Fixed decompiled animation graph scripts naming the wrong parameter
  • Public API
    • EntityLump.Entity no longer derives from KVObject; read keys through Properties and its indexer
    • IShaderDataProvider.GetSuffixForInputTexture, BasicShaderDataProvider.CommonTextureSuffixes and MaterialExtract.OutTextureName are removed
    • MaterialExtract.GetTextureUnpackInfos no longer takes omitDefaults and omitUniforms
    • CDmeVtex.CreateTexture2D is replaced by AddInputTexture and AddOutputChannel
    • Model.SetExternalMorphData and SetExternalMeshData now take a mesh index
    • GameFileLoader.EnsureStringTokenGameKeys is removed
    • Renderer: EntityFactory.Register, EntityInputTable and NpcVrCitizen are removed
    • Renderer: VolumetricFog.Volumes is replaced by AddVolume, and Shader.WithMorph now takes a bool

View commits since 21.1 | View milestone

Thanks to