PaintBlob: Difference between revisions
Line 47: | Line 47: | ||
== Additional Parameters == | == Additional Parameters == | ||
{{MatParamDef|$uvscale|float|text=UV projection scale. Default: 0.02.}} | |||
{{MatParamDef|$bumpstrength|float|text=Bump map strength.}} | |||
{{MatParamDef|$fresnelbumpstrength|float|text=Bump map strength for the fresnel term.}} | |||
{{MatParamDef|$translucentfresnelminmaxexp|vector3|text=Fresnel range parameters for the opacity texture.}} | |||
{{MatParamDef|$uvprojoffset|vector3|text=Center for UV projection.}} | |||
{{MatParamDef|$bbmin|and=$bbmax|vector3|text={{todo|Functional?}}}} | |||
{{MatParamDef|$contactshadows|bool|text=Darkens the shading of the ice region in areas where it is in contact with a surface.}} | |||
;{{ent|$bumpframe}} | ;{{ent|$bumpframe}} | ||
: Bump frame. | : Bump frame. |
Revision as of 11:56, 23 August 2025
PaintBlob
is a Pixel shader available in Counter-Strike: Global Offensive. Despite the odd name, its purpose is to create realistic hollow ice surfaces by piercing light through it using normal mapping, and calculating light reflection from its inner layer(backface) onto the outer layer (front face). The final output color of the surface is computed by combining various lighting terms. Also supports fresnel translucency when viewing the surface through itself, creating the illusion of a hollow ice material. Furthermore, a bounding box min and max value can be set to define how "hollow" or "thick" the material surface should be.



Ice Interior Shading Algorithm
The code implements an ice interior shading algorithm to simulate the appearance of ice as a translucent material. The algorithm takes inputs such as the world normal, eye direction, and screen position and uses them to create the illusion of light passing through the surface. The final result is a composite of the blurred enviroment map, the interior color and ambient lighting.
Supported Parameters
Textures & Masks
- $basetexture
- Diffuse texture.
- $normalmap
- Normal map.
- $envmap
- Specular reflection.
- $lightwarptexture
- 1D ramp texture for tinting scalar diffuse term.


Outer Layer Parameters

Interior Volume Parameters
Additional Parameters
- $bumpframe
- Bump frame.
- $alphatest

