Open Equalizer5118 opened 6 months ago
Does your model's material have bumpmap specified? Parallax correction won't work on materials with $bumpmap specified (I've only tested this on LightmappedGeneric, but I believe it also applies to the VertexLitGeneric shader)
It does, however parallax cubemaps have worked on LMG materials and PBR materials with $bumpmap specified for me in the past.
Also, after looking at the shader parameter list JJ provided me a couple of months back, I see no params that exist for parallax correction. Specifically, the param $envmapparallax
exists on LMG, however that parameter does not exist on VLG.
Nevermind my comment, I've just had a problem with parallax corrected cubemaps, but it turns out my normal map was just broken
What would this enhancement be for?
Entity
Describe your enhancement suggestion in more detail
As I currently understand how parallax corrected cubemaps work, VBSP patches any materials with
$envmap env_cubemap
by replacing env_cubemap with the name of the nearest generated cubemap. The reason this doesnt work with static props are because, iirc, they are switched on the fly in-game, a system used by all props. For me, I don't see why this needs to be done for static props as they, as the name implies, are static. It would make more sense to me to have VBSP patch materials for each instance of the prop_static found to replace the $envmap param with their own respective closest cubemap, which would by extension allow for parallax Corrected cubemaps to then be supported on static props.To the end user, the process should be no different than pcc on world brushes. However, there should likely be a key value for
prop_static
that would allow material patching, which should be disabled by default. It could look like this:Enable Material Patching (enablepatching) < bool > Allows VBSP to patch this prop's materials, which allows for Parallax Corrected Cubemaps to be attached to this prop at the cost of increased file size.