PaintBlob: Difference between revisions
(2 intermediate revisions by the same user not shown) | |||
Line 16: | Line 16: | ||
== Supported Parameters == | == Supported Parameters == | ||
===Textures & Masks=== | ===Textures & Masks=== | ||
{{MatParamDef|$basetexture|texture|text=Diffuse texture.}} | |||
{{MatParamDef|$normalmap|texture|text=Normal map.}} | |||
{{MatParamDef|$envmap|string|text=Specular reflection.}} | |||
{{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.}} | ||
Line 57: | Line 52: | ||
{{MatParamDef|$alphatest|bool|text={{tip|Has no effect on the alpha, but effects shadow casting}}}} | {{MatParamDef|$alphatest|bool|text={{tip|Has no effect on the alpha, but effects shadow casting}}}} | ||
{{MatParamDef|$translucent|bool|text={{tip|Has no effect on the alpha, but effects shadow casting}}}} | {{MatParamDef|$translucent|bool|text={{tip|Has no effect on the alpha, but effects shadow casting}}}} | ||
{{MatParamDef|$surfaceprop| | {{MatParamDef|$surfaceprop|string}} | ||
{{MatParamDef|$nocull|bool}} | {{MatParamDef|$nocull|bool}} | ||
[[Category:Shaders]] | [[Category:Shaders]] |
Latest revision as of 12: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.
Supported Parameters
Textures & Masks


Outer Layer Parameters

Interior Volume Parameters
Additional Parameters

