$pointsamplemagfilter: Difference between revisions
Jump to navigation
Jump to search

Note:Not compatible with blended displacement materials.
Note:A similar effect can be achieved by enabling Point Sampling in a material's VTF file. ( Which does work with blended materials, use this instead! )
Note:Effect only works on
Bug:This parameter may not work on older hardware. [todo tested in ?]
mNo edit summary |
m (The "P" was used for catalog) |
||
Line 3: | Line 3: | ||
'''$pointsamplemagfilter''' is a [[material]] [[shader]] parameter available in {{csgo}} for <code>[[LightmappedGeneric]]</code>. It disables texture filtering on a material if the texture resolution is bigger than the space it occupies onscreen, and linearly interpolated (smooth) if its smaller, and will use [[MIP_Mapping|mipmaps]]. | '''$pointsamplemagfilter''' is a [[material]] [[shader]] parameter available in {{csgo}} for <code>[[LightmappedGeneric]]</code>. It disables texture filtering on a material if the texture resolution is bigger than the space it occupies onscreen, and linearly interpolated (smooth) if its smaller, and will use [[MIP_Mapping|mipmaps]]. | ||
This makes it pixelated when near the texture, but smooth when far way, and will not produce [https://en.wikipedia.org/wiki/Moir%C3%A9_pattern moiré patterns] when viewed at grazing angles or from distance, compared to just enabling Point Sampling flag in a material's [[Valve_Texture_Format|VTF]]. | This makes it pixelated when near the texture, but smooth when far way, and will not produce [https://en.wikipedia.org/wiki/Moir%C3%A9_pattern moiré patterns] when viewed at grazing angles or from distance, compared to just enabling Point Sampling flag in a material's [[Valve_Texture_Format|VTF]]. | ||
Line 10: | Line 9: | ||
{{Note|Effect only works on <code>[[$basetexture]]</code> and will not have the desired effect on the <code>[[$bumpmap]]</code>.}} | {{Note|Effect only works on <code>[[$basetexture]]</code> and will not have the desired effect on the <code>[[$bumpmap]]</code>.}} | ||
{{Bug|This parameter may not work on older hardware.}} | {{Bug|This parameter may not work on older hardware.}} | ||
[[File:Difference.png|none|thumb|left|730px|Difference side by side, '''$pointsamplemagfilter''' (left) is pixelated and looks good in the distance as well]] | [[File:Difference.png|none|thumb|left|730px|Difference side by side, '''$pointsamplemagfilter''' (left) is pixelated and looks good in the distance as well]] | ||
==VMT syntax example== | == VMT syntax example == | ||
$pointsamplemagfilter <[[Boolean|bool]]> | $pointsamplemagfilter <[[Boolean|bool]]> | ||
[[Category:List of Shader Parameters]] | [[Category:List of Shader Parameters|P]] | ||
[[Category:Glossary]] | [[Category:Glossary]] |
Revision as of 01:36, 6 June 2021


$pointsamplemagfilter is a material shader parameter available in for
LightmappedGeneric
. It disables texture filtering on a material if the texture resolution is bigger than the space it occupies onscreen, and linearly interpolated (smooth) if its smaller, and will use mipmaps.
This makes it pixelated when near the texture, but smooth when far way, and will not produce moiré patterns when viewed at grazing angles or from distance, compared to just enabling Point Sampling flag in a material's VTF.



$basetexture
and will not have the desired effect on the $bumpmap
.
VMT syntax example
$pointsamplemagfilter <bool>