Shaders in Glass: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Moved info from main list.)
(These shader sources can be found in the modern SDK (some were added with TF2 source code, others were there already))
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The <code>Glass\</code> folder of <code>Source Materials.gcf</code> contain shaders dedicated to [[Glass & Windows|windows and glass]] materials:
The <code>Glass</code> folder of {{code|hl2_misc_dir.vpk}} and {{code|hl2_textures_dir.vpk}} contain shaders dedicated to [[Glass & Windows|windows and glass]] materials:


*[[LightmappedGeneric]] is used for 46 materials.
*[[LightmappedGeneric]] is used for 46 materials.
Line 10: Line 10:
* Two textures are mixed evenly and multiplied by a lightmap. Useful if one or both base textures are in motion.
* Two textures are mixed evenly and multiplied by a lightmap. Useful if one or both base textures are in motion.
* Used in only one material: <code>glasswindow018a_cracked.vmt</code>
* Used in only one material: <code>glasswindow018a_cracked.vmt</code>
* Not found in released mod code.
* Can be found in [[Source SDK 2013 MP]] source code.


===ShatteredGlass===
===ShatteredGlass===

Latest revision as of 14:31, 30 June 2025

The Glass folder of hl2_misc_dir.vpk and hl2_textures_dir.vpk contain shaders dedicated to windows and glass materials:

Dedicated Shaders

The following shaders are more or less exclusively used for this folder.

LightmappedTwoTexture

  • Two textures are mixed evenly and multiplied by a lightmap. Useful if one or both base textures are in motion.
  • Used in only one material: glasswindow018a_cracked.vmt
  • Can be found in Source SDK 2013 MP source code.

ShatteredGlass

  • Used in only one material: glasswindowbreak070b.vmt
  • Only referred to once in released mod code (in src\utils\vbsp\cubemap.cpp).
  • Closely related to the $crackmaterial parameter, which in turn is related to the func_breakable_surf entity.

ShatteredGlass_DX7

  • Used in the glasswindowbreak070b.vmt material (as a fallback shader for the ShatteredGlass shader). See above.

ShatteredGlass_DX8

  • Used in the glasswindowbreak070b.vmt material (as a fallback shader for the ShatteredGlass shader). See above.