PaintBlob: Difference between revisions
| Line 16: | Line 16: | ||
== Supported Parameters == | == Supported Parameters == | ||
===Textures & Masks=== | ===Textures & Masks=== | ||
{{MatParamDef | {{MatParamDef|$basetexture|texture|text=Diffuse texture.}} | ||
{{MatParamDef | {{MatParamDef|$normalmap|texture|text=Normal map.}} | ||
{{MatParamDef | {{MatParamDef|$envmap|string|text=Specular reflection.}} | ||
{{MatParamDef | {{MatParamDef|$lightwarptexture|texture|text=1D ramp texture for tinting scalar diffuse term.}} | ||
{{MatParamDef|$backsurface|bool|text=Specify that this is the back surface of the ice.{{bug|Results in a pixel shader crash if true.}}}} | {{MatParamDef|$backsurface|bool|text=Specify that this is the back surface of the ice.{{bug|Results in a pixel shader crash if true.}}}} | ||
{{MatParamDef|$specmasktexture|texture|text=Mask texture for specular reflection.}} | {{MatParamDef|$specmasktexture|texture|text=Mask texture for specular reflection.}} | ||
Revision as of 11:05, 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.