Talk:$phong

From Valve Developer Community
Jump to: navigation, search

Anyone figure out what Phongalbedotint does?

Just wondering if anyone found out what the Phongalbedotint does, I'm guessing that it actually uses the colors in the phongexponent texture to determine what color the highlight will be, I say this because on many of the l4d2 textures that have this value set to one have exponent textures that are colored. --Stoopdapoop 13:56, 9 August 2010 (UTC)

Well I believe the albedo is the basetexture so I'd assume it tints the basetexture. --Omnicoder 17:37, 9 August 2010 (UTC)
I've never used that command but I expect that it works the other way around, with the basetexture colour value tinting the phong reflection. --TomEdwards 18:57, 9 August 2010 (UTC)

Base luminance phong mask?

Can anyone figure out what $basemapluminancephongmask does? Because it seems interesting to find out what things it can do. --Breakin' Benny 16:37, 10 December 2010 (UTC)

Phong matering with envmap?

Can a Phong material also have the $envmap parameter? I tried it, but got some strange results. --Pandaboy 12:51, 22 June 2013 (PDT)

Phong on WorldVertexTransition (CS:GO)

I think it'd be important to point out that phong in CS:GO on WorldVertexTransition uses $phongMaskContrastBrightness2, $phongexponent2 and $phongAmount2 for the other texture, as in $basetexture2 and so on. If the former is not specified, it will fall back to default parameters for the second texture. --MrPuhur (talk) 12:44, 28 July 2016 (UTC)

Confusing start of the page

Someone who knows more about CSGO branch and later should rewrite the start. Just read this:

  • "It is also available on the LightmappedGeneric and WorldVertexTransition shaders in all games since Counter-Strike: Global Offensive (also in Gmod, Xengine, Mapbase )." (icons instead of words, but okay).

then:

  • "Phong shading for LightmappedGeneric and WorldVertexTransition is only available in (CSGO, Strata).".

So it's not "all games since"?

then:

  • "(in all games since (Strata)) env_projectedtexture 4 also affects brushes with phong enabled)"

what is "all games since Strata?" What's the lineage of games here? Does it mean all games on Strata? It's not like saying "all games since CSGO" because it's not an official engine branch.

What does "env_projectedtexture 4 also affects" mean? Is it env projectedtexture, like the entity? What's the 4?

then:

  • "Bug: Garry's Mod reads lighting direction for brush phong from env_sun instead [...]"

so now Gmod applies too? But it just said "only available in CSGO, Strata"?

then:

  • "Phong shading for LightmappedGeneric is also available in Mapbase, but it is implemented differently."

We're finally back to Mapbase having it, which was said (through an icon) at the start, but then contradicted.

Also, saying "phong shading is (only/available)" is somewhat confusing too - as if it's some separate thing within Phong that's exclusive to some branches.

Also, the section $phong#Brush_Shader_Parameters_.28only_in_.29.28also_in_.29 looks bad in TOC because icons aren't parsed. That section probably also needs to be reviewed to see if the branch mentions there are correct. Cvoxalury (talk) 02:33, 23 July 2024 (PDT)

Adding to this, what the hell does this mean:

  • "Garry's Mod Using this with $normalmapalphaenvmapmask and $envmap renders in $envmap and $phong be masked by both $basemapalphaphongmask alpha channel and $normalmapalphaenvmapmask alpha channel."

Literally what does any of this mean? What is even trying to be said here? Was this AI generated? --Wolfcl0ck (talk) 23:27, 15 August 2024 (PDT)

To the best of my deciphering ability it must mean:
"In Garrys Mod, if you use phong with $normalmapalphaenvmakmask 1 and $envmap [env_cubemap I guess], that'll make both the envmap and the phong be masked by [combined effect of?] the basetexture's alpha and the bumpmap's alpha"
So I'm guessing in Gmod, the two masks will be somehow added to each other (or multiplied?) and affect both the cubemap and phong? As opposed to only affecting one thing each? Cvoxalury (talk) 05:39, 16 August 2024 (PDT)

"$bumpmapalphaphongmask" and "$normalmapalphaphongmask"

Some people seem to use either to represent the phong mask, when neither of these even exist and $phong defaults to using the bump map anyway. I think it's worth plopping here though. [Insert joke here about a script that completely deletes both parameters in .VMTs.] --Breakin' Benny (talk) 10:22, 3 October 2024 (PDT)